diff options
-rw-r--r-- | .bash_aliases | 46 | ||||
-rw-r--r-- | .bash_profile (renamed from .profile) | 4 | ||||
-rw-r--r-- | .bashrc | 44 | ||||
-rwxr-xr-x | .config/herbstluftwm/calc.sh | 27 | ||||
-rw-r--r-- | .vimrc | 25 | ||||
-rw-r--r-- | .xinitrc | 4 |
6 files changed, 84 insertions, 66 deletions
diff --git a/.bash_aliases b/.bash_aliases new file mode 100644 index 0000000..6d1796d --- /dev/null +++ b/.bash_aliases @@ -0,0 +1,46 @@ +#!/bin/bash + +export EDITOR="vim" +export PAGER="less -R" + +alias ls='ls --color=auto' +alias grep='grep --color=auto' +alias diff='colordiff' +alias less='less -R' + +alias vmount='udevil mount' +alias vumount='udevil umount' +alias def='sdcv' + +send() { + if [ "$1" ]; then + scp $@ shmibbles.me:/srv/http/tmp/ + if [ $? -eq 0 ]; then + for name in "$@" + do + name=$(echo "http://shmibbles.me/tmp/$(basename $name)" | sed 's/ /%20/g') + echo $name | tr -d '\n' | xclip -i -selection clipboard + echo $name | tr -d '\n' | xclip -i -selection primary + done + fi + else + echo "specify at least one file to send" + fi +} + +sendi() { + if [ "$1" ]; then + scp $@ shmibbles.me:/srv/http/img/ + if [ $? -eq 0 ]; then + for name in "$@" + do + name=$(echo "http://shmibbles.me/img/$(basename $name)" | sed 's/ /%20/g') + echo $name | tr -d '\n' | xclip -i -selection clipboard + echo $name | tr -d '\n' | xclip -i -selection primary + done + fi + else + echo "specify at least one file to send" + fi +} + @@ -1,4 +1,4 @@ -# /etc/profile +# /home/shmibs/.bash_profile #Set our umask umask 022 @@ -26,4 +26,4 @@ unset TERMCAP # Man is much better than us at figuring this out unset MANPATH -export EDITOR="vim" +source ~/.bash_aliases @@ -30,46 +30,4 @@ esac [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion -export EDITOR="vim" -export PAGER="less -R" - -alias ls='ls --color=auto' -alias grep='grep --color=auto' -alias diff='colordiff' -alias less='less -R' - -alias vmount='udevil mount' -alias vumount='udevil umount' -alias def='sdcv' - -send() { - if [ "$1" ]; then - scp $@ shmibbles.me:/srv/http/tmp/ - if [ $? -eq 0 ]; then - for name in "$@" - do - name=$(echo "http://shmibbles.me/tmp/$(basename $name)" | sed 's/ /%20/g') - echo $name | tr -d '\n' | xclip -i -selection clipboard - echo $name | tr -d '\n' | xclip -i -selection primary - done - fi - else - echo "specify at least one file to send" - fi -} - -sendi() { - if [ "$1" ]; then - scp $@ shmibbles.me:/srv/http/img/ - if [ $? -eq 0 ]; then - for name in "$@" - do - name=$(echo "http://shmibbles.me/img/$(basename $name)" | sed 's/ /%20/g') - echo $name | tr -d '\n' | xclip -i -selection clipboard - echo $name | tr -d '\n' | xclip -i -selection primary - done - fi - else - echo "specify at least one file to send" - fi -} +source ~/.bash_aliases diff --git a/.config/herbstluftwm/calc.sh b/.config/herbstluftwm/calc.sh index 0f7ddfb..358f43d 100755 --- a/.config/herbstluftwm/calc.sh +++ b/.config/herbstluftwm/calc.sh @@ -8,19 +8,26 @@ e="2.7182818284590452353602874713526624977572471" while [ "$in" != "" ]; do in=$(echo "" | dmenu -q -h 18 -nb $1 -nf $2 -sb $3 -sf $4 -p "$prompt") - out=$(echo "pi=$pi; e=$e; $acc $in" | calc -p 2>&1 | tr -d "\n") - - if [ "$out" = "Missing operator" ]; then - out=$(echo "pi=$pi; e=$e; $in" | calc -p 2>&1) - fi + # replace "ans" with the previous value + in=$(echo $in | sed -e "s/ans/$acc/g") - # check for error output + out=$(echo "pi=$pi; e=$e; $acc $in" | calc -p 2>&1) + if [ "${?#0}" != "" ]; then out=$(echo "$out" | tr -d "\n") - prompt="calc: ($acc) err: $out" - else - acc=$out - prompt="calc: ($acc)" + if [ "$out" = "Missing operator" ]; then + out=$(echo "pi=$pi; e=$e; $in" | calc -p 2>&1) + if [ "${?#0}" != "" ]; then + out=$(echo "$out" | tr -d "\n") + prompt="calc: ($acc) err: $out" + else + acc=$out + prompt="calc: ($acc)" + fi + else + out=$(echo "$out" | tr -d "\n") + prompt="calc: ($acc) err: $out" + fi fi done @@ -7,20 +7,23 @@ set autoindent colorscheme anotherdark set background=dark -"tab controls to match pentadactyl -noremap <C-n> <Esc>:tabn<CR> -noremap <C-p> <Esc>:tabp<CR> -noremap <C-t> <Esc>:tabnew<CR> +"enable status-line +set laststatus=2 + +"allow edited background buffers +set hidden + +"buffer controls to match pentadactyl +noremap <C-n> <Esc>:bn<CR> +noremap <C-p> <Esc>:bp<CR> +noremap <C-t> <Esc>:badd<Space> +noremap <C-g> <Esc>:buffers<CR>:b<Space> "insert lines above and below with (=|+) "very hackish, but i couldn't think of a better way nnoremap = Oa<C-u><Esc>j nnoremap + oa<C-u><Esc>k -"disable auto session save/load -let g:session_autosave = 'no' -let g:session_autoload = 'no' - "folds! nnoremap fo zO nnoremap fc zC @@ -28,8 +31,8 @@ nnoremap fm zM nnoremap fr zR "copy words from above and below the cursor -inoremap <expr> <c-y> pumvisible() ? "\<c-y>" : matchstr(getline(line('.')-1), '\%' . virtcol('.') . 'v\%(\k\+\\|.\)') -inoremap <expr> <c-e> pumvisible() ? "\<c-e>" : matchstr(getline(line('.')+1), '\%' . virtcol('.') . 'v\%(\k\+\\|.\)') +inoremap <expr> <C-y> pumvisible() ? "\<C-y>" : matchstr(getline(line('.')-1), '\%' . virtcol('.') . 'v\%(\k\+\\|.\)') +inoremap <expr> <C-e> pumvisible() ? "\<C-e>" : matchstr(getline(line('.')+1), '\%' . virtcol('.') . 'v\%(\k\+\\|.\)') "use the X clipboard for things when running in a virtual terminal, because yes if &term != "linux" @@ -90,5 +93,5 @@ endfunction function! Settings_vim() setlocal smartindent - noremap -- A<Space>"<Space> + noremap -- A<Space>" endfunction @@ -16,6 +16,10 @@ export QT_IM_MODULE=fcitx export XMODIFIERS="@im=fcitx" fcitx & +#disable power saving +xset -dpms +xset s off + #urxvt daemon urxvtd & |