dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit d1d2fa6978bcadcc03d0d72d306e0f2a71cd2190
parent 5a81957052b3163b89d655226458d5779b045ad0
Author: Hayden Hamilton <hayden@haydenvh.com>
Date:   Mon,  1 Jun 2020 22:33:13 +0100

.

Diffstat:
M.config/alias | 1+
M.config/neomutt/neomuttrc | 2+-
A.config/nvim/after/syntax/zsh.vim | 8++++++++
M.config/nvim/init.vim | 3+++
M.config/nvim/modules/term.vim | 16+++++++++++++++-
A.config/nvim/modules/textmanipulation.vim | 12++++++++++++
M.config/vimb/config | 1+
M.config/zsh/.zshrc | 1+
M.config/zsh/alias.zsh | 1+
D.config/zsh/functions.zsh | 69---------------------------------------------------------------------
A.config/zsh/functions/0x0.zsh | 3+++
A.config/zsh/functions/colotable.zsh | 13+++++++++++++
A.config/zsh/functions/cu.zsh | 3+++
A.config/zsh/functions/diary.zsh | 13+++++++++++++
A.config/zsh/functions/encsign.zsh | 4++++
A.config/zsh/functions/fdalias.zsh | 5+++++
A.config/zsh/functions/fdconf.zsh | 4++++
A.config/zsh/functions/fdfunc.zsh | 4++++
A.config/zsh/functions/fdscripts.zsh | 4++++
A.config/zsh/functions/hb.zsh | 3+++
A.config/zsh/functions/help.zsh | 7+++++++
A.config/zsh/functions/ix.zsh | 3+++
A.config/zsh/functions/me0w.zsh | 3+++
A.config/zsh/functions/newtab.zsh | 4++++
A.config/zsh/functions/radio.zsh | 3+++
A.config/zsh/functions/sttab.zsh | 3+++
A.config/zsh/functions/yt.zsh | 3+++
M.config/zsh/ls.zsh | 9++++++++-
M.scripts/custom/dock | 2+-
29 files changed, 134 insertions(+), 73 deletions(-)

diff --git a/.config/alias b/.config/alias @@ -38,6 +38,7 @@ homesync rsync --port 222 --delete -azPe 'ssh -p 222' --exclude=general --exclud tmux \tmux -f $HOME/.config/tmux/config notes vim ~/.local/notes fwknop fwknop --rc-file=$HOME/.config/fwknop/config --save-args-file=/dev/full +edconf nvim ~/.config/zsh/.zshrc ~d cd ~/general/downloads; ls ~do cd ~/general/documents; ls ~iw cd ~/images/wallpapers; ls diff --git a/.config/neomutt/neomuttrc b/.config/neomutt/neomuttrc @@ -11,7 +11,7 @@ set record = "~/general/mail/sent" set postponed = "~/general/mail/drafts" set trash = "~/general/mail/rubbish" # mailboxes =inbox =sent =drafts =rubbish # These are probably what you want -mailboxes =inbox =sent =drafts =rubbish ="===============" =exmouth =exmouthsent =exmouthrubbish# Configured by my mkmailbox script +mailboxes =inbox =sent =drafts =rubbish =spam ="===============" =exmouth =exmouthsent =exmouthrubbish# Configured by my mkmailbox script set mbox_type = Maildir diff --git a/.config/nvim/after/syntax/zsh.vim b/.config/nvim/after/syntax/zsh.vim @@ -0,0 +1,8 @@ +if exists("b:current_syntax") + unlet b:current_syntax +endif +syn include @AWKScript syntax/awk.vim +syn region AWKScriptCode matchgroup=AWKCommand start=+[=\\]\@<!'+ skip=+\\'+ end=+'+ contains=@AWKScript contained +syn region AWKScriptEmbedded matchgroup=AWKCommand start=+\<awk\>+ skip=+\\$+ end=+[=\\]\@<!'+me=e-1 contains=@shIdList,@shExprList2 nextgroup=AWKScriptCode +syn cluster shCommandSubList add=AWKScriptEmbedded +hi def link AWKCommand statement diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -68,6 +68,7 @@ noremap <leader>cd :chdir noremap <leader>ca :ColorizerAttachToBuffer<CR> noremap <leader>cd :ColorizerDetachFromBuffer<CR> noremap <leader>C :!sudo make all install clean<CR> +noremap <leader>CC :call Centre()<CR> noremap <leader>oc :!groff -T pdf % - > /tmp/grff \| zathura -<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left> noremap <leader>sv :!sent % \| set linebreak<CR> noremap <leader>sc :setlocal spell! spelllang=en_us \| set linebreak<CR> @@ -93,6 +94,7 @@ noremap <leader>sp o<esc>pi noremap <leader>Ee :edit noremap <leader>yv :reg<CR> noremap <leader>8 :set colorcolumn=80<CR>:set tw=80<CR>:set fo+=t<CR> +noremap <leader>Gi :!git noremap <leader>nn :set number! relativenumber!<CR> noremap <leader><leader>nn :setlocal number! relativenumber!<CR> @@ -203,6 +205,7 @@ source ~/.config/nvim/modules/window.vim source ~/.config/nvim/modules/message.vim source ~/.config/nvim/modules/openc.vim source ~/.config/nvim/modules/filetype.vim +source ~/.config/nvim/modules/textmanipulation.vim " quick-scope let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] diff --git a/.config/nvim/modules/term.vim b/.config/nvim/modules/term.vim @@ -2,10 +2,23 @@ function! Termstart() let s="term" if stridx(expand('%:p'), s) == '0' setlocal nonumber norelativenumber - setlocal notermguicolors endif endfunction +function! Termend() + let s="term" + if stridx(expand('%:p'), s) == '0' + set termguicolors + endif +endfunction + +function! Quickterm() + call Shwin() + setlocal winhl=Normal:Float + set notermguicolors + terminal +endfunction + function! Shmenu(dir, prompt) call Shwin() setlocal winhl=Normal:Float @@ -28,4 +41,5 @@ endfunction augroup terminal autocmd WinNew,BufNew,BufNewFile,BufEnter,WinEnter * call Termstart() + autocmd WinLeave,BufLeave,BufWinLeave * call Termend() augroup END diff --git a/.config/nvim/modules/textmanipulation.vim b/.config/nvim/modules/textmanipulation.vim @@ -0,0 +1,12 @@ +function! Centre() + exec 's/^[[:space:]]*//' + normal $ + let cols=col(".")+1 + let offset=(80-cols)/2 + let c=0 + while c < offset + let c+=1 + exec 's/^/ /' + endwhile + echo c +endfunction diff --git a/.config/vimb/config b/.config/vimb/config @@ -20,6 +20,7 @@ nnoremap Q :q!<CR> nmap B :sh! mpv "$(xclip -o)"<CR> nnoremap h <C-o> +nnoremap l <C-i> shortcut-add sx=https://searx.me/ shortcut-add sch=https://occusearch.de/?q=$0 diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc @@ -75,6 +75,7 @@ typeset -A ZSH_HIGHLIGHT_STYLES ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=5,bold' ZSH_HIGHLIGHT_STYLES[command]='fg=13' +ZSH_HIGHLIGHT_STYLES[function]='fg=13,bold' ZSH_HIGHLIGHT_STYLES[alias]='fg=13,bold' ZSH_HIGHLIGHT_STYLES[reserved-word]='fg=13,underline,bold' ZSH_HIGHLIGHT_STYLES[builtin]='fg=13,underline,bold' diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh @@ -51,6 +51,7 @@ alias homesync=" rsync --port 222 --delete -azPe 'ssh -p 222' --exclude=general alias tmux=" \tmux -f $HOME/.config/tmux/config" alias notes=" vim ~/.local/notes" alias fwknop=" fwknop --rc-file=$HOME/.config/fwknop/config --save-args-file=/dev/full" +alias edconf=" nvim ~/.config/zsh/.zshrc" alias ~d=" cd ~/general/downloads; ls" alias ~do=" cd ~/general/documents; ls" alias ~iw=" cd ~/images/wallpapers; ls" diff --git a/.config/zsh/functions.zsh b/.config/zsh/functions.zsh @@ -1,69 +0,0 @@ -0x0(){ - curl -n -F "file=@/dev/stdin" https://0x0.st < /dev/stdin | tee /dev/stderr | xclip -} - -ix(){ - curl -n -F "f:1=<-" http://ix.io < /dev/stdin | tee /dev/stderr | xclip -} - -yt(){ - cgo "haydenh.null/7/exec/idiot/youtube/gopher.dcgi" -} - -me0w(){ - echo "gopher://me0w.net/0/pit/$(nc me0w.net 31415 < /dev/stdin)" | tee /dev/stderr |xclip -} - -hb(){ - nc haydenh.null 9999 < /dev/stdin | tee /dev/stderr | xclip -} - -colotable(){ - o=0 - for ((i=0;i<256;i++)) - do - [ $o -gt 5 ] && printf "\n" && o=0 - o=$(($o+1)) - tput setaf $i - printf " %03d " "$i" - tput setab $i - printf " " - tput sgr0 - done -} - -encsign(){ - [ "$1" = "--help" ] && echo '$1=recipient $2=file' && exit 1 - gpg --encrypt --sign --armor -r $1 $2 -} - -cu(){ - sh $HOME/.scripts/custom/$1 -} - -radio(){ - mpv $1 --input-ipc-server=/tmp/mpv-socket3 -} - -diary(){ - date=$(date +%d%m%y) - wdate=$(date +%d/%m/%y) - echo "===private===" > ~/.local/privated - echo "#Daily Entry - $wdate" > ~/.local/public.gph - - phlog="$HOME/net/alcl/write" - mkdir -p $phlog/daily.entries ~/.local/diary - vim -O ~/.local/public.gph ~/.local/privated - printf '.txt or .gph?'; read ftype < /dev/tty - mv ~/.local/public.gph $phlog/daily.entries/entry.of.$date.$ftype - mv ~/.local/privated ~/.local/diary/$date -} - -sttab(){ - nohup tabbed st -w > /tmp/txid & -} - -newtab(){ - read txid < /tmp/txid - nohup st -w $txid -e cgo haydenh.null > /dev/null & -} diff --git a/.config/zsh/functions/0x0.zsh b/.config/zsh/functions/0x0.zsh @@ -0,0 +1,3 @@ +0x0(){ + curl -n -F "file=@/dev/stdin" https://0x0.st < /dev/stdin | tee /dev/stderr | xclip +} diff --git a/.config/zsh/functions/colotable.zsh b/.config/zsh/functions/colotable.zsh @@ -0,0 +1,13 @@ +colotable(){ + o=0 + for ((i=0;i<256;i++)) + do + [ $o -gt 5 ] && printf "\n" && o=0 + o=$(($o+1)) + tput setaf $i + printf " %03d " "$i" + tput setab $i + printf " " + tput sgr0 + done +} diff --git a/.config/zsh/functions/cu.zsh b/.config/zsh/functions/cu.zsh @@ -0,0 +1,3 @@ +cu(){ + sh $HOME/.scripts/custom/$1 +} diff --git a/.config/zsh/functions/diary.zsh b/.config/zsh/functions/diary.zsh @@ -0,0 +1,13 @@ +diary(){ + date=$(date +%d%m%y) + wdate=$(date +%d/%m/%y) + echo "===private===" > ~/.local/privated + echo "#Daily Entry - $wdate" > ~/.local/public.gph + + phlog="$HOME/net/alcl/write" + mkdir -p $phlog/daily.entries ~/.local/diary + vim -O ~/.local/public.gph ~/.local/privated + printf '.txt or .gph?'; read ftype < /dev/tty + mv ~/.local/public.gph $phlog/daily.entries/entry.of.$date.$ftype + mv ~/.local/privated ~/.local/diary/$date +} diff --git a/.config/zsh/functions/encsign.zsh b/.config/zsh/functions/encsign.zsh @@ -0,0 +1,4 @@ +encsign(){ + [ "$1" = "--help" ] && echo '$1=recipient $2=file' && exit 1 + gpg --encrypt --sign --armor -r $1 $2 +} diff --git a/.config/zsh/functions/fdalias.zsh b/.config/zsh/functions/fdalias.zsh @@ -0,0 +1,5 @@ +fdalias(){ + alias=$(alias | awk 'BEGIN { FS="=" }; // { print $1 }' | shmenu 'alias') + echo + alias $alias +} diff --git a/.config/zsh/functions/fdconf.zsh b/.config/zsh/functions/fdconf.zsh @@ -0,0 +1,4 @@ +fdconf(){ + conf=$(find $XDG_CONFIG_HOME -type f | sed "s~^.*$XDG_CONFIG_HOME/~~g" | shmenu 'config') + $EDITOR $XDG_CONFIG_HOME/$conf +} diff --git a/.config/zsh/functions/fdfunc.zsh b/.config/zsh/functions/fdfunc.zsh @@ -0,0 +1,4 @@ +fdfunc(){ + func=$(find $XDG_CONFIG_HOME/zsh/functions/ -type f | awk 'BEGIN { FS="/" }; // {print $NF}' | sed 's/\.zsh$//g' | shmenu 'function') + $EDITOR $XDG_CONFIG_HOME/zsh/functions/$func.zsh +} diff --git a/.config/zsh/functions/fdscripts.zsh b/.config/zsh/functions/fdscripts.zsh @@ -0,0 +1,4 @@ +fdscripts(){ + script=$(find ~/.scripts/ -type f | sed "s~^.*\.scripts/~~g" | shmenu scripts) + $EDITOR ~/.scripts/$script +} diff --git a/.config/zsh/functions/hb.zsh b/.config/zsh/functions/hb.zsh @@ -0,0 +1,3 @@ +hb(){ + nc haydenh.null 9999 < /dev/stdin | tee /dev/stderr | xclip +} diff --git a/.config/zsh/functions/help.zsh b/.config/zsh/functions/help.zsh @@ -0,0 +1,7 @@ +help(){ + echo "fdalias - find & view alias' +fdfunc - find & view functions +edconf - edit zsh config +fdconf - find & view config files +fdscripts - find & view scripts" +} diff --git a/.config/zsh/functions/ix.zsh b/.config/zsh/functions/ix.zsh @@ -0,0 +1,3 @@ +ix(){ + curl -n -F "f:1=<-" http://ix.io < /dev/stdin | tee /dev/stderr | xclip +} diff --git a/.config/zsh/functions/me0w.zsh b/.config/zsh/functions/me0w.zsh @@ -0,0 +1,3 @@ +me0w(){ + echo "gopher://me0w.net/0/pit/$(nc me0w.net 31415 < /dev/stdin)" | tee /dev/stderr |xclip +} diff --git a/.config/zsh/functions/newtab.zsh b/.config/zsh/functions/newtab.zsh @@ -0,0 +1,4 @@ +newtab(){ + read txid < /tmp/txid + nohup st -w $txid -e cgo haydenh.null > /dev/null & +} diff --git a/.config/zsh/functions/radio.zsh b/.config/zsh/functions/radio.zsh @@ -0,0 +1,3 @@ +radio(){ + mpv $1 --input-ipc-server=/tmp/mpv-socket3 +} diff --git a/.config/zsh/functions/sttab.zsh b/.config/zsh/functions/sttab.zsh @@ -0,0 +1,3 @@ +sttab(){ + nohup tabbed st -w > /tmp/txid & +} diff --git a/.config/zsh/functions/yt.zsh b/.config/zsh/functions/yt.zsh @@ -0,0 +1,3 @@ +yt(){ + cgo "haydenh.null/7/exec/idiot/youtube/gopher.dcgi" +} diff --git a/.config/zsh/ls.zsh b/.config/zsh/ls.zsh @@ -4,6 +4,7 @@ export LS_COLORS="$(echo 'di=35 :ln=33 :ex=91;01 :*.sh=91 +:*.zsh=91 :*.hex=91 :*.html=92 :*.css=97 @@ -15,9 +16,15 @@ export LS_COLORS="$(echo 'di=35 :*.h.rej=94;01 :*.mk=96 :*LICENSE=90 +:*FAQ=90 +:*MODIFIED=90 +:*DESIGN=90 :*Makefile=90 :*make.sh=90 -:*README=97 +:*configure=90 +:*configure.sh=90 +:*autogen.sh=90 +:*README=90 :*TODO=97 :*.c.orig=94;01 :*.c.rej=94;01 diff --git a/.scripts/custom/dock b/.scripts/custom/dock @@ -6,4 +6,4 @@ do done xrandr $ds --output VGA1 --mode 1920x1080 --primary --pos 0x0 -xrandr --output HDMI2 --mode 1920x1080 --pos 1920x0 --rotate left +xrandr --output HDMI1 --mode 1920x1080 --pos 1920x0 --rotate left