From 07677923c40e2d78203f118c1e7928295df08156 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Sun, 10 Feb 2019 03:15:14 -0500 Subject: [PATCH] Update --- aliases/key_aliases | 84 ++++++++++++++----- fish/.config/fish/completions/watson.fish | 59 +++++++++++-- fish/.config/fish/config.fish | 16 +++- fish/.config/fish/functions/carsim.fish | 5 ++ fish/.config/fish/functions/gdb-a2.fish | 10 +++ .../fish/functions/git-delete-branch.fish | 4 + fish/.config/fish/functions/grep-c.fish | 3 + fish/.config/fish/functions/grep-headers.fish | 3 + fish/.config/fish/functions/scan-history.fish | 1 + i3/.config/i3/config | 28 ++++--- scripts/compile_commands.json | 1 + shell/.zshrc | 3 +- stow.sh | 2 +- txt/exclude-dirs-backup.txt | 1 + txt/key_dirs.txt | 10 ++- txt/key_files.txt | 6 +- vim/.vimrc | 37 +++++--- zathura/.config/zathura/zathurarc | 3 + 18 files changed, 216 insertions(+), 60 deletions(-) create mode 100644 fish/.config/fish/functions/carsim.fish create mode 100644 fish/.config/fish/functions/gdb-a2.fish create mode 100644 fish/.config/fish/functions/git-delete-branch.fish create mode 100644 fish/.config/fish/functions/grep-c.fish create mode 100644 fish/.config/fish/functions/grep-headers.fish create mode 100644 scripts/compile_commands.json create mode 100644 zathura/.config/zathura/zathurarc diff --git a/aliases/key_aliases b/aliases/key_aliases index 2f8a46d..535ebcd 100644 --- a/aliases/key_aliases +++ b/aliases/key_aliases @@ -1,7 +1,7 @@ # system {{{ # # clear screen -cs "printf '\033c'" +c "printf '\033c'" hst "history" nf "printf '\033c' && neofetch | lolcat" fi "fish" @@ -9,18 +9,21 @@ fi "fish" ru "xrdb ~/.Xresources" # list file sizes in megabytes with depth 1 dum "sudo du -d 1 -B M" +tl "tldr" vgb "sni /etc/default/grub" mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg" -grep "grep --color=auto" -rg "grep -nr" +grep "grep --color=auto -n" +rg "grep -r" # pk "pkill -f" +cld "colordiff -y --suppress-common-lines" mkpk "makepkg -sri" mkex "chmod 777" -# systemctl +# systemctl {{{ # + ctl "sudo systemctl" ctle "sudo systemctl enable" ctld "sudo systemctl disable" @@ -29,6 +32,8 @@ ctls "sudo systemctl stop" ctlt "sudo systemctl status" ctlr "sudo systemctl restart" +# }}} systemctl # + wm "sudo wifi-menu" # mounting @@ -37,9 +42,7 @@ udmb "udisksctl mount -b /dev/sdc2" udu "udisksctl unmount -b" udub "udisksctl unmount -b /dev/sdc2" -tc "touch" - -# }}} command line related # +to "touch" # directory-related {{{ # l "ls -a" @@ -71,7 +74,8 @@ s "systemctl suspend" sd "sudo shutdown 0" reb "sudo shutdown -r 0" lo "i3-msg exit" -x "xmodmap ~/.Xmodmap && xset r rate 200 60" +x "xmodmap ~/.Xmodmap && xset r rate 200 70" +X "xmodmap ~/.Xmodmap && xset r rate 200 70" # }}} power options # @@ -84,7 +88,8 @@ vlh "alsamixer -c 2" # aptr "sudo apt remove" # aptu "sudo apt upgrade" -# pacman +# pacman {{{ # + pc "sudo pacman -S" pcr "sudo pacman -Rs" pcud "sudo pacman -Sy" @@ -94,6 +99,8 @@ xpc "pacman -Qqe > ~/linux-config/txt/nzxt-pkgs.txt" # tri "trizen -S --noconfirm" tri "trizen -S" +# }}} pacman # + # internet pgo "ping -c 3 8.8.8.8" dh "sudo dhcpcd" @@ -120,13 +127,14 @@ chr "google-chrome" # h "htop -s PERCENT_MEM" # hc "htop -s PERCENT_CPU" r "ranger" -mr "man ranger" +mra "man ranger" clc "cloc ." n "nvim" sn "sudo nvim" fh "feh" sx "sxiv" -sxg "sxiv -a" +sxa "sxiv -a" +wg "wego" wp "grep wallpaper ~/.cache/wal/colors.sh" # rsl "java -jar ~/Downloads/RuneLite.jar" @@ -158,25 +166,50 @@ yu "echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard" p3 "python3" py "python" +# watson {{{ # + w "watson" wa "watson start" we "watson edit" wl "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" wt "watson status" +# }}} watson # + # }}} applications # # git {{{ # -# aliases {{{ gstr "git config credential.helper store" g "git" -# add {{{ # +# branch {{{ # + +gb "git branch" +gba "git branch --no-merged && echo '' && git branch --merged" +gbu "git branch --no-merged" +gbm "git branch --merged" + +# }}} branch # + +gr "git remote" + +# add/remove {{{ # + ga "git add -A . && git status -u" gac "git add -A . && git commit -S" # unsigned commt gacu "git add -A . && git commit" + +grm "git rm" +grmf "git rm -f" +grmc "git rm --cached" +grmfc "git rm -f --cached" + # }}} add # # diff/log {{{ # @@ -201,16 +234,19 @@ gls "git ls-tree HEAD --name-only" # push {{{ # gst "git stash" +gstl "git stash list" gstp "git stash pop" gc "git commit -S" gcu "git commit" -gcam "git add -A . && git commit --amend --no-edit -S" +gca "git add -A . && git commit --amend --no-edit -S" +gcam "git add -A . && git commit --amend -S" # gcamp "git add -A . && git commit --amend --no-edit -S && gpsf" psgi "git add . && git commit -m 'Update' -S && git push" gps "git push" -gpsn "git push --set-upstream origin master" +# gpsn "git push --set-upstream origin master" +gpsn "eval (git push 2>&1 | tail -n 2)" gpsf "git push --force" gclear "git stash clear" @@ -223,17 +259,14 @@ grbc "git rebase --continue" crm "mrk README.md" -# aliases }}} - gcho "git checkout" gchon "git checkout -b" +gf "git fetch" gcln "git clone" gchp "git cherry-pick" gchpc "git cherry-pick --continue" -# }}} merge repos # - # assume file unchanged gunc "git update-index --assume-unchanged" @@ -296,7 +329,7 @@ hps "python3 -m http.server" # j "jekyll" # js "jekyll serve" h "hugo" -he "hugo serve --disableFastRender" +he "hugo serve -D --disableFastRender" ss "ssh kevin@192.168.0.100" @@ -305,10 +338,17 @@ ss "ssh kevin@192.168.0.100" # school {{{ # # 369 +# a2 +m "printf '\033c' && bear make" +mc "bear make clean" +mcr "bear make clean && printf '\033c' && bear make && ./carsim light 10 50" +mr "printf '\033c' && make && ./carsim stop 1 4" +# mr "printf '\033c' && bear make && ./carsim light 1 50" +hl "valgrind --tool=helgrind ./carsim stop 10 50 > helgrind.txt 2>&1 && valgrind --tool=helgrind ./carsim light 10 50 >> helgrind.txt 2>&1" + +# a1 # sa "ssh k@192.168.0.17" # 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" -m "printf '\033c' && make" -mc "make clean" # }}} school # diff --git a/fish/.config/fish/completions/watson.fish b/fish/.config/fish/completions/watson.fish index 8ddda5d..ad1318c 100644 --- a/fish/.config/fish/completions/watson.fish +++ b/fish/.config/fish/completions/watson.fish @@ -1,5 +1,5 @@ # copy this into ~/.config/fish/completions/ to enable autocomplete for the watson time tracker -# + function __fish_watson_needs_sub -d "provides a list of sub commands" set cmd (commandline -opc) if [ (count $cmd) -eq 1 -a $cmd[1] = 'watson' ] @@ -19,12 +19,61 @@ function __fish_watson_using_command -d "determine if watson is using the passed return 1 end +function __fish_watson_set_cache_vars -d "set vars used for caches" + if test -n "$WATSON_DIR" + set -g _watson_dir $WATSON_DIR + else + # TODO: set dir for Darwin (not sure how to do regex in fish) # + set -g _watson_dir "$HOME/.config/watson" + end + set -g _watson_frame_file "$_watson_dir/frames" + set -g _watson_projects_cache "$_watson_dir/projects_cache" + set -g _watson_tags_cache "$_watson_dir/tags_cache" + set -g _watson_frames_cache "$_watson_dir/frames_cache" +end + +function __get_date_num -d "return last modified time of file" + date -r $argv[1] +%s +end + +function __fish_watson_check_if_refresh_cache -d "see if cache file needs refreshing" + if begin not test -e $argv[1]; + or test (__get_date_num $_watson_frame_file) \ + -gt (__get_date_num $argv[1]); end + return 1 + else + return 0 + end +end + function __fish_watson_get_projects -d "return a list of projects" - command watson projects + __fish_watson_set_cache_vars + __fish_watson_check_if_refresh_cache $_watson_projects_cache + if test $status -eq 1 + command watson projects | tee $_watson_projects_cache + else + cat $_watson_projects_cache + end end function __fish_watson_get_tags -d "return a list of tags" - command watson tags + __fish_watson_set_cache_vars + __fish_watson_check_if_refresh_cache $_watson_tags_cache + if test $status -eq 1 + command watson tags | tee $_watson_tags_cache + else + cat $_watson_tags_cache + end +end + +function __fish_watson_get_frames -d "return a list of frames" #TODO, use watson logs to get more info + __fish_watson_set_cache_vars + __fish_watson_check_if_refresh_cache $_watson_frames_cache + if test $status -eq 1 + command watson frames | tee $_watson_frames_cache + else + cat $_watson_frames_cache + end end function __fish_watson_has_project -d "determine if watson is using a passed command and if it has a project" @@ -51,10 +100,6 @@ function __fish_watson_has_from -d "determine if watson is using a passed comman return 1 end -function __fish_watson_get_frames -d "return a list of frames" #TODO, use watson logs to get more info - command watson frames -end - function __fish_watson_needs_project -d "check if we need a project" set cmd (commandline -opc) if [ (count $cmd) -ge 2 -a $cmd[1] = 'watson' ] diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index 07ef03f..74e97b6 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -10,12 +10,12 @@ set -x GPG_TTY (tty) # }}} login to X # # input -xset r rate 200 70 fish_vi_key_bindings set -x EDITOR nvim set -x VISUAL nvim builtin cd $last_dir +bind \ce edit_command_buffer # fish-specific source /home/kevin/.config/fish/key_abbr.fish @@ -25,6 +25,7 @@ abbr f.. "cd ../.." # spv set -U spv_dir "/home/kevin/coding/spotify-lib-vis" +set -U mfs_dir "/home/kevin/coding/mf-site" source $spv_dir/src/api-keys.sh # 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 @@ -35,9 +36,22 @@ set -x PASSWORD_STORE_CLIP_TIME 120 # fxn abbr's abbr ag "grep-aliases" abbr ev "evince-silent" +# git {{{ # + abbr gcamp "git-amend-push" abbr gdf "git-diff-files" abbr gpsmt "git-push-multiple" +abbr grmb "git-delete-branch" + +# }}} git # abbr hs "scan-history" abbr ut "unix-timestamp" abbr z "zathura-silent" + +set -U BROWSER "chromium" +abbr hm "cd $mfs_dir && hugo serve -D --disableFastRender" + +abbr ga2 "gdb-a2" +abbr grc "grep-c" +abbr grh "grep-headers" +abbr cs "carsim" diff --git a/fish/.config/fish/functions/carsim.fish b/fish/.config/fish/functions/carsim.fish new file mode 100644 index 0000000..04aedbd --- /dev/null +++ b/fish/.config/fish/functions/carsim.fish @@ -0,0 +1,5 @@ +function carsim + printf '\033c' + # and ./carsim stop $argv[1] $argv[2] + and ./carsim light $argv[1] $argv[2] +end diff --git a/fish/.config/fish/functions/gdb-a2.fish b/fish/.config/fish/functions/gdb-a2.fish new file mode 100644 index 0000000..e2a6dfc --- /dev/null +++ b/fish/.config/fish/functions/gdb-a2.fish @@ -0,0 +1,10 @@ +function gdb-a2 + gdb -ex "b safeStopSign.c:40" -ex "b safeStopSign.c:44" -ex "run" \ + # gdb -ex "run" \ + # -ex "p cur_lane_queue.count" \ + # -ex "p cur_front->car->index" \ + # -ex "p cur_front->car" \ + --args ./carsim stop 1 4 + # --args ./carsim light 1 4 + # gdb -ex "b safeStopSign.c:86" -ex "run" --args ./carsim stop 1 10 +end diff --git a/fish/.config/fish/functions/git-delete-branch.fish b/fish/.config/fish/functions/git-delete-branch.fish new file mode 100644 index 0000000..58a7bdb --- /dev/null +++ b/fish/.config/fish/functions/git-delete-branch.fish @@ -0,0 +1,4 @@ +function git-delete-branch + git push origin --delete $argv[1] + and git branch -D $argv[1] +end diff --git a/fish/.config/fish/functions/grep-c.fish b/fish/.config/fish/functions/grep-c.fish new file mode 100644 index 0000000..b8a5670 --- /dev/null +++ b/fish/.config/fish/functions/grep-c.fish @@ -0,0 +1,3 @@ +function grep-c + grep -nr --include \*.c $argv[1] ./ +end diff --git a/fish/.config/fish/functions/grep-headers.fish b/fish/.config/fish/functions/grep-headers.fish new file mode 100644 index 0000000..152fec0 --- /dev/null +++ b/fish/.config/fish/functions/grep-headers.fish @@ -0,0 +1,3 @@ +function grep-headers + grep --color=auto -nr --include \*.h $argv[1] ./ +end diff --git a/fish/.config/fish/functions/scan-history.fish b/fish/.config/fish/functions/scan-history.fish index 4a2cc86..6503956 100644 --- a/fish/.config/fish/functions/scan-history.fish +++ b/fish/.config/fish/functions/scan-history.fish @@ -1,5 +1,6 @@ function scan-history sudo systemctl start postgresql.service + and systemctl status postgresql.service and $spv_dir/src/update-history.sh and cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1 end diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 451897a..0ff196c 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -1,8 +1,7 @@ # startup {{{ # -set $browser "firefox" +# set $browser "firefox" +set $browser "chromium" set $def_term "urxvt" -# set $runelite "java -jar ~/Downloads/RuneLite.jar" -set $swex "sudo ~/Downloads/swex.appimage" exec redshift -O 2000 # exec redshift -O 3000 # random bg @@ -10,6 +9,7 @@ exec compton exec wal -i "$HOME/Pictures/Backgrounds/dim/non-editing" exec imwheel exec xmodmap ~/.Xmodmap +exec xset r rate 200 70 exec xrdb ~/.Xresources exec --no-startup-id start-pulseaudio-x11 exec --no-startup-id i3-msg 'workspace $ws2; exec $def_term' @@ -29,7 +29,8 @@ bindsym Mod4+a exec studio # bindsym Mod4+2 exec xdotool click --repeat 10 --delay 100 1 # bindsym Mod4+3 exec xdotool click --repeat 20 --delay 100 1 # bindsym $mod+control+Return exec i3-sensible-terminal -bindsym $mod+control+Return exec $def_term +# bindsym $mod+control+Return exec $def_term +bindsym control+Return exec $def_term bindsym Mod4+c exec $browser bindsym Mod4+f exec firefox bindsym Mod4+$mod+f exec echo 'Kevin@fosstodon.org' | xclip -selection clipboard @@ -49,7 +50,7 @@ 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+x exec $swex -# bindsym Mod4+x exec xmodmap ~/.Xmodmap +bindsym Mod4+x exec xmodmap ~/.Xmodmap && xset r rate 200 70 bindsym Mod4+z exec cliqz # bindsym Print exec gscreenshot bindsym Print --release exec "scrot -s /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'" @@ -97,6 +98,9 @@ bindsym Shift+F0 exec xbacklight -set 100 # }}} menu # # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod + +for_window [class="Peek"] floating enable + # }}} applications # # changing/focusing/moving windows {{{ # @@ -134,7 +138,8 @@ bindsym $mod+b split h # split in vertical orientation bindsym $mod+v split v -bindsym control+Shift+x kill +# bindsym control+Shift+x kill +bindsym shift+x kill # }}} changing/focusing/moving windows # # container display {{{ # @@ -203,7 +208,8 @@ set $ws2 "2 " workspace $ws2 output $samsung bindsym $mod+F2 workspace $ws2; exec $def_term -set $ws3 "3 " +# set $ws3 "3 " +set $ws3 "3 " workspace $ws3 output $benq bindsym $mod+F3 workspace $ws3; exec $browser @@ -331,10 +337,10 @@ bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcu # }}} reload config # # resizing windows {{{ # -bindsym $mod+control+h resize grow width 3 px or 3 ppt -bindsym $mod+control+k resize grow height 3 px or 3 ppt -bindsym $mod+control+j resize shrink height 3 px or 3 ppt -bindsym $mod+control+l resize shrink width 3 px or 3 ppt +bindsym $mod+control+h resize grow width 5 px or 5 ppt +bindsym $mod+control+k resize grow height 5 px or 5 ppt +bindsym $mod+control+j resize shrink height 5 px or 5 ppt +bindsym $mod+control+l resize shrink width 5 px or 5 ppt # }}} resizing windows # # gaps {{{ # diff --git a/scripts/compile_commands.json b/scripts/compile_commands.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/scripts/compile_commands.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/shell/.zshrc b/shell/.zshrc index dab3069..d6d46c0 100644 --- a/shell/.zshrc +++ b/shell/.zshrc @@ -176,6 +176,7 @@ source /home/kevin/coding/spotify-lib-vis/src/api-keys.sh export GPG_TTY=$(tty) export PASSWORD_STORE_CLIP_TIME=120 -source /home/kevin/.key_aliases +source /home/kevin/.shortcuts #exec fish +source /home/kevin/.key_aliases diff --git a/stow.sh b/stow.sh index 75714c7..2ff1862 100755 --- a/stow.sh +++ b/stow.sh @@ -1,3 +1,3 @@ #!/bin/bash -stow git i3 i3blocks input neofetch ranger shell vim x +stow git i3 i3blocks input neofetch ranger shell vim x zathura diff --git a/txt/exclude-dirs-backup.txt b/txt/exclude-dirs-backup.txt index fe86d73..a32614b 100644 --- a/txt/exclude-dirs-backup.txt +++ b/txt/exclude-dirs-backup.txt @@ -1,5 +1,6 @@ /home/kevin/.cache /home/kevin/.local/share/Steam +/home/kevin/coding/linux-* /home/kevin/VirtualBox VMs /lost+found /mnt diff --git a/txt/key_dirs.txt b/txt/key_dirs.txt index ea6bb9a..30baae5 100644 --- a/txt/key_dirs.txt +++ b/txt/key_dirs.txt @@ -5,7 +5,7 @@ cf /home/kevin/.config lc /home/kevin/linux-config/ d /home/kevin/Downloads D /home/kevin/Documents -fc /home/kevin/.config/fish +fo /home/kevin/.config/fish ff /home/kevin/linux-config/fish/.config/fish/functions fs /home/kevin/linux-config/fish/.config/fish k /home/kevin/ @@ -14,6 +14,7 @@ me /run/media/kevin o / p /home/kevin/.password-store P /home/kevin/Pictures +t /tmp # }}} sys * @@ -24,8 +25,9 @@ cn /home/kevin/coding ib /home/kevin/linux-config/configs/i3blocks-scripts j /home/kevin/Documents/journal lh /home/kevin/Documents/listening-history -mh /home/kevin/coding/mf-site -ms /home/kevin/coding/best-mf-site-personal +ms /home/kevin/coding/mf-site +mh /home/kevin/coding/mf-site/layouts +# mg /home/kevin/coding/best-mf-site-personal ra /home/kevin/.config/ranger sr /home/kevin/linux-config/scripts snp /home/kevin/.vim/plugged/vim-snippets/UltiSnips @@ -41,7 +43,7 @@ wo /home/kevin/Documents/workout-logs/11 sc /home/kevin/school 0 /home/kevin/school/309 -e1 /home/kevin/school/309/e1 +e2 /home/kevin/school/309/e2 6 /home/kevin/school/369 a2 /home/kevin/school/369/a2/a2 hp /home/kevin/school/hps diff --git a/txt/key_files.txt b/txt/key_files.txt index cad5e7c..0106da6 100644 --- a/txt/key_files.txt +++ b/txt/key_files.txt @@ -23,12 +23,14 @@ cm ./commit-msg.txt hlg /home/kevin/coding/spotify-lib-vis/src/api/management/commands/update-history.log id /home/kevin/coding/project-ideas/ideas.md ig ./.gitignore -jn /home/kevin/Documents/journal/todo/1.md +jn /home/kevin/Documents/journal/todo/2.md jt /home/kevin/Documents/journal/todo/todo.md lh /home/kevin/Documents/listening-history/polarbier.csv +mc /home/kevin/coding/mf-site/assets/sass/main.scss +mi /home/kevin/coding/mf-site/ideas.md ne /home/kevin/linux-config/configs/neofetch/config.conf re README.md tm /home/kevin/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets +wt /home/kevin/.config/watson/state.tmp # }}} cdn * - diff --git a/vim/.vimrc b/vim/.vimrc index 73935ef..f23c8db 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -26,9 +26,11 @@ set linespace=5 " }}} cursor indicator " -set timeoutlen=500 +" set timeoutlen=500 +set timeoutlen=350 set hlsearch set noswapfile +let maplocalleader="-" " }}} set x=y " " commands for file types {{{ " @@ -37,12 +39,14 @@ autocmd VimResized * wincmd = autocmd BufNewFile,BufRead .* set syntax=sh filetype plugin on filetype indent on -autocmd FileType css,htmldjango,html,tex,markdown set tabstop=2 shiftwidth=2 expandtab +autocmd FileType *css,htmldjango,html,tex,markdown,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 Filetype c let maplocalleader="\\" autocmd BufWritePost key_* !sync-shortcuts autocmd VimLeave *.tex !tex-clean % @@ -165,11 +169,11 @@ Plug 'dag/vim-fish' call plug#end() +" }}} vim-plug " + " colorscheme gotham256 colorscheme wal -" }}} vim-plug " - " Mappings {{{ " " function keys {{{ " @@ -213,12 +217,16 @@ nnoremap dg ggdG nnoremap D "+dd " delete entire buffer into system clipboard nnoremap DA "+ggdG +" find copied text +nnoremap f q/p " find alias nnoremap fa /^ " find merge conflicts nnoremap fc /[<>=\|]\{7\} " reload folds nnoremap ff :set foldmethod=marker zM +" find copied text +nnoremap ft /TODO " toggle search highlighting nnoremap h :set hlsearch! hlsearch? " help @@ -252,6 +260,8 @@ vnoremap r q:is///g3ha nnoremap rv :source $MYVIMRC " replace in entire file nnoremap R q:i%s///g2F/i +" sort lines until end of file +vnoremap s :sort " run current file in shell nnoremap sh :!%:p " sort lines until end of file @@ -279,9 +289,17 @@ nnoremap z za " }}} Mappings " -" (tex) Local Mappings {{{ " -let maplocalleader="-" -autocmd Filetype c inoremap s struct pixel +" Local Mappings {{{ " + +autocmd Filetype c nnoremap g :YcmCompleter GoTo + +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 autocmd Filetype tex inoremap c \checkmark @@ -317,9 +335,6 @@ autocmd Filetype tex inoremap Z \mathbb{Z} autocmd Filetype tex inoremap wx $w(x)$ autocmd Filetype tex inoremap tx $t(x)$ -autocmd Filetype md inoremap x 0f[lRX - -autocmd Filetype fish inoremap 1 $argv[1] -autocmd Filetype fish inoremap 2 $argv[2] +" }}} tex " " }}} Local Mappings " diff --git a/zathura/.config/zathura/zathurarc b/zathura/.config/zathura/zathurarc new file mode 100644 index 0000000..f4cc787 --- /dev/null +++ b/zathura/.config/zathura/zathurarc @@ -0,0 +1,3 @@ +set recolor true +set recolor-darkcolor "#dcdccc" +set recolor-lightcolor "#1f1f1f"