From 6bd844931b93d261af410f5b96070420992645c7 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Wed, 12 Jun 2019 13:18:41 -0400 Subject: [PATCH] Update --- dot_Xresources.tmpl | 3 ++- dot_bashrc | 2 +- dot_config/fish/config.fish.tmpl | 5 +++++ dot_config/fish/functions/define.fish | 3 +++ dot_config/fish/functions/fzf-vim.fish | 3 +++ dot_config/fish/functions/thesaurus.fish | 3 +++ dot_config/ranger/executable_scope.sh | 3 +++ dot_vimrc.tmpl | 19 ++++++++++++++++--- key_aliases.tmpl | 24 +++++++++++++++++------- key_dirs.tmpl | 20 +++++++++++++------- scripts/executable_backup | 2 +- txt/exclude-dirs-backup.txt.tmpl | 7 ++++++- txt/nzxt-aur.txt | 13 +++++++++++-- txt/nzxt-pkgs.txt | 9 ++++++++- 14 files changed, 92 insertions(+), 24 deletions(-) create mode 100644 dot_config/fish/functions/define.fish create mode 100644 dot_config/fish/functions/fzf-vim.fish create mode 100644 dot_config/fish/functions/thesaurus.fish diff --git a/dot_Xresources.tmpl b/dot_Xresources.tmpl index 04a58d2..4c8cf6c 100755 --- a/dot_Xresources.tmpl +++ b/dot_Xresources.tmpl @@ -4,7 +4,8 @@ ! URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=11 URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=12 {{ else }} -URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=14 +! URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=14 +URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=13.5 {{ end }} ! URxvt.font: xft:Hack:size=18 diff --git a/dot_bashrc b/dot_bashrc index 91b0ca2..9f56e09 100755 --- a/dot_bashrc +++ b/dot_bashrc @@ -173,7 +173,7 @@ export SHORT_USER=${USER:0:8} # export BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1 # Load Bash It -source "$BASH_IT"/bash_it.sh +# source "$BASH_IT"/bash_it.sh # export JAVA_HOME=/home/kevin/usr/java/jdk1.8.0_151/ # export PATH=$JAVA_HOME/bin:$PATH diff --git a/dot_config/fish/config.fish.tmpl b/dot_config/fish/config.fish.tmpl index df51128..3252510 100755 --- a/dot_config/fish/config.fish.tmpl +++ b/dot_config/fish/config.fish.tmpl @@ -19,6 +19,7 @@ set -x GPG_TTY (tty) {{ if eq .chezmoi.fullHostname "nzxt" }} set -U spv_dir "/home/kevin/coding/spotify-lib-vis" set -U mfs_dir "/home/kevin/coding/mf-site" +source /home/kevin/coding/spotify-lib-vis/src/scripts/api-keys-fish.sh {{ end }} set -x PATH $PATH ~/scripts ~/scripts/colors ~/go/bin @@ -79,8 +80,10 @@ abbr cpc "copy cat" abbr cpe "copy echo" abbr cpp "copy echo (pwd)" abbr cff "create-fish-function" +abbr def "define" abbr ev "evince-silent" abbr fbg "find-bg" +abbr fzv "fzf-vim" # git [[[ # abbr gcamp "git-amend-push" @@ -96,6 +99,8 @@ abbr mt "math" abbr pgr "grep-pdf" abbr pgrf "grep-pdf-file" abbr rs "redshift-set" +abbr shrm "shred-rm" +abbr thes "thesaurus" abbr ut "unix-timestamp" abbr uzr "unzip-rm" abbr fvft "find-vim-filetype" diff --git a/dot_config/fish/functions/define.fish b/dot_config/fish/functions/define.fish new file mode 100644 index 0000000..5e4090e --- /dev/null +++ b/dot_config/fish/functions/define.fish @@ -0,0 +1,3 @@ +function define + sdcv -u "dictd_www.dict.org_gcide" $argv[1] | bat +end diff --git a/dot_config/fish/functions/fzf-vim.fish b/dot_config/fish/functions/fzf-vim.fish new file mode 100644 index 0000000..3d00215 --- /dev/null +++ b/dot_config/fish/functions/fzf-vim.fish @@ -0,0 +1,3 @@ +function fzf-vim + fzf | xargs $EDITOR +end diff --git a/dot_config/fish/functions/thesaurus.fish b/dot_config/fish/functions/thesaurus.fish new file mode 100644 index 0000000..c14065c --- /dev/null +++ b/dot_config/fish/functions/thesaurus.fish @@ -0,0 +1,3 @@ +function thesaurus + sdcv -u "Moby Thesaurus II" $argv[1] | bat +end diff --git a/dot_config/ranger/executable_scope.sh b/dot_config/ranger/executable_scope.sh index e892853..789adf8 100755 --- a/dot_config/ranger/executable_scope.sh +++ b/dot_config/ranger/executable_scope.sh @@ -95,6 +95,9 @@ handle_extension() { json) jq --color-output . "${FILE_PATH}" && exit 5 python -m json.tool -- "${FILE_PATH}" && exit 5 + + # txt) + # cat "${FILE_PATH}" && exit 5 esac } diff --git a/dot_vimrc.tmpl b/dot_vimrc.tmpl index 862c4d5..5ecd07d 100755 --- a/dot_vimrc.tmpl +++ b/dot_vimrc.tmpl @@ -68,7 +68,7 @@ autocmd FileType python set fdm=indent autocmd Filetype json nnoremap j :%!python -m json.tool autocmd Filetype json set foldmethod=marker autocmd FileType sh map :!clear && shellcheck % -autocmd FileType tex set updatetime=1000 +autocmd FileType tex set updatetime=1000 timeoutlen=300 autocmd FileType tex map :VimtexCompile autocmd VimEnter *.tex VimtexCompile autocmd VimLeave *.tex !tex-clean %:p @@ -243,6 +243,11 @@ Plug 'calviken/vim-gdscript3' " display hex colors in Vim Plug 'RRethy/vim-hexokinase' Plug 'junegunn/goyo.vim' +" prevent commands being executed through modelines " +Plug 'ciaranm/securemodelines/' +" different colors for each layer of surrounding brackets +Plug 'luochen1990/rainbow' + let g:rainbow_active = 1 " ]]] vim-plug " " Mappings [[[ " @@ -251,6 +256,8 @@ call plug#end() " colorscheme gotham256 colorscheme wal +nnoremap Q @@ + nnoremap v nnoremap > >> nnoremap < << @@ -263,10 +270,14 @@ let mapleader="\" nnoremap a /^ " replace until end of line nnoremap c c$ -" delete entire buffer +" delete until end of line nnoremap d d$ " delete entire buffer nnoremap dg ggdG +" delete lines matching pattern +nnoremap dl :g//d +" show docstring for cur word +nnoremap do :YcmCompleter GetDoc " delete line into system clipboard nnoremap D "+dd " delete entire buffer into system clipboard @@ -395,11 +406,13 @@ autocmd Filetype tex inoremap fa \forall autocmd Filetype tex inoremap g \geq autocmd Filetype tex inoremap i \in autocmd Filetype tex inoremap le \leq -autocmd Filetype tex inoremap lo \log +autocmd Filetype tex inoremap ln \log n autocmd Filetype tex inoremap lr \Leftrightarrow " autocmd Filetype tex inoremap n \neg autocmd Filetype tex inoremap n \neq autocmd Filetype tex inoremap N \mathbb{N} +autocmd Filetype tex inoremap pg \pagebreak +autocmd Filetype tex inoremap ph [,phantom] autocmd Filetype tex inoremap q \qquad autocmd Filetype tex inoremap r \rightarrow autocmd Filetype tex inoremap R \Rightarrow diff --git a/key_aliases.tmpl b/key_aliases.tmpl index ce56e9e..ace0576 100755 --- a/key_aliases.tmpl +++ b/key_aliases.tmpl @@ -48,6 +48,9 @@ ctltd "sudo systemctl status dhcpcd" ctlr "sudo systemctl restart" # ]]] systemctl # +ct "crontab" +cte "crontab -e" + wm "sudo wifi-menu" # mounting [[[ # @@ -95,7 +98,7 @@ so "xset dpms force off" sd "systemctl poweroff" rb "systemctl reboot" lo "i3-msg exit" -x "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE" +xm "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE" X "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE" {{ if eq .chezmoi.fullHostname "x1-carbon" }} xl "xmodmap ~/.Xmodmap-laptop && xset r rate $XSET_DELAY $XSET_RATE" @@ -144,7 +147,7 @@ yaq "yay -Qi" # remove yar "yay -Rns" # sync -yaud "yay -Sy" +yau "yay -Sy" # sync and download yadl "yay -Syuw --answerclean=None --answerdiff=None --answeredit=None" # sync and update @@ -157,7 +160,8 @@ xya "yay -Qqne > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-pkgs py "python" pyt "python -m unittest" -pipi "sudo pip install" +pipi "pip install" +spipi "sudo pip install" # internet pg "ping -c 3 -W 1 8.8.8.8" @@ -329,7 +333,7 @@ gsts "git stash show stash@\{0\} -p" gclear "git stash clear" gpl "git pull --rebase" -grb "git rebase -" +grb "git rebase -i" grba "git rebase --abort" grbc "git rebase --continue" @@ -397,7 +401,7 @@ upip "pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xa ureq "pip freeze > requirements.txt" # show last history scan -hlg "cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1" +hlg "tail -n 5 $spv_dir/src/api/management/commands/update-history.log" # scan history # hs "$spv_dir/src/update-history.sh && cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1" # scan cron log for hs cmd @@ -410,6 +414,9 @@ snw "spotify-now -i '%artist - %title'" # ]]] spotify-lib-vis # shc "shellcheck" +tll "tllocalmgr" +tli "tllocalmgr install" +# tlh "tllocalmgr texhash" pdl "pdflatex" tcl "tex-clean" @@ -472,6 +479,9 @@ gpsb "git push bitbucket" # ]]] ada-mario # +sac "source ../../bin/activate.fish" +dea "deactivate" + # ]]] coding projs # # school [[[ # @@ -483,7 +493,7 @@ ssc "ssh mokkar@teach.cs.utoronto.ca" jc "javac -d out *.java" jr "java -cp \"$CLASSPATH:out\"" -wl1 "watson log --all --project=263 --tag=a1" -wr1 "watson report --all --project=263 --tag=a1" +wl2 "watson log --all --project=263 --tag=a2" +wr2 "watson report --all --project=263 --tag=a2" # ]]] school # diff --git a/key_dirs.tmpl b/key_dirs.tmpl index f5f6837..203b0ea 100755 --- a/key_dirs.tmpl +++ b/key_dirs.tmpl @@ -3,6 +3,7 @@ # sys [[[ # bg ~/Pictures/Backgrounds +bu /run/media/{{ .chezmoi.group }}/backup-hd/{{ .chezmoi.fullHostname }}/tar cf ~/.config cff ~/.config/fish d ~/Downloads @@ -24,29 +25,33 @@ tm /tmp # cdn [[[ # +cn ~/coding +ib ~/linux-config/dot_config/i3blocks/scripts +ra ~/linux-config/dot_config/ranger +sr ~/linux-config/scripts +swa ~/.local/share/nvim/swap +tx ~/linux-config/txt +wd ~/.config/watson + +{{ if eq .chezmoi.fullHostname "nzxt" }} b1 ~/coding/mf-site/themes/base16 2d ~/coding/godot-demos/2d-plat ad ~/coding/ada-mario ads ~/coding/ada-mario/scripts adP ~/Pictures/ada-mario -cn ~/coding ft ~/coding/face-tracker -ib ~/linux-config/dot_config/i3blocks/scripts j ~/Documents/journal lh ~/Documents/listening-history mmd ~/coding/move-mouse-with-head ms ~/coding/mf-site mh ~/coding/mf-site/layouts # mg ~/coding/best-mf-site-personal -ra ~/linux-config/dot_config/ranger -sr ~/linux-config/scripts snp ~/.vim/plugged/vim-snippets/UltiSnips sv ~/coding/spotify-lib-vis/src svg ~/coding/spotify-lib-vis/src/graphs/static/graphs/scripts -swa ~/.local/share/nvim/swap -tx ~/linux-config/txt -wd ~/.config/watson +tb ~/coding/trapbot/src/trapbot wo ~/Documents/workout-logs/11 +{{ end }} # ]]] cdn # @@ -57,6 +62,7 @@ lt ~/school/latex-notes 6 ~/school/263 62 ~/school/263/a2 +624 ~/school/263/a2/q4 62t ~/school/latex-notes/263/a2 al1 ~/school/algorithms/w1-union-find diff --git a/scripts/executable_backup b/scripts/executable_backup index ae05c73..cd37065 100755 --- a/scripts/executable_backup +++ b/scripts/executable_backup @@ -25,7 +25,7 @@ case $2 in ;; full ) sudo rsync -PraAX --exclude-from="$exclude_dirs_list_full" / "$backup_dest/full" - sudo rsync -PraAX /home "$backup_dest/full/home" + # sudo rsync -PraAX /home "$backup_dest/full" # echo rsync -PraAX --exclude-from="$exclude_dirs_list_full" / "$backup_dest/full" # echo rsync -PraAX /home "$backup_dest/full/home" esac diff --git a/txt/exclude-dirs-backup.txt.tmpl b/txt/exclude-dirs-backup.txt.tmpl index 2b8fe73..3f75aee 100755 --- a/txt/exclude-dirs-backup.txt.tmpl +++ b/txt/exclude-dirs-backup.txt.tmpl @@ -3,10 +3,15 @@ /home/kevin/.ACEStream /home/kevin/.android /home/kevin/.AndroidStudio3.3 +/home/kevin/.config/chromium +/home/kevin/.config/discord +/home/kevin/.config/Slack +/home/kevin/.local/share/godot/templates /home/kevin/Android -/home/kevin/coding/opencv +/home/kevin/coding/archived/opencv /lost+found /mnt +/opt /proc /run /sys diff --git a/txt/nzxt-aur.txt b/txt/nzxt-aur.txt index 0896cbe..b6c985c 100755 --- a/txt/nzxt-aur.txt +++ b/txt/nzxt-aur.txt @@ -3,9 +3,9 @@ acestream-player android-studio aurvote bear -chezmoi chromium-widevine cliqz-bin +compton-tryone-git curseradio-git discord dragon-drag-and-drop-git @@ -41,23 +41,32 @@ spotify-now-git st steamos-xpad-dkms systemd-numlockontty +texlive-local-adjustbox texlive-local-algorithmicx texlive-local-algorithms texlive-local-biblatex texlive-local-biblatex-apa +texlive-local-collectbox texlive-local-csquotes +texlive-local-elocalloc texlive-local-enumitem +texlive-local-environ +texlive-local-forest texlive-local-ifmtarg +texlive-local-inlinedef texlive-local-logreq texlive-local-multirow texlive-local-numprint +texlive-local-pgfopts texlive-local-pgfplots texlive-local-siunitx +texlive-local-tikz-qtree texlive-local-tkz-base texlive-local-tkz-euclide +texlive-local-trimspaces +texlive-local-was texlive-local-xifthen texlive-localmanager-git -tor-browser trizen ttf-emojione vidir diff --git a/txt/nzxt-pkgs.txt b/txt/nzxt-pkgs.txt index d08be77..23b9583 100755 --- a/txt/nzxt-pkgs.txt +++ b/txt/nzxt-pkgs.txt @@ -21,9 +21,9 @@ cloc cmake cmatrix colordiff -compton coreutils cowsay +cronie cryptsetup device-mapper dhcpcd @@ -55,6 +55,7 @@ gettext gimp git glibc +gradle grep grub gzip @@ -68,9 +69,12 @@ imv imwheel inetutils iniparser +intellij-idea-community-edition iproute2 iputils jfsutils +jp2a +junit less lib32-nvidia-utils licenses @@ -102,6 +106,7 @@ ntp numlockx nvidia-dkms nvidia-settings +openshot openssh os-prober pacman @@ -135,6 +140,7 @@ ripgrep rsync s-nail scrot +sdcv sed shadow shellcheck @@ -174,6 +180,7 @@ valgrind vi vim virtualbox +vlc vtk w3m which