initial import

This commit is contained in:
tengel 2024-03-20 11:25:14 -05:00
parent 05d432f88a
commit 216dbc3fde
22 changed files with 1772 additions and 0 deletions

9
Trolltech.conf Normal file
View file

@ -0,0 +1,9 @@
[Qt]
font="Luxi Sans,12,-1,5,75,2,0,0,0,0"
embedFonts=true
style=GTK+
GUIEffects=none
Palette\active=#000000, #edeceb, #ffffff, #cbc7c4, #c6c5c4, #b8b5b2, #1a1a1a, #ffffff, #000000, #ffffff, #edeceb, #b7b6b5, #86abd9, #ffffff, #0000ff, #ff00ff, #efefef, #000000, #ffffdc, #000000
Palette\inactive=#000000, #edeceb, #ffffff, #cbc7c4, #c6c5c4, #b8b5b2, #1a1a1a, #ffffff, #000000, #ffffff, #edeceb, #b7b6b5, #7099cc, #ffffff, #0000ff, #ff00ff, #efefef, #000000, #ffffdc, #000000
Palette\disabled=#767675, #edeceb, #ffffff, #cbc7c4, #c6c5c4, #b8b5b2, #767675, #ffffff, #767675, #ffffff, #edeceb, #b7b6b5, #d9d9d9, #ffffff, #0000ff, #ff00ff, #efefef, #000000, #ffffdc, #000000

110
Xresources Normal file
View file

@ -0,0 +1,110 @@
! ~/.Xresources
! terminal font
xterm*utf8: 2
xterm*eightBitInput: false
xterm*faceName: DejaVu Sans Mono:style=Book
xterm*faceSize: 12
xterm*faceSize1: 6
xterm*faceSize2: 8
xterm*faceSize3: 10
xterm*faceSize4: 12
xterm*faceSize5: 16
xterm*faceSize6: 22
xterm*faceSize7: 32
xterm*vt100*geometry: 80x24
xterm*vt100*scaleHeight: 1.01
! popup menu font
xterm*font: -*-dejavu sans-medium-r-*-*-*-*-*-*-*-*-*
! fontconfig may override these
Xft.antialias: 1
Xft.autohint: 0
Xft.embeddedbitmap: 0
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
Xft.rgba: rgb
Xft.smoothing: grayscale
! various
xterm.termName: xterm-256color
xterm*forceBoxChars: true
xterm*selectToClipboard: true
xterm*cursorBlink: false
xterm*cursorColor: rgb:8a/e2/34
xterm*toolBar: false
xterm*fullscreen: never
xterm*loginShell: true
! scrollbar
xterm*rightScrollBar: true
xterm*scrollBar: true
xterm*scrollKey: true
xterm*saveLines: 16384
xterm*scrollTtyOutput: false
xterm*vt100*scrollBar*width: 8
! Fix Alt and Ctrl+H
xterm*vt100*metaSendsEscape: true
xterm*vt100*backarrowKey: false
xterm*ttyModes: erase ^?
! double-click to select whole URLs
! https://lukas.zapletalovi.com/2013/07/hidden-gems-of-xterm.html
xterm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48
! keyboard shortcuts
xterm*vt100.translations: #override \n\
Shift <Key>Home: scroll-forw(10000000000) \n\
Shift <Key>End: scroll-back(10000000000) \n\
Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\
Ctrl <Key> minus: smaller-vt-font() \n\
Ctrl <Key> plus: larger-vt-font() \n\
Ctrl <Key> 0: set-vt-font(d) \n\
<Btn1Up>: select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0) \n\
<Btn2Up>: insert-selection(PRIMARY)
! Shift-Home Top of scrollback
! Shift-End End of scrollback
! Ctrl-Shift-c Copy
! Ctrl-Shift-v Paste
! Ctrl-minus Decrease font
! Ctrl-plus Increase font
! Ctrl-zero Default font
! <Left mouse up-after-select copies to all buffers>
! <Middle mouse up-on-click inserts primary buffer>
! white on black
xterm*foreground: rgb:ff/ff/ff
xterm*background: rgb:00/00/00
xterm*dynamicColors: true
! Tango color scheme from mate-terminal adaptation
! https://en.wikipedia.org/wiki/Tango_Desktop_Project
! - Aluminium -
xterm*color0: rgb:00/00/00
xterm*color8: rgb:55/57/53
! - Scarlet Red -
xterm*color1: rgb:cc/00/00
xterm*color9: rgb:ef/29/29
! - Chameleon -
xterm*color2: rgb:4e/9a/06
xterm*color10: rgb:8a/e2/34
! - Butter -
xterm*color3: rgb:c4/a0/00
xterm*color11: rgb:fc/e9/4f
! - Sky Blue -
xterm*color4: rgb:34/65/a4
xterm*color12: rgb:72/9f/cf
! - Plum -
xterm*color5: rgb:75/50/7b
xterm*color13: rgb:ad/7f/a8
! - Cyan -
xterm*color6: rgb:06/98/9a
xterm*color14: rgb:34/e2/e2
! - Aluminium 2 -
xterm*color7: rgb:d3/d7/cf
xterm*color15: rgb:ee/ee/ec

58
bashrc Normal file
View file

@ -0,0 +1,58 @@
#
# ~/.bashrc
#
# history
HISTTIMEFORMAT='[%Y-%m-%d %H:%M:%S] '
HISTCONTROL="ignoredups"
HISTSIZE="100000"
export HISTTIMEFORMAT HISTCONTROL HISTSIZE
shopt -s cmdhist histappend
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
# these screw up pipes to sed et. al
unalias grep 2>/dev/null
unalias egrep 2>/dev/null
unalias fgrep 2>/dev/null
# If not running interactively, don't do anything else
[[ $- != *i* ]] && return
# User specific aliases and functions
alias ls='ls --color=auto'
alias vi="vim"
alias ntop="sudo nethogs wlp3s0"
alias mirrorme="mplayer -vf mirror -v tv:// -tv device=/dev/video0:driver=v4l2"
alias psave="sudo cpupower frequency-set -g powersave"
alias pperf="sudo cpupower frequency-set -g performance"
alias pcheck="sudo cpupower frequency-info -o"
alias words="shuf ~/tmp/words.txt | grep -v \"'s\" | head -21"
# stop quotes around ls which coreutils introduced
export QUOTING_STYLE=literal
# stop paste which readline introduced
bind 'set enable-bracketed-paste off'
# stop GTK3 disappearing scrollbars
export GTK_OVERLAY_SCROLLING=0
# Libreoffice
export SAL_USE_VCLPLUGIN=gtk
# this messes up git commits via cmdline
unset SSH_ASKPASS
# mate-terminal is hard coded to 'xterm'
if [[ "X${DESKTOP_SESSION}" == "Xmate" ]] || \
[[ "X${XDG_DESKTOP_SESSION}" == "Xmate" ]]; then
export TERM=xterm-256color
fi
# general
PS1='[\u@\h $PWD]\n$ '
BC_ENV_ARGS="-l -q"
MOZ_DISABLE_PANGO=1
export PS1 BC_ENV_ARGS MOZ_DISABLE_PANGO

174
cmus.autosave Normal file
View file

@ -0,0 +1,174 @@
set aaa_mode=album
set altformat_current= %F
set altformat_playlist= %f%= %d
set altformat_title=%f
set altformat_trackwin= %f%= %d
set auto_expand_albums=true
set auto_reshuffle=true
set buffer_seconds=10
set color_cmdline_attr=default
set color_cmdline_bg=default
set color_cmdline_fg=default
set color_cur_sel_attr=default
set color_error=lightred
set color_info=lightyellow
set color_separator=blue
set color_statusline_attr=default
set color_statusline_bg=gray
set color_statusline_fg=black
set color_titleline_attr=default
set color_titleline_bg=blue
set color_titleline_fg=white
set color_win_attr=default
set color_win_bg=default
set color_win_cur=lightyellow
set color_win_cur_sel_attr=default
set color_win_cur_sel_bg=blue
set color_win_cur_sel_fg=lightyellow
set color_win_dir=lightblue
set color_win_fg=default
set color_win_inactive_cur_sel_attr=default
set color_win_inactive_cur_sel_bg=gray
set color_win_inactive_cur_sel_fg=lightblue
set color_win_inactive_sel_attr=default
set color_win_inactive_sel_bg=gray
set color_win_inactive_sel_fg=black
set color_win_sel_attr=default
set color_win_sel_bg=blue
set color_win_sel_fg=white
set color_win_title_attr=default
set color_win_title_bg=blue
set color_win_title_fg=white
set confirm_run=true
set continue=false
set device=/dev/cdrom
set display_artist_sort_name=false
set dsp.alsa.device=
set dsp.ao.buffer_size=16384
set dsp.ao.driver=
set dsp.ao.wav_counter=1
set dsp.oss.device=
set follow=false
set format_current= %a - %l -%3n. %t%= %A
set format_playlist= %-25%a %3n. %t%= %y %d
set format_playlist_va= %-25%A %3n. %t (%a)%= %y %d
set format_title=%a - %l - %t (%y)
set format_trackwin=%3n. %t%= %y %d
set format_trackwin_va=%3n. %t (%a)%= %y %d
set icecast_default_charset=ISO-8859-1
set id3_default_charset=ISO-8859-1
set input.cdio.cddb_url=freedb.freedb.org:8880
set lib_sort=albumartist date album discnumber tracknumber title filename
set mixer.alsa.channel=
set mixer.alsa.device=
set mixer.oss.channel=PCM
set mixer.oss.device=
set mixer.pulse.restore_volume=1
set output_plugin=pulse
set passwd=
set pl_sort=
set play_library=true
set play_sorted=false
set repeat=true
set repeat_current=false
set replaygain=disabled
set replaygain_limit=true
set replaygain_preamp=0.000000
set resume=false
set rewind_offset=5
set scroll_offset=2
set set_term_title=true
set show_all_tracks=true
set show_current_bitrate=true
set show_hidden=false
set show_playback_position=true
set show_remaining_time=false
set shuffle=false
set skip_track_info=false
set smart_artist_sort=true
set softvol=false
set softvol_state=0 0
set status_display_program=
set wrap_search=true
bind browser backspace browser-up
bind browser i toggle show_hidden
bind browser space win-activate
bind browser u win-update
bind common ! push shell
bind common + vol +10%
bind common , seek -1m
bind common - vol -10%
bind common . seek +1m
bind common 1 view tree
bind common 2 view sorted
bind common 3 view playlist
bind common 4 view queue
bind common 5 view browser
bind common 6 view filters
bind common 7 view settings
bind common = vol +10%
bind common C toggle continue
bind common D win-remove
bind common E win-add-Q
bind common F push filter
bind common G win-bottom
bind common I echo {}
bind common L push live-filter
bind common M toggle play_library
bind common N search-prev
bind common P win-mv-before
bind common U win-update-cache
bind common [ vol +1% +0
bind common ] vol +0 +1%
bind common ^B win-page-up
bind common ^C echo Type :quit<enter> to exit cmus.
bind common ^E win-scroll-down
bind common ^F win-page-down
bind common ^L refresh
bind common ^R toggle repeat_current
bind common ^Y win-scroll-up
bind common a win-add-l
bind common b player-next
bind common c win-toggle
bind common delete win-remove
bind common down win-down
bind common e win-add-q
bind common end win-bottom
bind common enter win-activate
bind common f toggle follow
bind common g win-top
bind common h seek -5
bind common home win-top
bind common i win-sel-cur
bind common j win-down
bind common k win-up
bind common l seek +5
bind common left seek -5
bind common m toggle aaa_mode
bind common n search-next
bind common o toggle play_sorted
bind common p win-mv-after
bind common page_down win-page-down
bind common page_up win-page-up
bind common q quit
bind common r toggle repeat
bind common right seek +5
bind common s toggle shuffle
bind common space player-pause
bind common t toggle show_remaining_time
bind common tab win-next
bind common u update-cache
bind common up win-up
bind common v player-stop
bind common x player-play
bind common y win-add-p
bind common z player-prev
bind common { vol -1% -0
bind common } vol -0 -1%
fset 90s=date>=1990&date<2000
fset classical=genre="Classical"
fset missing-tag=!stream&(artist=""|album=""|title=""|tracknumber=-1|date=-1)
fset mp3=filename="*.mp3"
fset ogg=filename="*.ogg"
fset ogg-or-mp3=ogg|mp3
factivate

257
dir_colors Normal file
View file

@ -0,0 +1,257 @@
# Configuration file for the color ls utility
# Synchronized with coreutils 8.5 dircolors
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty
# Extra command line options for ls go here.
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.
OPTIONS -F -T 0
# Below, there should be one TERM entry for each termtype that is colorizable
TERM Eterm
TERM ansi
TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM console
TERM cygwin
TERM dtterm
TERM eterm-color
TERM gnome
TERM gnome-256color
TERM jfbterm
TERM konsole
TERM kterm
TERM linux
TERM linux-c
TERM mach-color
TERM mlterm
TERM putty
TERM rxvt
TERM rxvt-256color
TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM rxvt-unicode-256color
TERM rxvt-unicode256
TERM screen
TERM screen-256color
TERM screen-256color-bce
TERM screen-bce
TERM screen-w
TERM screen.rxvt
TERM screen.linux
TERM terminator
TERM vt100
TERM xterm
TERM xterm-16color
TERM xterm-256color
TERM xterm-88color
TERM xterm-color
TERM xterm-debian
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
#NORMAL 00 # no color code at all
#FILE 00 # normal file, use no color at all
RESET 0 # reset to "normal" color
DIR 01;34 # directory
LINK 01;36 # symbolic link (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file
MISSING 01;05;37;41 # ... and the files they point to
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 30;41 # file with capability
STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
EXEC 01;32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
# executables (bright green)
#.cmd 01;32
#.exe 01;32
#.com 01;32
#.btm 01;32
#.bat 01;32
#.sh 01;32
#.csh 01;32
# archives or compressed (bright red)
.tar 01;31
.tgz 01;31
.arc 01;31
.arj 01;31
.taz 01;31
.lha 01;31
.lzh 01;31
.lzma 01;31
.tlz 01;31
.txz 01;31
.tzo 01;31
.t7z 01;31
.zip 01;31
.z 01;31
.Z 01;31
.dz 01;31
.gz 01;31
.lrz 01;31
.lz 01;31
.lzo 01;31
.xz 01;31
.bz2 01;31
.bz 01;31
.tbz 01;31
.tbz2 01;31
.tz 01;31
.deb 01;31
.rpm 01;31
.jar 01;31
.war 01;31
.ear 01;31
.sar 01;31
.rar 01;31
.alz 01;31
.ace 01;31
.zoo 01;31
.cpio 01;31
.7z 01;31
.rz 01;31
.cab 01;31
# image formats (magenta)
.jpg 01;35
.jpeg 01;35
.gif 01;35
.bmp 01;35
.pbm 01;35
.pgm 01;35
.ppm 01;35
.tga 01;35
.xbm 01;35
.xpm 01;35
.tif 01;35
.tiff 01;35
.png 01;35
.svg 01;35
.svgz 01;35
.mng 01;35
.pcx 01;35
.mov 01;35
.mpg 01;35
.mpeg 01;35
.m2v 01;35
.mkv 01;35
.ogm 01;35
.mp4 01;35
.m4v 01;35
.mp4v 01;35
.vob 01;35
.qt 01;35
.nuv 01;35
.wmv 01;35
.asf 01;35
.rm 01;35
.rmvb 01;35
.flc 01;35
.avi 01;35
.fli 01;35
.flv 01;35
.gl 01;35
.dl 01;35
.xcf 01;35
.xwd 01;35
.yuv 01;35
.cgm 01;35
.emf 01;35
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axv 01;35
.anx 01;35
.ogv 01;35
.ogx 01;35
# audio formats (cyan)
.aac 01;36
.au 01;36
.flac 01;36
.mid 01;36
.midi 01;36
.mka 01;36
.mp3 01;36
.mpc 01;36
.ogg 01;36
.ra 01;36
.wav 01;36
# http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions
.axa 01;36
.oga 01;36
.spx 01;36
.xspf 01;36
# colorize binary documents (brown)
#.pdf 00;33
#.ps 00;33
#.ps.gz 00;33
#.tex 00;33
#.xls 00;33
#.xlsx 00;33
#.ppt 00;33
#.pptx 00;33
#.rtf 00;33
#.doc 00;33
#.docx 00;33
#.odt 00;33
#.ods 00;33
#.odp 00;33
#.epub 00;33
#.abw 00;33
#.wpd 00;33
#
# colorize text documents (brown)
#.txt 00;33
#.patch 00;33
#.diff 00;33
#.log 00;33
#.htm 00;33
#.html 00;33
#.shtml 00;33
#.xml 00;33

3
dmrc Normal file
View file

@ -0,0 +1,3 @@
[Desktop]
Language=en_US.utf8
Session=mate

86
fonts.conf Normal file
View file

@ -0,0 +1,86 @@
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- https://wiki.archlinux.org/index.php/font_configuration -->
<match target="font">
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintslight</const>
</edit>
<edit name="rgba" mode="assign">
<const>none</const>
</edit>
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
<edit mode="assign" name="embeddedbitmap">
<bool>false</bool>
</edit>
</match>
<!-- Reject bitmap fonts -->
<selectfont>
<rejectfont>
<pattern>
<patelt name="scalable"><bool>false</bool></patelt>
</pattern>
</rejectfont>
</selectfont>
<match target="pattern">
<test qual="any" name="family" compare="eq">
<string>Roboto</string>
</test>
<edit name="family" mode="prepend" binding="same">
<string>Noto Sans</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family" compare="eq">
<string>Courier</string>
</test>
<edit name="family" mode="prepend" binding="same">
<string>Liberation Mono</string>
</edit>
</match>
<alias>
<family>Courier</family>
<prefer>
<family>Liberation Mono</family>
</prefer>
</alias>
<selectfont>
<rejectfont>
<pattern>
<patelt name="scalable"><bool>false</bool></patelt>
</pattern>
</rejectfont>
</selectfont>
<selectfont>
<rejectfont>
<pattern>
<patelt name="family">
<string>Caladea</string>
</patelt>
</pattern>
<pattern>
<patelt name="family">
<string>Carlito</string>
</patelt>
</pattern>
</rejectfont>
</selectfont>
</fontconfig>

719
funcs.bc Normal file
View file

@ -0,0 +1,719 @@
#!/usr/bin/bc -l
### Funcs.BC - a large number of functions for use with GNU BC
## Not to be regarded as suitable for any purpose
## Not guaranteed to return correct answers
scale=50;
define pi() {
auto s;
if(scale==(s=scale(pi_)))return pi_
if(scale<s)return pi_/1
scale+=5;pi_=a(1)*4;scale-=5
return pi_/1
}
e = e(1);
define phi(){return((1+sqrt(5))/2)} ; phi = phi()
define psi(){return((1-sqrt(5))/2)} ; psi = psi()
# Reset base to ten
obase=ibase=A;
## Integer and Rounding
# Round to next integer nearest 0: -1.99 -> 1, 0.99 -> 0
define int(x) { auto os;os=scale;scale=0;x/=1;scale=os;return(x) }
# Round down to integer below x
define floor(x) {
auto os,xx;os=scale;scale=0
xx=x/1;if(xx>x).=xx--
scale=os;return(xx)
}
# Round up to integer above x
define ceil(x) {
auto os,xx;x=-x;os=scale;scale=0
xx=x/1;if(xx>x).=xx--
scale=os;return(-xx)
}
# Fractional part of x: 12.345 -> 0.345
define frac(x) {
auto os,xx;os=scale;scale=0
xx=x/1;if(xx>x).=xx--
scale=os;return(x-xx)
}
# Absolute value of x
define abs(x) { if(x<0)return(-x)else return(x) }
# Sign of x
define sgn(x) { if(x<0)return(-1)else if(x>0)return(1);return(0) }
# Round x up to next multiple of y
define round_up( x,y) { return(y*ceil( x/y )) }
# Round x down to previous multiple of y
define round_down(x,y) { return(y*floor(x/y )) }
# Round x to the nearest multiple of y
define round( x,y) {
auto os,oib;
os=scale;oib=ibase
.=scale++;ibase=A
y*=floor(x/y+.5)
ibase=oib;scale=os
return y
}
# Find the remainder of x/y
define int_remainder(x,y) {
auto os;
os=scale;scale=0
x/=1;y/=1;x%=y
scale=os
return(x)
}
define remainder(x,y) {
os=scale;scale=0
if(x==x/1&&y==y/1){scale=os;return int_remainder(x,y)}
scale=os
return(x-round_down(x,y))
}
# Greatest common divisor of x and y
define int_gcd(x,y) {
auto r,os;
os=scale;scale=0
x/=1;y/=1
while(y>0){r=x%y;x=y;y=r}
scale=os
return(x)
}
define gcd(x,y) {
auto r,os;
os=scale;scale=0
if(x==x/1&&y==y/1){scale=os;return int_gcd(x,y)}
scale=os
while(y>0){r=remainder(x,y);x=y;y=r}
return(x)
}
# Lowest common multiple of x and y
define int_lcm(x,y) {
auto r,m,os;
os=scale;scale=0
x/=1;y/=1
m=x*y
while(y>0){r=x%y;x=y;y=r}
m/=x
scale=os
return(m)
}
define lcm(x,y) { return (x*y/gcd(x,y)) }
# Remove largest possible power of 2 from x
define oddpart(x){
auto os;
os=scale;scale=0;x/=1
if(x==0){scale=os;return 1}
while(!x%2)x/=2
scale=os;return x
}
# Largest power of 2 in x
define evenpart(x) {
auto os;
os=scale;scale=0
x/=oddpart(x/1)
scale=os;return x
}
## Trig / Hyperbolic Trig
# Sine
define sin(x) { return s(x) } # alias for standard library
# Cosine
define c(x) { return s(x+pi()/2) } # as fast or faster than
define cos(x) { return c(x) } # . standard library
# Tangent
define tan(x) { auto c;c=c(x);if(c==0)c=A^-scale;return(s(x)/c) }
# Secant
define sec(x) { auto c;c=c(x);if(c==0)c=A^-scale;return( 1/c) }
# Cosecant
define cosec(x) { auto s;s=s(x);if(s==0)s=A^-scale;return( 1/s) }
# Cotangent
define cotan(x) { auto s;s=s(x);if(s==0)s=A^-scale;return(c(x)/s) }
# Arcsine
define arcsin(x) { if(x==-1||x==1)return(pi()/2*x);return( a(x/sqrt(1-x*x)) ) }
# Arccosine
define arccos(x) { if(x==0)return(0);return pi()/2-arcsin(x) }
# Arctangent (one argument)
define arctan(x) { return a(x) } # alias for standard library
# Arctangent (two arguments)
define arctan2(x,y) {
auto p;
if(x==0&&y==0)return(0)
p=(1-sgn(y))*pi()*(2*(x>=0)-1)/2
if(x==0||y==0)return(p)
return(p+a(x/y))
}
# Arcsecant
define arcsec(x) { return( a(x/sqrt(x*x-1)) ) }
# Arccosecant
define arccosec(x) { return( a(x/sqrt(x*x-1))+pi()*(sgn(x)-1)/2 ) }
# Arccotangent (one argument)
define arccotan(x) { return( a(x)+pi()/2 ) }
# Arccotangent (two arguments)
define arccotan2(x,y) { return( arctan(x,y)+pi()/2 ) }
# Hyperbolic Sine
define sinh(x) { auto t;t=e(x);return((t-1/t)/2) }
# Hyperbolic Cosine
define cosh(x) { auto t;t=e(x);return((t+1/t)/2) }
# Hyperbolic Tangent
define tanh(x) { auto t;t=e(x+x)-1;return(t/(t+2)) }
# Hyperbolic Secant
define sech(x) { auto t;t=e(x);return(2/(t+1/t)) }
# Hyperbolic Cosecant
define cosech(x) { auto t;t=e(x);return(2/(t-1/t)) }
# Hyperbolic Cotangent
define coth(x) { auto t;t=e(x+x)-1;return((t+2)/t) }
# Hyperbolic Arcsine
define arcsinh(x) { return( l(x+sqrt(x*x+1)) ) }
# Hyperbolic Arccosine
define arccosh(x) { return( l(x+sqrt(x*x-1)) ) }
# Hyperbolic Arctangent
define arctanh(x) { return( l((1+x)/(1-x))/2 ) }
# Hyperbolic Arcsecant
define arcsech(x) { return( l((sqrt(1-x*x)+1)/x) ) }
# Hyperbolic Arccosecant
define arccosech(x) { return( l((sqrt(1+x*x)*sgn(x)+1)/x) ) }
# Hyperbolic Arccotangent
define arccoth(x) { return( l((x+1)/(x-1))/2 ) }
# Length of the diagonal vector (0,0)-(x,y) [pythagoras]
define pyth(x,y) { return(sqrt(x*x+y*y)) }
define pyth3(x,y,z) { return(sqrt(x*x+y*y+z*z)) }
# Gudermannian Function
define gudermann(x) { return 2*(a(e(x))-a(1)) }
# Inverse Gudermannian Function
define arcgudermann(x) {
return arctanh(s(x))
}
# Bessel function
define besselj(n,x) { return j(n,x) } # alias for standard library
## Exponential / Logs
# Exponential e^x
define exp(x) { return e(x) } # alias for standard library
# Natural Logarithm (base e)
define ln(x) {
auto os,len,ln;
if(x< 0){print "ln error: logarithm of a negative number\n";return 0}
if(x==0)print "ln error: logarithm of zero; negative infinity\n"
len=length(x)-scale(x)-1
if(len<A)return l(x);
os=scale;scale+=length(len)+1
ln=l(x/A^len)+len*l(A)
scale=os
return ln/1
} # speed improvement on standard library
# workhorse function for pow and log - new, less clever version
# Helps determine whether a fractional power is legitimate for a negative number
# . expects to be fed a positive value
# . returns -odd for even/odd; odd2 for odd1/odd2;
# even for odd/even; -2 for irrational
# . note that the return value is the denominator of the fraction if the
# fraction is rational, and the sign of the return value states whether
# the numerator is odd (positive) or even (negative)
# . since even/even is not possible, -2 is used to signify irrational
define id_frac2_(y){
auto os,oib,es,eps,lim,max,p,max2,i,cf[],f[],n,d,t;
os=scale
if(cf_max){
# cf.bc is present!
.=cf_new(cf[],y);if(scale(cf[0]))return -2;
.=frac_from_cf(f[],cf[],1)
d=f[0];scale=0;if(f[1]%2==0)d=-d;scale=os
return d
}
oib=ibase;ibase=A
scale=0
es=3*os/4
scale=os
eps=A^-es
y+=eps/A
scale=es
y/=1
scale=0
if(y<0)y=-y
d=y-(n=y/1)
if(d<eps){t=2*(n%2)-1;scale=os;ibase=oib;return t}#integers are x/1
t=y/2;t=y-t-t
# Find numerator and denominator of fraction, if any
lim=A*A;max2=A^5*(max=A^int(os/2));p=1
i=0;y=t
while(1) {
scale=es;y=1/y;scale=0
y-=(t=cf[++i]=y/1);p*=1+t
if(i>lim||(max<p&&p<max2)){cf[i=1]=-2;break}#escape if number seems irrational
if((p>max2||3*length(t)>es+es)&&i>1){cf[i--]=0;break}#cheat: assume rational
if(y==0)break;#completely rational
}
n=1;d=cf[i]
if(i==0){print "id_frac2_: something is wrong; y=",y,", d=",d,"\n"}
if(d!=-2&&i)while(--i){d=n+cf[i]*(t=d);n=t}
if(d<A^os){d*=2*(n%2)-1}else{d=-2}
scale=os;ibase=oib
return d;
}
# raise x to integer power y faster than bc's x^y
# . it seems bc (at time of writing) uses
# . an O(n) repeated multiplication algorithm
# . for the ^ operator, which is inefficient given
# . that there is a simple O(log n) alternative:
define fastintpow__(x,y) {
auto r,hy;
if(y==0)return(1)
if(y==1)return(x)
r=fastintpow__(x,hy=y/2)
r*=r;if(hy+hy<y)r*=x
return( r )
}
define fastintpow_(x,y) {
auto ix,os;
if(y<0)return fastintpow_(1/x,-y)
if(y==0)return(1)
if(y==1)return(x)
if(x==1)return(1)
os=scale;scale=0
if(x==-1){y%=2;y+=y;scale=os;return 1-y}
# bc is still faster for integers
if(x==(ix=x/1)){scale=os;return ix^y}
# ...and small no. of d.p.s, but not for values <= 2
if(scale(x)<3&&x>2){scale=os;return x^y}
scale=os;x/=1;scale=0
x=fastintpow__(x,y);
scale=os;return x;
}
# Raise x to a fractional power faster than e^(y*l(x))
define fastfracpow_(x,y) {
auto f,yy,inv;
inv=0;if(y<0){y=-y;inv=1}
y-=int(y)
if(y==0)return 1;
if((yy=y*2^C)!=int(yy)){x=l(x);if(inv)x=-x;return e(y/1*x)}
# faster using square roots for rational binary fractions
# where denominator <= 8192
x=sqrt(x)
for(f=1;y&&x!=1;x=sqrt(x))if(y+=y>=1){.=y--;f*=x}
if(inv)f=1/f;
return f;
}
# Find the yth root of x where y is integer
define fastintroot_(x,y) {
auto os,d,r,ys,eps;
os=scale;scale=0;y/=1;scale=os
if(y<0){x=1/x;y=-y}
if(y==1){return x}
if(y>=x-1){return fastfracpow_(x,1/y)}
if(y*int((d=2^F)/y)==d){
r=1;while(r+=r<=y)x=sqrt(x)
return x
}
scale=length(y)-scale(y);if(scale<5)scale=5;r=e(ln(x)/y)
scale=os+5;if(scale<5)scale=5
d=1;eps=A^(3-scale)
ys=y-1
while(d>eps){
d=r;r=(ys*r+x/fastintpow_(r,ys))/y
d-=r;if(d<0)d=-d
}
scale=os
return r/1
}
# Raise x to the y-th power
define pow(x,y) {
auto os,p,ix,iy,fy,dn,s;
if(y==0) return 1
if(x==0) return 0
if(0<x&&x<1){x=1/x;y=-y}
os=scale;scale=0
ix=x/1;iy=y/1;fy=y-iy;dn=0
scale=os;#scale=length(x/1)
if(y!=iy&&x<0){
dn=id_frac2_(y)# -ve implies even numerator
scale=0;if(dn%2){# odd denominator
scale=os
if(dn<0)return pow(-x,y) # even/odd
/*else*/return -pow(-x,y) # odd/odd
}
print "pow error: "
if(dn>0) print "even root"
if(dn<0) print "irrational power"
print " of a negative number\n"
scale=os;return 0
}
if(y==iy) {
if(x==ix){p=fastintpow_(ix,iy);if(iy>0){scale=0;p/=1};scale=os;return p/1}
scale+=scale;p=fastintpow_(x,iy);scale=os;return p/1
}
if((dn=id_frac2_(y))!=-2){ #accurate rational roots (sometimes slower)
if(dn<0)dn=-dn
s=1;if(y<0){y=-y;s=-1}
p=y*dn+1/2;scale=0;p/=1;scale=os
if(p<A^3)x=fastintpow_(x,p)
x=fastintroot_(x,dn)
if(p>=A^3)x=fastintpow_(x,p)
if(s<0)x=1/x
return x
}
p=fastintpow_(ix,iy)*fastfracpow_(x,fy);
scale=os+os
if(ix)p*=fastintpow_(x/ix,iy)
scale=os
return p/1
#The above is usually faster and more accurate than
# return( e(y*l(x)) );
}
# y-th root of x [ x^(1/y) ]
define root(x,y) {
return pow(x,1/y)
}
# Specific cube root function
# = stripped down version of fastintroot_(x,3)
define cbrt(x) {
auto os,d,r,eps;
if(x<0)return -cbrt(-x)
if(x==0)return 0
os=scale;scale=0;eps=A^(scale/3)
if(x<eps){scale=os;return 1/cbrt(1/x)}
scale=5;r=e(ln(x)/3)
scale=os+5;if(scale<5)scale=5
d=1;eps=A^(3-scale)
while(d>eps){
d=r;r=(r+r+x/(r*r))/3
d-=r;if(d<0)d=-d
}
scale=os
return r/1
}
# Logarithm of x in given base: log(2, 32) = 5 because 2^5 = 32
# tries to return a real answer where possible when given negative numbers
# e.g. log(-2, 64) = 6 because (-2)^6 = 64
# likewise log(-2,-128) = 7 because (-2)^7 = -128
define log(base,x) {
auto os,i,l,sx,dn,dnm2;
if(base==x)return 1;
if(x==0){print "log error: logarithm of zero; negative infinity\n"; return l(0)}
if(x==1)return 0;
if(base==0){print "log error: zero-based logarithm\n"; return 0 }
if(base==1){print "log error: one-based logarithm; positive infinity\n";return -l(0)}
scale+=6
if((-1<base&&base<0)||(0<base&&base<1)){x=-log(1/base,x);scale-=6;return x/1}
if((-1<x && x<0)||(0<x && x<1)){x=-log(base,1/x);scale-=6;return x/1}
if(base<0){
sx=1;if(x<0){x=-x;sx=-1}
l=log(-base,x)
dn=id_frac2_(l)
os=scale;scale=0;dnm2=dn%2;scale=os
if(dnm2&&dn*sx<0){scale-=6;return l/1}
print "log error: -ve base: "
if(dnm2)print "wrong sign for "
print "implied "
if(dnm2)print "odd root/integer power\n"
if(!dnm2){
if(dn!=-2)print "even root\n"
if(dn==-2)print "irrational power\n"
}
scale-=6;return 0;
}
if(x<0){
print "log error: +ve base: logarithm of a negative number\n"
scale-=6;return 0;
}
x=ln(x)/ln(base);scale-=6;return x/1
}
# Integer-only logarithm of x in given base
# (compare digits function in digits.bc)
define int_log(base,x) {
auto os,p,c;
if(0<x&&x<1) {return -int_log(base,1/x)}
os=scale;scale=0;base/=1;x/=1
if(base<2)base=ibase;
if(x==0) {scale=os;return 1-base*A^os}
if(x<base) {scale=os;return 0 }
c=length(x) # cheat and use what bc knows about decimal length
if(base==A){scale=os;return c-1}
if(base<A){if(x>A){c*=int_log(base,A);c-=2*(base<4)}else{c=0}}else{c/=length(base)+1}
p=base^c;while(p<=x){.=c++;p*=base}
scale=os;return(c-1)
}
# Lambert's W function 0 branch; Numerically solves w*e(w) = x for w
# * is slow to converge near -1/e at high scales
define lambertw0(x) {
auto oib, a, b, w, ow, lx, ew, e1, eps;
if(x==0) return 0;
oib=ibase;ibase=A
ew = -e(-1)
if (x<ew) {
print "lambertw0: expected argument in range [-1/e,oo)\n"
ibase=oib
return -1
}
if (x==ew) {ibase=oib;return -1}
# First approximation from :
# http://www.desy.de/~t00fri/qcdins/texhtml/lambertw/
# (A. Ringwald and F. Schrempp)
# via Wikipedia
if(x < 0){
w = x/ew
} else if(x < 500){
lx=l(x+1);w=0.665*(1+0.0195*lx)*lx+0.04
} else if((lx=length(x)-scale(x))>5000) {
lx*=l(A);w=lx-(1-1/lx)*l(lx)
} else {
lx=l(x);w=l(x-4)-(1-1/lx)*l(lx)
}
# Iteration adapted from code found on Wikipedia
# apparently by an anonymous user at 147.142.207.26
# and later another at 87.68.32.52
ow = 0
eps = A^-scale
scale += 5
e1 = e(1)
while(abs(ow-w)>eps&&w>-1){
ow = w
if(x>0){ew=pow(e1,w)}else{ew=e(w)}
a = w*ew
b = a+ew
a -= x;
if(a==0)break
b = b/a - 1 + 1/(w+1)
w -= 1/b
if(x<-0.367)w-=eps
}
scale -= 5
ibase=oib
return w/1
}
# Lambert's W function -1 branch; Numerically solves w*e(w) = x for w
# * is slow to converge near -1/e at high scales
define lambertw_1(x) {
auto oib,os,oow,ow,w,ew,eps,d,iters;
oib=ibase;ibase=A
ew = -e(-1)
if(ew>x||x>=0) {
print "lambertw_1: expected argument in [-1/e,0)\n"
ibase=oib
if(x==0)return 1-A^scale
if(x>0)return 0
return -1
}
if(x==ew) return -1;
os=scale
eps=A^-os
scale+=3
oow=ow=0
w=x
w=l(-w)
w-=l(-w)
w+=sqrt(eps)
iters=0
while(abs(ow-w)>eps){
oow=ow;ow=w
if(w==-1)break
w=(x*e(-w)+w*w)/(w+1)
if(iters++==A+A||oow==w){iters=0;w-=A^-scale;scale+=2}
}
scale=os;ibase=oib
return w/1
}
# LambertW wrapper; takes most useful branch based on x
# to pick a branch manually, use lambertw_1 or lambertw0 directly
define w(x) {
if(x<0)return lambertw_1(x)
return lambertw0(x)
}
# Faster calculation of lambertw0(exp(x))
# . avoids large intermediate value and associated slowness
# . numerically solves x = y+ln(y) for y
define lambertw0_exp(x) {
auto oy,y,eps;
# Actual calculation is faster for x < 160 or thereabouts
if(x<C*D)return lambertw0(e(x));
oy=0;y=l(x);y=x-y+y/x;eps=A^-scale
while(abs(oy-y)>eps)y=x-l(oy=y)
return y
}
# Shorthand alias for the above
define w_e(x){ return lambertw0_exp(x) }
# Numerically solve pow(y,y) = x for y
define powroot(x) {
auto r;
if(x==0) {
print "powroot error: attempt to solve for zero\n"
return 0
}
if(x==1||x==-1) {return x}
if(x<=r=e(-e(-1))){
print "powroot error: unimplemented for values\n <0";r
return 0
}
r = ln(x)
r /= w(r)
return r
}
## Triangular numbers
# xth triangular number
define tri(x) {
auto xx
x=x*(x+1)/2;xx=int(x)
if(x==xx)return(xx)
return(x)
}
# 'triangular root' of x
define trirt(x) {
auto xx
x=(sqrt(1+8*x)-1)/2;xx=int(x)
if(x==xx)x=xx
return(x)
}
# Workhorse for following 2 functions
define tri_step_(t,s) {
auto tt
t=t+(1+s*sqrt(1+8*t))/2;tt=int(t)
if(tt==t)return(tt)
return(t)
}
# Turn tri(x) into tri(x+1) without knowing x
define tri_succ(t) {
return(tri_step_(t,0+1))
}
# Turn tri(x) into tri(x-1) without knowing x
define tri_pred(t) {
return(tri_step_(t,0-1))
}
## Polygonal Numbers
# the xth s-gonal number:
# e.g. poly(3, 4) = tri(4) = 1+2+3+4 = 10; poly(4, x) = x*x, etc
define poly(s, x) {
auto xx
x*=(s/2-1)*(x-1)+1;xx=int(x);if(x==xx)x=xx
return x
}
# inverse of the above = polygonal root:
# e.g. inverse_poly(3,x)=trirt(x); inverse_poly(4,x)=sqrt(x), etc
define inverse_poly(s, r) {
auto t,xx
t=(s-=2)-2
r=(sqrt(8*s*r+t*t)+t)/s/2;xx=int(r);if(r==xx)r=xx
return r
}
# converse of poly(); solves poly(s,x)=r for s
# i.e. if the xth polygonal number is r, how many sides has the polygon?
# e.g. if the 5th polygonal number is 15, converse_poly(5,15) = 3
# so the polygon must have 3 sides! (15 is the 5th triangular number)
define converse_poly(x,r) {
auto xx
x=2*((r/x-1)/(x-1)+1);xx=int(x);if(x==xx)x=xx
return x
}
## Tetrahedral numbers
# nth tetrahedral number
define tet(n) { return n*(n+1)*(n+2)/6 }
# tetrahedral root = inverse of the above
define tetrt(t) {
auto k,c3,w;
if(t==0)return 0
if(t<0)return -2-tetrt(-t)
k=3^5*t*t-1
if(k<0){print "tetrt: unimplemented for 0<|t|<sqrt(3^-5)\n"; return 0}
c3=cbrt(3)
k=cbrt(sqrt(3*k)+3^3*t)
return k/c3^2+1/(c3*k)-1
}
## Arithmetic-Geometric mean
define arigeomean(a,b) {
auto c,s;
if(a==b)return a;
s=1;if(a<0&&b<0){s=-1;a=-a;b=-b}
if(a<0||b<0){print "arigeomean: mismatched signs\n";return 0}
while(a!=b){c=(a+b)/2;a=sqrt(a*b);b=c}
return s*a
}
# solve n = arigeomean(x,y)
define inv_arigeomean(n, y){
auto ns,ox,x,b,c,d,i,s,eps;
if(n==y)return n;
s=1;if(n<0&&y<0){s=-1;n=-n;y=-y}
if(n<0||y<0){print "inv_arigeomean: mismatched signs\n";return 0}
if(n<y){x=y;y=n;n=x}
n/=y
scale+=2;eps=A^-scale;scale+=4
ns=scale
x=n*(1+ln(n));ox=-1
for(i=0;i<A;i++){
# try to force quadratic convergence
if(abs(x-ox)<eps){i=-1;break}
ox=x;scale+=scale
b=x+x/n*(n-arigeomean(1,x));
c=b+b/n*(n-arigeomean(1,b));
d=b+b-c-x
if(d){x=(b*b-c*x)/d}else{x=b;i=-1;break}
scale=ns
}
if(i!=-1){
# give up and converge linearly
x=(x+ox)/2
while(abs(x-ox)>eps){ox=x;x+=x/n*(n-arigeomean(1,x))}
}
x+=5*eps
scale-=6;return x*y/s
}

2
gpg-agent.conf Normal file
View file

@ -0,0 +1,2 @@
#pinentry-program /usr/bin/pinentry-curses
allow-loopback-pinentry

2
gpg.conf Normal file
View file

@ -0,0 +1,2 @@
default-key XXXXXXXX
#pinentry-mode loopback

17
gtk-3.0-settings.ini Normal file
View file

@ -0,0 +1,17 @@
[Settings]
gtk-theme-name=TraditionalOk
gtk-icon-theme-name=Fog
gtk-font-name=Luxi Sans 12
gtk-cursor-theme-name=mate
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=0
gtk-enable-input-feedback-sounds=0
gtk-dialogs-use-header=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintslight
gtk-xft-rgba=none

19
gtkrc-2.0 Normal file
View file

@ -0,0 +1,19 @@
# DO NOT EDIT! This file will be overwritten by LXAppearance.
# Any customization should be done in ~/.gtkrc-2.0.mine instead.
gtk-theme-name="TraditionalOk"
gtk-icon-theme-name="Fog"
gtk-font-name="Luxi Sans 12"
gtk-cursor-theme-name="mate"
gtk-cursor-theme-size=24
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=0
gtk-enable-input-feedback-sounds=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle="hintslight"
gtk-xft-rgba="none"
include ".gtkrc-2.0.mine"

17
mailrc Normal file
View file

@ -0,0 +1,17 @@
account smtps_example {
set from=me@mydomain.com
set smtp-hostname=my.laptop
set mta=smtps://login:password@smtp.server:465
set smtp-auth=login
set tls-verify=ignore
set v15-compat=1
}
account starttls_example {
set from=user@my.laptop
set smtp-hostname=my.laptop
set mta=smtp://login:password@mail.server:465
set smtp-use-starttls
set smtp-auth=plain
set tls-verify=ignore
set v15-compat=1
}

37
muttrc Normal file
View file

@ -0,0 +1,37 @@
# general settings
set editor=vim
#set pager="less -c"
set help
set include
set noprompt_after
set reply_to
set read_inc=25
set write_inc=25
set sort=threads
set nomove
# header configuration
ignore *
unignore from: to: date: subject: cc: reply-to:
# color definitions
color hdrdefault cyan black
color quoted green black
color signature cyan black
color attachment brightyellow black
color indicator black cyan
color status brightgreen blue
color tree red black
color markers brightred black
color tilde blue black
#color header brightgreen black ^From:
#color header brightcyan black ^To:
#color header brightcyan black ^Reply-To:
#color header brightcyan black ^Cc:
#color header brightblue black ^Subject:
#color body brightred black [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
#color body brightblue black (http|ftp)://[\-\.\,/%~_:?\#a-zA-Z0-9]+
# attributes when using a mono terminal
mono header underline ^(From|Subject):
mono quoted bold

1
netrc Normal file
View file

@ -0,0 +1 @@
machine dav.server.com login user@host.com password XXXXXXXX

15
petrifiedrc Normal file
View file

@ -0,0 +1,15 @@
DDNS_KEY=<secret string>
DDNS_CHECK="http://4.icanhazip.com"
CURL_WAIT=10
LOCAL_MODE=1
LOCAL_IF=wlp3s0
LOCAL_IV=4
USE_JOURNAL=1
USE_SYSLOG=0
USE_STDOUT=0
USE_LOGFILE=0
PET_LOG=/var/log/petrified.log
USE_PID=1
PET_PID=/tmp/petrified.pid
USE_LIP=1
PET_LIP=/tmp/lastip.dat

48
pikaur.conf Normal file
View file

@ -0,0 +1,48 @@
[sync]
alwaysshowpkgorigin = no
develpkgsexpiration = -1
upgradesorting = pkgname
showdownloadsize = no
ignoreoutofdateaurupgrades = no
[build]
keepbuilddir = no
keepdevbuilddir = no
skipfailedbuild = no
alwaysusedynamicusers = no
keepbuilddeps = no
ignorearch = no
[colors]
version = 10
versiondiffold = 11
versiondiffnew = 9
[ui]
requireenterconfirm = yes
printcommands = no
reversesearchsorting = no
aursearchsorting = hottest
displaylastupdated = no
groupbyrepository = yes
[misc]
sudoloopinterval = -1
pacmanpath = pacman
debug = no
privilegeescalationtool = sudo
[network]
socks5proxy =
aururl = https://aur.archlinux.org
newsurl = https://www.archlinux.org/feeds/news/
aurhttpproxy =
aurhttpsproxy =
[review]
noedit = yes
donteditbydefault = yes
nodiff = yes
gitdiffargs = --ignore-space-change,--ignore-all-space
diffpager = auto
hidedifffiles = .SRCINFO

5
profile.osx Normal file
View file

@ -0,0 +1,5 @@
PATH=$PATH:~/bin
PS1='[\u@\h $PWD]\n$ '
CLICOLOR=1
LSCOLORS="Exfxcxdxbxegedabagacad"
export PATH PS1 CLICOLOR LSCOLORS

3
qtrc Normal file
View file

@ -0,0 +1,3 @@
[General]
enableXft=true
useXft=true

1
screenrc Normal file
View file

@ -0,0 +1 @@
startup_message off

15
toprc Normal file
View file

@ -0,0 +1,15 @@
top's Config File (Linux processes with windows)
Id:i, Mode_altscr=0, Mode_irixps=1, Delay_time=3.0, Curwin=0
Def fieldscur=¥&K¨³´»½@·º¹56ÄFÅ')*+,-./0128<>?ABCGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=192564, sortindx=18, maxtasks=0, graph_cpus=0, graph_mems=0
summclr=1, msgsclr=1, headclr=3, taskclr=1
Job fieldscur=¥¦¹·º(³´Ä»½@<§Å)*+,-./012568>?ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=163124, sortindx=0, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=6, msgsclr=6, headclr=7, taskclr=6
Mem fieldscur=¥º»<½¾¿ÀÁMBNÃD34·Å&'()*+,-./0125689FGHIJKLOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=163124, sortindx=21, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=5, msgsclr=5, headclr=4, taskclr=5
Usr fieldscur=¥¦§¨ª°¹·ºÄÅ)+,-./1234568;<=>?@ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
winflags=163124, sortindx=3, maxtasks=0, graph_cpus=2, graph_mems=0
summclr=3, msgsclr=3, headclr=2, taskclr=3
Fixed_widest=0, Summ_mscale=0, Task_mscale=1, Zero_suppress=0

174
vimrc Normal file
View file

@ -0,0 +1,174 @@
" ~/.vimrc
" This must be first - it changes other options as a side effect
set nocompatible " use Vim settings, rather then Vi settings
set shortmess+=I " get rid of the intro screen on blank file
set background=dark " this works better for text mode white-on-black terms
set backspace=2 " allow backspacing over everything in insert mode
set esckeys " allow cursor keys in insert mode
set noautoindent " always set autoindenting off
set shiftwidth=4 " number of spaces used for autoindent insertions
set tabstop=4 " tabstop positions
set nobackup " backups are for wimps
set history=250 " keep 250 lines of command line history
set noerrorbells " damn that beep to hell
set visualbell " enable terminal visual bell, but...
set t_vb= " ...unset the code to do it. (MacVim needs this)
set magic " use 'magic' patterns (extended regexp) in search
set ignorecase " ignore case during searches
set smartcase " all lower/upper = case insensitive, \c \C overrides
set laststatus=2 " show status line, even if only one buffer
set report=0 " show report on all (0) changes
set lazyredraw " do not update screen while executing macros
set ruler " show the cursor position all the time
set showcmd " show current uncompleted command
set showmode " show current mode
set showmatch " show matching brackets
" tone down that dang bold highlighting, folks
" highlight=8b,db,es,hs,mb,Mn,nu,rs,sr,tb,vr,ws
set highlight=8r,db,es,hs,mb,Mr,nu,rs,sr,tb,vr,ws
" do not jump to first character with page commands, ie keep the cursor
" in the current column.
set nostartofline
" what info to store from an editing session in the viminfo file
set viminfo='50,\"100,:100,n~/.viminfo
" allow the last line to be a modeline - useful when
" the last line gives the preferred textwidth
set modeline
set modelines=1
" add the dash ('-'), the dot ('.'), and the '@' as "letters" to "words".
" this makes it possible to expand email addresses, eg: joe-www@foo.org
set iskeyword=@,48-57,_,192-255,-,.,@-@
" which chars/keys to allow eol wrapping (:help whichwrap)
set whichwrap=<,>,[,]
" enable wrapping but without linebreaks
set wrap
set linebreak
set nolist " list disables linebreak
set textwidth=0
set wrapmargin=0
set formatoptions+=l
" When you forgot to sudo before editing a file
cmap w!! w !sudo tee > /dev/null %
" When the backspace key sends a "delete" character
" then you simply map the "delete" to a "backspace" (CTRL-H):
map <Del> <C-H>
" Don't use Ex mode, use Q for formatting
map Q gq
" Make shift-insert work like in Xterm
map <S-Insert> <MiddleMouse>
map! <S-Insert> <MiddleMouse>
" Make p in Visual mode replace the selected text with the "" register.
vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
" GVIM preferences
if has("gui_running")
" CUA Mode (shift+arrows select in insert mode, etc.)
source $VIMRUNTIME/mswin.vim
set showtabline=2 " always show the tab bar
set guioptions-=tT " turn off the menu tearoffs
set guicursor+=a:blinkon0 " turn off the blinking cursor
set t_Co=256 " 256 colors
set lines=26 columns=80 " we like 80x24
" mostly mimic cli colors from syncolor.vim - white text, black bg
hi Normal guifg=White guibg=Black gui=NONE
hi Comment guifg=LightBlue gui=NONE
hi Constant guifg=LightMagenta gui=NONE
hi Special guifg=LightRed gui=NONE
hi Identifier guifg=Cyan gui=NONE
hi Statement guifg=Yellow gui=NONE
hi PreProc guifg=LightBlue gui=NONE
hi Type guifg=LightGreen gui=NONE
hi Underlined guifg=LightBlue gui=NONE
hi Ignore guifg=Black gui=NONE
hi Error guifg=White guibg=Red gui=NONE
hi Todo guifg=Blue guibg=Yellow gui=NONE
hi link String Constant
hi link Character Constant
hi link Number Constant
hi link Boolean Constant
hi link Float Number
hi link Function Identifier
hi link Conditional Statement
hi link Repeat Statement
hi link Label Statement
hi link Operator Statement
hi link Keyword Statement
hi link Exception Statement
hi link Include PreProc
hi link Define PreProc
hi link Macro PreProc
hi link PreCondit PreProc
hi link StorageClass Type
hi link Structure Type
hi link Typedef Type
hi link Tag Special
hi link SpecialChar Special
hi link Delimiter Special
hi link SpecialComment Special
hi link Debug Special
let os=substitute(system('uname'), '\n', '', '')
if os == 'Darwin' || os == 'Mac'
set guifont=Menlo:h16
elseif os == 'Linux'
set guifont=Monospace\ 12
endif
function! GuiTabLabel()
let label = ''
let bufnrlist = tabpagebuflist(v:lnum)
" Add '+' if one of the buffers in the tab page is modified
for bufnr in bufnrlist
if getbufvar(bufnr, "&modified")
let label = '+'
break
endif
endfor
" Append the tab number
let label .= v:lnum.': '
" Append the buffer name
let name = bufname(bufnrlist[tabpagewinnr(v:lnum) - 1])
if name == ''
" give a name to no-name documents
if &buftype=='quickfix'
let name = '[Quickfix]'
else
let name = '[No Name]'
endif
else
" get only the file name
let name = fnamemodify(name,":t")
endif
let label .= name
return label
endfunction
set guitablabel=%{GuiTabLabel()}
endif