dotfiles

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

commit d58ebb0941b513a83bb07d33c450428b9f83de7c
parent cbd87e83a8da0f5031098dcbd61fceb664d35dce
Author: Hayden Hamilton <hayden@haydenvh.com>
Date:   Wed, 13 May 2020 18:12:33 +0100

stuffs

Diffstat:
M.config/alias | 8++++----
M.config/irssi/config | 2+-
M.config/mpv/mpv.conf | 2+-
A.config/nvim/after/syntax/sh.vim | 8++++++++
M.config/nvim/colors/haydenh.vim | 5+++--
A.config/nvim/ftdetect/gph.vim | 2++
A.config/nvim/ftdetect/greet.vim | 2++
M.config/nvim/init.vim | 4++--
M.config/nvim/modules/filetype.vim | 26++++++++++++++++++++++----
A.config/nvim/syntax/gph.vim | 22++++++++++++++++++++++
M.config/zsh/alias.zsh | 8++++----
M.config/zsh/functions.zsh | 17++++++-----------
M.scripts/bin/misc/lsc | 14+++++++-------
D.scripts/bin/misc/schedule | 128-------------------------------------------------------------------------------
M.scripts/dwmblocks/dwmbar | 2+-
15 files changed, 85 insertions(+), 165 deletions(-)

diff --git a/.config/alias b/.config/alias @@ -1,7 +1,7 @@ -l \ls --color -la \ls --color -A -ll \ls --color -lh -lla \ls --color -lAh +l \lsc +la \lsc -A +ll \lsc -lh +lla \lsc -lAh r \rm rr \rm -rf m \mv diff --git a/.config/irssi/config b/.config/irssi/config @@ -255,7 +255,7 @@ settings = { core = { real_name = "haydenh"; user_name = "haydenh"; - nick = "haydenh_"; + nick = "haydenh"; recode_transliterate = "no"; timestamp_format = "%H:%M:%S"; }; diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf @@ -1,3 +1,3 @@ vo=xv -ytdl-format="(bestvideo[height<=1080]+bestaudio)[ext=webm]/bestvideo[height<=1080]+bestaudio/best[height<=180]/bestvideo+bestaudio/best" +ytdl-format="(bestvideo[height<=1080]+bestaudio)[ext=webm]/bestvideo[height<=1080]+bestaudio/best[height<=1080]/bestvideo+bestaudio/best" diff --git a/.config/nvim/after/syntax/sh.vim b/.config/nvim/after/syntax/sh.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/colors/haydenh.vim b/.config/nvim/colors/haydenh.vim @@ -43,9 +43,9 @@ hi FoldColumn cterm=none ctermfg=249 ctermbg=1 guifg=#b2b2b2 gui=none " Following section entirely created by Hayden Hamilton hi Error ctermfg=10 ctermbg=0 guifg=#892b2b guibg=#141726 gui=none -hi NvimInternalError ctermfg=10 ctermbg=0 guifg=#892b2b guibg=#141726 gui=none +hi link NvimInternalError Error hi ErrorMsg ctermfg=0 ctermbg=10 guibg=#892b2b guifg=#141726 gui=none -hi WarningMsg ctermfg=0 ctermbg=10 guibg=#590b0b guifg=#141726 gui=none +hi link WarningMsg ErrorMsg hi MsgArea ctermbg=0 guibg=#141726 gui=none hi MsgSeparator ctermbg=1 guibg=#24283c gui=none hi Todo cterm=bold ctermbg=3 ctermfg=255 guibg=#31364b guifg=#eeeeee gui=none,bold @@ -62,3 +62,4 @@ hi MatchParen ctermfg=30 cterm=reverse guifg=#003740 gui=reverse hi Underlined cterm=underline ctermfg=23 gui=underline guifg=#005f5f hi QuickScopePrimary guifg=#892b2b gui=bold,reverse hi QuickScopeSecondary guifg=#d750d7 gui=bold,reverse +hi ColorColumn guibg=#24283c diff --git a/.config/nvim/ftdetect/gph.vim b/.config/nvim/ftdetect/gph.vim @@ -0,0 +1,2 @@ +au BufNewFile,BufRead *.gph :set filetype=gph +setlocal syntax=gph diff --git a/.config/nvim/ftdetect/greet.vim b/.config/nvim/ftdetect/greet.vim @@ -0,0 +1,2 @@ +au BufNewFile,BufRead *.greet set filetype=greet +au BufNewFile,BufRead *.greet set syntax=great diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -1,5 +1,5 @@ " -" .bashrc +" .config/nvim/init.vim " Created by Hayden Hamilton " " haydenvh.com @@ -92,7 +92,7 @@ noremap <leader>u' ds' noremap <leader>sp o<esc>pi noremap <leader>Ee :edit noremap <leader>yv :reg<CR> -noremap <leader>8 :set tw=80<CR>:set fo+=t<CR> +noremap <leader>8 :set colorcolumn=80<CR>:set tw=80<CR>:set fo+=t<CR> noremap <leader>nn :set number! relativenumber!<CR> noremap <leader><leader>nn :setlocal number! relativenumber!<CR> diff --git a/.config/nvim/modules/filetype.vim b/.config/nvim/modules/filetype.vim @@ -8,13 +8,28 @@ function Shconfig() nnoremap <buffer> <localleader>$co i$config nnoremap <buffer> <localleader><space> i[[:space:]]<esc> nnoremap <buffer> <localleader><localleader><space> [[:space:]] - iabbrev ccachedir cache=${XDG_CACHE_HOME:=$HOME/.cache} - iabbrev cconfigdir cache=${XDG_CONFIG_HOME:=$HOME/.config} + iabbrev <buffer> ccachedir cache=${XDG_CACHE_HOME:=$HOME/.cache} + iabbrev <buffer> cconfigdir cache=${XDG_CONFIG_HOME:=$HOME/.config} +endfunction + +function Gphconfig() + nnoremap <buffer> <localleader>c :call GphCitation()<CR> +endfunction + +function GphCitation() + redir! >/tmp/vim-cite | silent! %s/\[[0-9]*\]//gn | redir END + let count=system("tail -n 1 < /tmp/vim-cite | awk '{print $1}'") + let void=system("echo '' > /tmp/vim-cite") + let done=1 + normal G + while done <= count + redir! >> /tmp/vim-cite | silent! echo "[<++>|[". done ."]|<++>|<++>|<++>]" | redir END + let done+=1 + endwhile + read /tmp/vim-cite endfunction augroup autocmd - "greet - autocmd BufRead *.greet set syntax=greet "netrw autocmd FileType,WinEnter,BufEnter netrw call Configurenetrw() @@ -30,4 +45,7 @@ augroup autocmd "SH autocmd FileType sh :call Shconfig() + + "GPH + autocmd FileType *.gph :call Gphconfig() augroup END diff --git a/.config/nvim/syntax/gph.vim b/.config/nvim/syntax/gph.vim @@ -0,0 +1,22 @@ +if exists("b:current_syntax") + finish +endif + +runtime! syntax/markdown.vim + +syn match gphBrackl '^\[' contained +syn match gphBrackr '\]$' contained +syn match gphPipe '|' contained + +syn keyword gphSelf server port contained + +syn region gphSelector start=/^\[/ end=/\]$/ oneline contains=gphBrackl,gphBrackr,gphPipe,gphSelf + +hi gphPunc guifg=#a1a1d9 +hi link gphBrackl gphPunc +hi link gphBrackr gphPunc +hi link gphPipe gphPunc + +hi gphSelf guifg=#005f5f + +let b:current_syntax='gph' diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh @@ -11,10 +11,10 @@ alias -g ............=" ../../../../../../../../../../.." alias -g om=" origin master" alias -g gm=" github master" alias -g aic=" all install clean" -alias l=" \ls --color" -alias la=" \ls --color -A" -alias ll=" \ls --color -lh" -alias lla=" \ls --color -lAh" +alias l=" \lsc" +alias la=" \lsc -A" +alias ll=" \lsc -lh" +alias lla=" \lsc -lAh" alias r=" \rm" alias rr=" \rm -rf" alias m=" \mv" diff --git a/.config/zsh/functions.zsh b/.config/zsh/functions.zsh @@ -41,21 +41,16 @@ radio(){ mpv $1 --input-ipc-server=/tmp/mpv-socket3 } -notebook(){ - nvim $HOME/.local/notes -} - diary(){ - for o in "public" "private" - do - echo "===$o===" > ~/.local/${o}d - done + date=$(date +%d%m%y) + wdate=$(date +%d/%m/%y) + echo "===private===" > ~/.local/privated + echo "#Daily Entry - $wdate" > ~/.local/public.gph phlog="$HOME/web/alcl/write" - mkdir -p $phlog/daily.accomplishments ~/.local/diary + mkdir -p $phlog/daily.entries ~/.local/diary vim -O ~/.local/publicd ~/.local/privated - date=$(date +%d%m%y) printf '.txt or .gph?'; read ftype < /dev/tty - mv ~/.local/publicd $phlog/daily.accomplishments/Accomplishments.of.$date.$ftype + mv ~/.local/publicd $phlog/daily.entries/entry.of.$date.$ftype mv ~/.local/privated ~/.local/diary/$date } diff --git a/.scripts/bin/misc/lsc b/.scripts/bin/misc/lsc @@ -2,14 +2,14 @@ t=$(mktemp -d) -for o in $(ls --color "$@") +for o in $(ls --color $@) do - o2=$(echo "$o" | perl -pe 's/\e\[?.*?[\@-~]//g') - [ -f $o2 ] && echo "$o" >> $t/file && fin="y" - [ -d $o2 ] && echo "$o" >> $t/dir && fin="y" - [ "$fin" != "y" ] && echo "$o" >> $t/other - unset fin + o2="$(echo "$@" | sed 's~[[:alnum:][:punct:]]$~&/~')$(echo "$o" | perl -pe 's/\e\[?.*?[\@-~]//g')" + [ -d $o2 ] && echo "$o" >> $t/dir || echo "$o" >> $t/file done -pr -mtw "$(tput cols)" $t/* +[ ! -f $t/dir ] && ls --color $@ && exit 0 +[ ! -f $t/file ] && ls --color $@ && exit 0 + +diff -y -W $(tput cols) $t/* | sed 's/ *>[[:space:]]*//g;s/<//g;s/|\t/\t/g' rm -rf $t diff --git a/.scripts/bin/misc/schedule b/.scripts/bin/misc/schedule @@ -1,128 +0,0 @@ -#!/bin/sh -# -# schedule -# Created by Hayden Hamilton -# -# haydenvh.com -# Copyright (c) 2020 Hayden Hamilton - -dir="${XDG_CACHE_HOME:=$HOME/.cache}/schedule" -current="${XDG_CACHE_HOME:=$HOME/.cache}/schedule-current" -config="${XDG_CONFIG_HOME:=$HOME/.config}" - -mkdir -p $config/schedule -touch $config/schedule/config -. $config/schedule/config - -usage(){ - echo "usage: schedule $(tput bold)ARGS$(tput sgr0) - -ARGS: - -n NAME - create a new schedule - -c NAME - choose from list of schedules - -t - interactively deal with today's schedule - -o - list number of started, yet uncomplete tasks - -l - list schedules - " -} - -new(){ - mkdir $dir/$1/ - for day in "mon" "tue" "wed" "thu" "fri" "sat" "sun" - do - printf "# everything preceded by a hash/sharp symbol is a comment\n#=== TIME\n# the above ^ signifies (commented) the start of an event, TIME being the hh:mm (\`date +%%H:%%M\`) at which it begins.\n\n" > $dir/$1/$day - done - printf "Schedule in $dir/$1. Edit files as you like.\n$dir/$1 set as main schedule.\n" - echo "export MAIN=\"$1\"" > $config/schedule/config - export MAIN="$1" -} - -choose(){ - echo "export MAIN=\"$1\"" > $config/schedule/config - export MAIN="$1" - echo "$1 set as main schedule." -} - -list(){ - find $dir/ -type d | tail -n +2 -} - -_day(){ - case "$(date +%u)" in - 1) day=mon ;; - 2) day=tue ;; - 3) day=wed ;; - 4) day=thu ;; - 5) day=fri ;; - 6) day=sat ;; - 7) day=sun ;; - *) echo "Could not determine day of the week... exiting."; exit 1 ;; - esac -} - -_copy(){ - _day - printf "#DATE: $(date +%d/%m/%y)\n#the above note is core to schedule(1)'s functionality\n#to 'complete' a task, delete it, then save this file.\n" | cat /dev/stdin $dir/$MAIN/$day > $current -} - -today(){ - # doing some checks - [ -f $current ] && { - date=$(grep -o '^#DATE: [0-9/]*' < $current | sed 's/^#DATE: //g') - rdate=$(date +%d/%m/%y) - echo "'$date' '$rdate'" - [ "$date" != "$rdate" ] && _copy - } || _copy - [ -z $EDITOR ] && { - print "Please set the \$EDITOR variable in the future.\nEDITOR: " - read EDITOR < /dev/tty - export $EDITOR - } - $EDITOR $current -} - -num(){ - # doing some checks - [ -f $current ] && { - date=$(grep -o '^#DATE: [0-9/]*' < $current | sed 's/^#DATE: //g') - rdate=$(date +%d/%m/%y) - echo "'$date' '$rdate'" - [ "$date" != "$rdate" ] && _copy - } || _copy - count=0 - for time in $(grep "^===" < $current | sed 's/^===//g;s/://g') - do - rtime=$(date +%H%M) - [ $rtime -ge $time ] && count=$(($count+1)) - done - echo $count -} - -echo(){ - printf '%s\n' "$@" -} - -mkdir -p $dir -[ -z $1 ] && usage -while [ "$#" != "0" ] -do - echo "$1" | grep "[a-zA-Z0-0]=" >/dev/null && { - arg_opt=$(echo "$1" | sed 's/=.*//g') - arg_opr=$(echo "$1" | sed 's/.*=//g') - } || { - arg_opt="$1" - echo "$arg_opt" | grep -E -- '-n|-c' >/dev/null && { - shift - arg_opr="$1" - } - } - case "$arg_opt" in - -n) new "$arg_opr" ;; - -c) choose "$arg_opr" ;; - -l) list ;; - -t) today ;; - -o) num ;; - *) echo "$arg_opt not recognized"; usage ;; - esac - shift -done diff --git a/.scripts/dwmblocks/dwmbar b/.scripts/dwmblocks/dwmbar @@ -26,7 +26,7 @@ done & while true do - block net + # block net block news block disk block disk2