Browse Source

Autosave every 5s (Vim), HPS/309 aliases

Update packages.
red-hat-laptop
Kevin Mok 6 years ago
parent
commit
4c4f5b43fb
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 19
      aliases/key_aliases
  2. 6
      fish/.config/fish/config.fish
  3. 8
      fish/.config/fish/functions/drop-grocery.fish
  4. 3
      fish/.config/fish/functions/find-vim-filetype.fish
  5. 1
      i3/.config/i3/config
  6. 1
      scripts/compile_commands.json
  7. 2
      txt/exclude-dirs-backup.txt
  8. 1
      txt/key_dirs.txt
  9. 9
      txt/key_files.txt
  10. 9
      txt/nzxt-aur.txt
  11. 7
      txt/nzxt-pkgs.txt
  12. 22
      vim/.vimrc

19
aliases/key_aliases

@ -65,6 +65,7 @@ fnd "find . -type f -name"
rmr "rm -rf" rmr "rm -rf"
rmd "rm ~/Downloads/*" rmd "rm ~/Downloads/*"
rmsw "rm ~/.local/share/nvim/swap/"
md "mkdir -p" md "mkdir -p"
rsy "rsync -Pr" rsy "rsync -Pr"
@ -168,6 +169,8 @@ rx "redshift -x"
sn "sudo nvim" sn "sudo nvim"
sx "sxiv" sx "sxiv"
sxa "sxiv -a" sxa "sxiv -a"
sxt "sxiv -t *"
vmd "vimdiff"
wg "wego" wg "wego"
wp "grep wallpaper ~/.cache/wal/colors.sh" wp "grep wallpaper ~/.cache/wal/colors.sh"
z "zathura --fork" z "zathura --fork"
@ -200,6 +203,7 @@ wa "watson start"
wae "watson start && watson edit" wae "watson start && watson edit"
we "watson edit" we "watson edit"
wl "watson log --day" wl "watson log --day"
wla "watson log --all --tag="
ww "watson log" ww "watson log"
# wlm "watson log --project coding --tag mfs" # wlm "watson log --project coding --tag mfs"
wr "watson report --day" wr "watson report --day"
@ -227,6 +231,9 @@ gba "git branch --no-merged && echo '' && git branch --merged"
gbu "git branch --no-merged" gbu "git branch --no-merged"
gbm "git branch --merged" gbm "git branch --merged"
gmg "git merge"
gmgt "git mergetool"
# }}} branch # # }}} branch #
gr "git remote -v" gr "git remote -v"
@ -416,17 +423,23 @@ hl "valgrind --tool=helgrind ./carsim light 10 20"
# }}} 369 # # }}} 369 #
# 309 # 309
wl0 "watson log --all --project=309 --tag=e3"
wr0 "watson report --all --project=309 --tag=e3"
# wl0 "watson log --all --project=309 --tag=e3"
# wr0 "watson report --all --project=309 --tag=e3"
nd "node" nd "node"
ndm "nodemon" ndm "nodemon"
knd "killall node"
mg "mongo" mg "mongo"
mgd "mongod --dbpath mongo-data"
0ht "cd ~/school/309-proj && python3 -m http.server" 0ht "cd ~/school/309-proj && python3 -m http.server"
mgd "mongod --dbpath mongo-data"
nds "killall node && nodemon server.js"
hr "heroku" hr "heroku"
hrt "heroku ps" hrt "heroku ps"
hrl "heroku logs --dyno web -n 1500 | rg up | awk '{ system(\"date -d \" \$1); \$1 = \"\"; print \$0 }' | paste -s -d' \n'" hrl "heroku logs --dyno web -n 1500 | rg up | awk '{ system(\"date -d \" \$1); \$1 = \"\"; print \$0 }' | paste -s -d' \n'"
wlh "watson log --all --project=hps --tag=essay"
wrh "watson report --all --project=hps --tag=essay"
# }}} school # # }}} school #

6
fish/.config/fish/config.fish

@ -42,9 +42,11 @@ abbr mt "math"
set -U spv_dir "/home/kevin/coding/spotify-lib-vis" set -U spv_dir "/home/kevin/coding/spotify-lib-vis"
set -U mfs_dir "/home/kevin/coding/mf-site" set -U mfs_dir "/home/kevin/coding/mf-site"
# set -U PATH /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl /home/kevin/linux-config/scripts
# set -U PATH /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl
# /usr/bin/vendor_perl /usr/bin/core_perl /home/kevin/linux-config/scripts
# /home/kevin/linux-config/scripts/colors
# (ruby -e 'print Gem.user_dir')/bin # (ruby -e 'print Gem.user_dir')/bin
set -x PATH $PATH /home/kevin/linux-config/scripts /home/kevin/go/bin
set -x PATH $PATH /home/kevin/linux-config/scripts /home/kevin/linux-config/scripts/colors /home/kevin/go/bin
set -x PASSWORD_STORE_CLIP_TIME 120 set -x PASSWORD_STORE_CLIP_TIME 120
set -xU XSET_RATE 90 set -xU XSET_RATE 90
set -xU XSET_DELAY 200 set -xU XSET_DELAY 200

8
fish/.config/fish/functions/drop-grocery.fish

@ -0,0 +1,8 @@
function drop-grocery
set collection 'stores'
switch $argv[1]
case f
set collection 'foods'
end
mongo GroceryAPI --eval "db.$collection.drop()"
end

3
fish/.config/fish/functions/find-vim-filetype.fish

@ -0,0 +1,3 @@
function find-vim-filetype
fd $argv[1] /usr/share/nvim/runtime/ftplugin
end

1
i3/.config/i3/config

@ -35,6 +35,7 @@ bindsym Mod4+a exec studio
# bindsym $mod+control+Return exec $def_term # bindsym $mod+control+Return exec $def_term
bindsym control+Return exec $def_term bindsym control+Return exec $def_term
bindsym Mod4+c exec $browser bindsym Mod4+c exec $browser
bindsym Mod4+e exec notify-send "HPS Word Count" "$(pdftotext /home/kevin/school/latex-notes/hps/essay.pdf - | wc -w)"
bindsym Mod4+f exec firefox bindsym Mod4+f exec firefox
bindsym Mod4+$mod+f exec echo 'Kevin@fosstodon.org' | xclip -selection clipboard bindsym Mod4+$mod+f exec echo 'Kevin@fosstodon.org' | xclip -selection clipboard
bindsym Mod4+h exec echo 'kevin.mok@live.ca' | xclip -selection clipboard bindsym Mod4+h exec echo 'kevin.mok@live.ca' | xclip -selection clipboard

1
scripts/compile_commands.json

@ -1 +0,0 @@
[]

2
txt/exclude-dirs-backup.txt

@ -2,7 +2,7 @@
/home/kevin/.AndroidStudio3.3 /home/kevin/.AndroidStudio3.3
/home/kevin/Android /home/kevin/Android
/home/kevin/.cache /home/kevin/.cache
/home/kevin/.local/share/Steam
/home/kevin/.local/share/Steam/steamapps/common
/lost+found /lost+found
/mnt /mnt
/proc /proc

1
txt/key_dirs.txt

@ -66,5 +66,6 @@ a43 /home/kevin/school/369/a4-3/fs3
hp /home/kevin/school/hps hp /home/kevin/school/hps
hpe /home/kevin/school/latex-notes/hps hpe /home/kevin/school/latex-notes/hps
hper /home/kevin/school/hps/w5-6-historicism
# }}} sch * # }}} sch *

9
txt/key_files.txt

@ -20,6 +20,7 @@ z /home/kevin/linux-config/aliases/zsh_aliases
# cdn {{{ * # cdn {{{ *
cm /tmp/commit-msg.txt cm /tmp/commit-msg.txt
cmd ./commit-msg.txt
hlg /home/kevin/coding/spotify-lib-vis/src/api/management/commands/update-history.log hlg /home/kevin/coding/spotify-lib-vis/src/api/management/commands/update-history.log
id /home/kevin/coding/project-ideas/ideas.md id /home/kevin/coding/project-ideas/ideas.md
ig ./.gitignore ig ./.gitignore
@ -40,10 +41,10 @@ wt /home/kevin/.config/watson/state.tmp
# sch {{{ * # sch {{{ *
0c /home/kevin/school/309-proj/sass/main.scss 0c /home/kevin/school/309-proj/sass/main.scss
0h /home/kevin/school/309-proj/index.html
0m /home/kevin/school/309-proj/js/main.js
0f /home/kevin/school/309-proj/js/food.js
0s /home/kevin/school/309-proj/js/stores.js
0h /home/kevin/school/309-proj/public/index.html
0m /home/kevin/school/309-proj/public/js/main.js
0f /home/kevin/school/309-proj/public/js/food.js
0s /home/kevin/school/309-proj/public/js/stores.js
0k /home/kevin/school/309-proj/json/kevin.md 0k /home/kevin/school/309-proj/json/kevin.md
# }}} sch * # }}} sch *

9
txt/nzxt-aur.txt

@ -3,17 +3,24 @@ bear
browserpass browserpass
chromium-widevine chromium-widevine
cliqz-bin cliqz-bin
curseradio-git
discord discord
dragon-drag-and-drop-git dragon-drag-and-drop-git
ffcast ffcast
flashplugin-focusfix flashplugin-focusfix
heroku-cli
htop-vim-git htop-vim-git
i3blocks-git i3blocks-git
insomnia
linux-kevin linux-kevin
linux-kevin-headers linux-kevin-headers
linux-nzxt linux-nzxt
linux-nzxt-headers linux-nzxt-headers
lua-cjson lua-cjson
mongodb-bin
mongodb-tools-bin
nerd-fonts-dejavu-complete
nerd-fonts-hack
nx3-all nx3-all
peaclock peaclock
pipes.sh pipes.sh
@ -29,8 +36,10 @@ steamos-xpad-dkms
systemd-numlockontty systemd-numlockontty
texlive-local-algorithmicx texlive-local-algorithmicx
texlive-local-algorithms texlive-local-algorithms
texlive-local-biblatex
texlive-local-enumitem texlive-local-enumitem
texlive-local-ifmtarg texlive-local-ifmtarg
texlive-local-logreq
texlive-local-multirow texlive-local-multirow
texlive-local-numprint texlive-local-numprint
texlive-local-pgfplots texlive-local-pgfplots

7
txt/nzxt-pkgs.txt

@ -7,6 +7,7 @@ automake
bash bash
bat bat
bc bc
biber
bison bison
bookworm bookworm
broadcom-wl broadcom-wl
@ -19,6 +20,7 @@ cmatrix
colordiff colordiff
compton compton
coreutils coreutils
cowsay
cryptsetup cryptsetup
device-mapper device-mapper
dhcpcd dhcpcd
@ -112,7 +114,6 @@ pgadmin4
pkgconf pkgconf
postgresql postgresql
procps-ng procps-ng
psensor
psmisc psmisc
pulseaudio pulseaudio
python-dbus python-dbus
@ -131,6 +132,8 @@ scrot
sed sed
shadow shadow
shellcheck shellcheck
sl
smartmontools
sqlitebrowser sqlitebrowser
sshpass sshpass
steam steam
@ -170,6 +173,8 @@ wireless_tools
wkhtmltopdf wkhtmltopdf
wpa_actiond wpa_actiond
wpa_supplicant wpa_supplicant
xautomation
xbindkeys
xclip xclip
xf86-input-evdev xf86-input-evdev
xf86-input-keyboard xf86-input-keyboard

22
vim/.vimrc

@ -22,10 +22,11 @@ set tabstop=4
" set t_Co=256 " set t_Co=256
" set timeoutlen=500 " set timeoutlen=500
set timeoutlen=350 set timeoutlen=350
set tw=80
" set tw=80
set tw=75
set undodir=~/.vim/undo set undodir=~/.vim/undo
set undofile set undofile
set updatetime=1000
set updatetime=5000
autocmd VimResized * wincmd = autocmd VimResized * wincmd =
filetype plugin on filetype plugin on
@ -47,17 +48,17 @@ au CursorHold,CursorHoldI * checktime
" commands for file types {{{ " " commands for file types {{{ "
autocmd BufNewFile,BufRead .* set syntax=sh autocmd BufNewFile,BufRead .* set syntax=sh
autocmd FileType *css,htmldjango,html,javascript,markdown,tex,text,yaml set tabstop=2 shiftwidth=2
autocmd FileType *css,htmldjango,html,javascript,json,markdown,tex,text,yaml set tabstop=2 shiftwidth=2
" autocmd BufNewFile,BufRead *.md set filetype=markdown " autocmd BufNewFile,BufRead *.md set filetype=markdown
autocmd Filetype markdown set textwidth=0 autocmd Filetype markdown set textwidth=0
" autocmd Filetype html set foldmarker=0 " autocmd Filetype html set foldmarker=0
autocmd Filetype markdown map <F8> :LivedownToggle<CR> autocmd Filetype markdown map <F8> :LivedownToggle<CR>
autocmd Filetype json nnoremap <leader>j :%!python -m json.tool<CR> autocmd Filetype json nnoremap <leader>j :%!python -m json.tool<CR>
autocmd Filetype json set foldmethod=marker autocmd Filetype json set foldmethod=marker
autocmd FileType sh map <F8> :!clear && shellcheck %<CR> autocmd FileType sh map <F8> :!clear && shellcheck %<CR>
" autocmd FileType tex map <F8> :VimtexCompile<CR>:VimtexView<CR>
autocmd FileType tex map <F8> :VimtexCompile<CR>
autocmd VimEnter *.tex VimtexCompile autocmd VimEnter *.tex VimtexCompile
autocmd FileType markdown,tex,text set spell spelllang=en_us
autocmd VimLeave *.tex !tex-clean %:p autocmd VimLeave *.tex !tex-clean %:p
" " auto-reload vimrc {{{ " " " auto-reload vimrc {{{ "
@ -113,7 +114,8 @@ Plug 'vim-scripts/L9'
" automatically save buffers upon returning to normal mode " automatically save buffers upon returning to normal mode
Plug '907th/vim-auto-save' Plug '907th/vim-auto-save'
let g:auto_save = 1 let g:auto_save = 1
autocmd VimEnter *.tex let g:auto_save = 0
let g:auto_save_events = ["CursorHold", "CursorHoldI"]
" autocmd VimEnter *.tex let g:auto_save = 0
" provides various functionality for writing LaTeX in Vim " provides various functionality for writing LaTeX in Vim
Plug 'lervag/vimtex' Plug 'lervag/vimtex'
@ -126,6 +128,9 @@ Plug 'lervag/vimtex'
\ 'global' : 0, \ 'global' : 0,
\ 'unused' : 0, \ 'unused' : 0,
\} \}
" let g:vimtex_compiler_latexmk = {
" \ 'continuous' : 0,
" \}
" auto-completion for various languages " auto-completion for various languages
Plug 'Valloric/YouCompleteMe' Plug 'Valloric/YouCompleteMe'
@ -275,7 +280,8 @@ nnoremap <leader>fi :YcmCompleter FixIt<CR>
nnoremap <leader>ft /TODO<CR> nnoremap <leader>ft /TODO<CR>
nnoremap <leader>g :YcmCompleter GoTo<CR> nnoremap <leader>g :YcmCompleter GoTo<CR>
" vimdiff split " vimdiff split
nnoremap <leader>gd :Gvdiff HEAD
nnoremap <leader>gd :Gvdiff HEAD~
nnoremap <leader>gdm :Gvdiff master<CR>
" toggle search highlighting " toggle search highlighting
nnoremap <leader>h :set hlsearch! hlsearch?<CR> nnoremap <leader>h :set hlsearch! hlsearch?<CR>
" help " help
@ -386,6 +392,8 @@ autocmd BufNewFile,BufRead *.h nnoremap <localleader>x 0iextern <Esc>f{hc$;<Esc>
autocmd Filetype fish inoremap <localleader>1 $argv[1] autocmd Filetype fish inoremap <localleader>1 $argv[1]
autocmd Filetype fish inoremap <localleader>2 $argv[2] autocmd Filetype fish inoremap <localleader>2 $argv[2]
autocmd Filetype javascript inoremap <localleader>x process.exit()
autocmd Filetype markdown nnoremap <localleader>x 0f[lrx autocmd Filetype markdown nnoremap <localleader>x 0f[lrx
" nnoremap <localleader>x 0f[lrx " nnoremap <localleader>x 0f[lrx

Loading…
Cancel
Save