diff --git a/aliases/key_aliases b/aliases/key_aliases index 5657759..4abcdc8 100644 --- a/aliases/key_aliases +++ b/aliases/key_aliases @@ -11,6 +11,8 @@ ru "xrdb ~/.Xresources" dum "sudo du -d 1 -B M" tl "tldr" +nvt "nvidia-settings --assign CurrentMetaMode='DVI-I-1: nvidia-auto-select +0+0 {ForceCompositionPipeline=On}, HDMI-0: nvidia-auto-select +3840+0 {ForceCompositionPipeline=On}'" + vgb "sni /etc/default/grub" mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg" @@ -53,7 +55,7 @@ fz "fzf" fnd "find . -type f -name" rmr "rm -rf" -mdp "mkdir -p" +md "mkdir -p" rsy "rsync -Pr" # list all (un)mounted drives @@ -101,9 +103,13 @@ tri "trizen -S --noedit" # }}} pacman # +py "python" +pipi "sudo pip install" + # internet pgo "ping -c 3 8.8.8.8" dh "sudo dhcpcd" +kdh "sudo killall dhcpcd" rdh "sudo killall dhcpcd && sudo dhcpcd" id "identify" @@ -125,7 +131,7 @@ pipes "pipes.sh -t 3" chr "google-chrome" # h "htop -s PERCENT_MEM" -# hc "htop -s PERCENT_CPU" +hc "htop -s PERCENT_CPU" r "ranger" mra "man ranger" clc "cloc ." @@ -137,6 +143,8 @@ sxa "sxiv -a" wg "wego" wp "grep wallpaper ~/.cache/wal/colors.sh" +kd "killall Discord && killall Discord" + # rsl "java -jar ~/Downloads/RuneLite.jar" # swex "sudo nohup ~/Downloads/swex.appimage $silent" @@ -172,11 +180,12 @@ w "watson" wa "watson start" we "watson edit" wl "watson log --day" +wlw "watson log" # wlm "watson log --project coding --tag mfs" wr "watson report" ws "watson stop" wse "watson stop && watson edit" -wsl "watson stop && watson log" +wsl "watson stop && watson log --day" wt "watson status" # }}} watson # @@ -261,7 +270,7 @@ crm "mrk README.md" gcho "git checkout" gchon "git checkout -b" -gf "git fetch" +gf "git fetch origin" gcln "git clone" gchp "git cherry-pick" @@ -325,19 +334,21 @@ tcl "tex-clean" # mfs mfs "nvim /home/kevin/coding/best-mf-site-personal/index.html" -hps "python3 -m http.server" +ht "python3 -m http.server" # j "jekyll" # js "jekyll serve" h "hugo" he "hugo serve -D --disableFastRender" ss "ssh kevin@192.168.0.100" +ssb "ssh-bandit" # }}} coding projs # # school {{{ # -# 369 +# 369 {{{ # + # a2 m "printf '\033c' && bear make" mc "bear make clean" @@ -355,4 +366,9 @@ hl "valgrind --tool=helgrind ./carsim light 10 20" # cpi "scp interceptor.c kevin@192.168.0.17:/home/kevin/a1" # cpti "gcc -m32 -o test_intercept test_intercept.c && scp test_intercept k@192.168.0.17:/home/k/a1" +# }}} 369 # + +# 309 +0ht "cd ~/school/309-proj && python3 -m http.server" + # }}} school # diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index a7011d3..dd8b8c2 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -36,6 +36,7 @@ set -x PASSWORD_STORE_CLIP_TIME 120 # fxn abbr's abbr ag "grep-aliases" +abbr bq "benq-brightness" abbr ev "evince-silent" # git {{{ # diff --git a/fish/.config/fish/functions/benq-brightness.fish b/fish/.config/fish/functions/benq-brightness.fish new file mode 100644 index 0000000..8fb3fa0 --- /dev/null +++ b/fish/.config/fish/functions/benq-brightness.fish @@ -0,0 +1,3 @@ +function benq-brightness + xrandr --output HDMI-0 --gamma 1:0.8:0 --brightness (math $argv[1] / 100) +end diff --git a/fish/.config/fish/functions/ssh-bandit.fish b/fish/.config/fish/functions/ssh-bandit.fish new file mode 100644 index 0000000..5ff8b98 --- /dev/null +++ b/fish/.config/fish/functions/ssh-bandit.fish @@ -0,0 +1,3 @@ +function ssh-bandit + sshpass -f p/$argv[1] ssh -p 2220 bandit$argv[1]@bandit.labs.overthewire.org +end diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 6958ac3..83fe29e 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -12,6 +12,7 @@ exec imwheel exec xmodmap ~/.Xmodmap exec xset r rate 200 70 exec xrdb ~/.Xresources +exec --no-startup-id dunst exec --no-startup-id start-pulseaudio-x11 exec --no-startup-id i3-msg 'workspace $ws2; exec $def_term' exec --no-startup-id i3-msg 'workspace $ws3; exec $browser' @@ -50,6 +51,7 @@ bindsym control+$mod+s exec systemctl suspend bindsym Mod4+t exec xclip -selection clipboard ~/.password-store/social/trapbot bindsym Mod4+u exec echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard bindsym Mod4+$mod+u exec pass -c uoft/acorn +bindsym Mod4+w exec notify-send "watson status" "$(watson status)" # bindsym Mod4+x exec $swex bindsym Mod4+x exec xmodmap ~/.Xmodmap && xset r rate 200 70 bindsym Mod4+z exec cliqz @@ -236,7 +238,7 @@ set $ws7 "7 " # set $ws7 "7 📤" workspace $ws7 output $samsung bindsym $mod+F7 workspace $ws7; exec $def_term -bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1" +# bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1" set $ws8 "8 " # set $ws8 "8 📊" @@ -255,7 +257,7 @@ assign [class="spotify"] $ws10 workspace $ws10 output $samsung set $hp 2 # bindsym Mod4+v workspace $ws10; exec urxvt -e alsamixer -c 0 -# bindsym Mod4+v workspace $ws10; exec urxvt -e cava +bindsym Mod4+v workspace $ws10; exec urxvt -e cava # bindsym Mod4+h workspace $ws10; exec urxvt -e alsamixer -c $hp bindsym Mod4+s workspace $ws10; exec spotify diff --git a/i3blocks/.config/i3blocks/i3blocks.conf b/i3blocks/.config/i3blocks/i3blocks.conf index 2740903..b2c1292 100644 --- a/i3blocks/.config/i3blocks/i3blocks.conf +++ b/i3blocks/.config/i3blocks/i3blocks.conf @@ -20,6 +20,11 @@ color=#cbe4ff # interval=30 # # color=#acc0cd +[volume] +interval=once +signal=1 +interval=10 + [calendar] interval=30 label= diff --git a/ranger/.config/ranger/rc.conf b/ranger/.config/ranger/rc.conf index 7e9f530..0d6857d 100644 --- a/ranger/.config/ranger/rc.conf +++ b/ranger/.config/ranger/rc.conf @@ -687,6 +687,7 @@ map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm. map zu shell unzip %f map zr shell unzip %f && rm %f +map e. open_with evince f map v. shell $EDITOR %f # map gr fzf_select diff --git a/txt/key_dirs.txt b/txt/key_dirs.txt index 30baae5..fd7af3c 100644 --- a/txt/key_dirs.txt +++ b/txt/key_dirs.txt @@ -14,7 +14,7 @@ me /run/media/kevin o / p /home/kevin/.password-store P /home/kevin/Pictures -t /tmp +tm /tmp # }}} sys * @@ -42,7 +42,8 @@ wo /home/kevin/Documents/workout-logs/11 # sch {{{ * sc /home/kevin/school -0 /home/kevin/school/309 +0d /home/kevin/school/309 +0p /home/kevin/school/309-proj e2 /home/kevin/school/309/e2 6 /home/kevin/school/369 a2 /home/kevin/school/369/a2/a2 diff --git a/txt/key_files.txt b/txt/key_files.txt index 81059f9..6827b28 100644 --- a/txt/key_files.txt +++ b/txt/key_files.txt @@ -35,3 +35,12 @@ tm /home/kevin/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets wt /home/kevin/.config/watson/state.tmp # }}} cdn * + +# sch {{{ * + +0c /home/kevin/school/309-proj/main.scss +0h /home/kevin/school/309-proj/index.html +0j /home/kevin/school/309-proj/main.js +0k /home/kevin/school/309-proj/txt/kevin.md + +# }}} sch * diff --git a/vim/.vimrc b/vim/.vimrc index fa0d138..8fcdf48 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -29,7 +29,7 @@ set linespace=5 " set timeoutlen=500 set timeoutlen=350 set hlsearch -set noswapfile +" set noswapfile " let maplocalleader="-" let maplocalleader="\\" " }}} set x=y " @@ -40,15 +40,11 @@ autocmd VimResized * wincmd = autocmd BufNewFile,BufRead .* set syntax=sh filetype plugin on filetype indent on -autocmd FileType *css,htmldjango,html,tex,markdown,yaml set tabstop=2 shiftwidth=2 expandtab +autocmd FileType *css,htmldjango,html,javascript,markdown,tex,yaml set tabstop=2 shiftwidth=2 expandtab autocmd BufNewFile,BufRead *.txt set tabstop=2 shiftwidth=2 expandtab -autocmd BufNewFile,BufRead watson*.fish set tabstop=2 shiftwidth=2 expandtab -autocmd BufRead commit-msg.txt set filetype=gitcommit tw=72 autocmd BufNewFile,BufRead *.md set filetype=markdown autocmd Filetype markdown set textwidth=0 " autocmd Filetype html set foldmarker=0 - -autocmd BufWritePost key_* !sync-shortcuts autocmd VimLeave *.tex !tex-clean % " " auto-reload vimrc {{{ " @@ -62,6 +58,19 @@ autocmd VimLeave *.tex !tex-clean % " }}} commands for file types " +" commands for specific files {{{ " + +autocmd BufNewFile,BufRead watson*.fish set tabstop=2 shiftwidth=2 expandtab +autocmd BufRead commit-msg.txt set filetype=gitcommit tw=72 +autocmd BufWritePost key_* !sync-shortcuts + +autocmd BufNewFile,BufRead main.scss map :silent !sass main.scss main.css +" map :autocmd BufWritePost main.scss silent !sass main.scss main.css +autocmd BufNewFile,BufRead main.scss map :autocmd BufWritePost main.scss silent !sass main.scss main.css +autocmd BufNewFile,BufRead main.scss map :autocmd! BufWritePost main.scss + +" }}} commands for specific files " + " vim-plug {{{ " " plug auto-install if empty(glob('~/.vim/autoload/plug.vim')) @@ -124,6 +133,11 @@ Plug 'SirVer/ultisnips' let g:UltiSnipsExpandTrigger = "" let g:UltiSnipsJumpForwardTrigger = "" let g:UltiSnipsJumpBackwardTrigger = "" + let g:ultisnips_javascript = { + \ 'keyword-spacing': 'always', + \ 'semi': 'never', + \ 'space-before-function-paren': 'never', + \ } " custom snippets Plug 'Kevin-Mok/vim-snippets' @@ -176,6 +190,7 @@ Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'terryma/vim-multiple-cursors' " let g:multi_cursor_select_all_word_key='' Plug 'dag/vim-fish' +Plug 'shime/vim-livedown' call plug#end() @@ -187,10 +202,12 @@ colorscheme wal " Mappings {{{ " " function keys {{{ " +" map silent !sass main.scss main.css +" " map :autocmd BufWritePost main.scss silent !sass main.scss main.css +" map :autocmd BufWritePost main.scss silent !sass main.scss main.css +" map :autocmd! BufWritePost main.scss " map :silent !scp %:p k@192.168.0.17:/home/k/a1 -" map :silent !gcc -m32 -o test_full test_full.c && scp test_full k@192.168.0.17:/home/k/a1 " map :silent !scp -P 2222 e1.html e1_style.css kevin@127.0.0.1:/home/kevin/Downloads/e1 -" map :silent !gcc -m32 -o test_intercept test_intercept.c && scp test_intercept k@192.168.0.17:/home/k/a1 map :xa map :q! " map :make -C ~/Documents/resume cv @@ -199,6 +216,7 @@ map :!clear && shellcheck % map :VimtexCompile:VimtexView " map :VimtexCompile nnoremap :set paste"+p:set nopaste +map :LivedownPreview " }}} function keys " map O @@ -273,8 +291,9 @@ nnoremap rv :source $MYVIMRC nnoremap R q:i%s///g2F/i " sort lines until end of file vnoremap s :sort +nnoremap sc :set spell spelllang=en_us " run current file in shell -nnoremap sh :!%:p +nnoremap sh :!%:p " sort lines until end of file nnoremap so q:i.,$sort " sort lines @@ -302,12 +321,6 @@ nnoremap z za " Local Mappings {{{ " -autocmd Filetype fish inoremap 1 $argv[1] -autocmd Filetype fish inoremap 2 $argv[2] - -autocmd Filetype markdown nnoremap x 0f[lrx -" nnoremap x 0f[lrx - " tex {{{ " autocmd Filetype tex inoremap bt \bowtie @@ -346,4 +359,10 @@ autocmd Filetype tex inoremap tx $t(x)$ " }}} tex " +autocmd Filetype fish inoremap 1 $argv[1] +autocmd Filetype fish inoremap 2 $argv[2] + +autocmd Filetype markdown nnoremap x 0f[lrx +" nnoremap x 0f[lrx + " }}} Local Mappings " diff --git a/zathura/.config/zathura/zathurarc b/zathura/.config/zathura/zathurarc-o similarity index 100% rename from zathura/.config/zathura/zathurarc rename to zathura/.config/zathura/zathurarc-o