diff --git a/aliases/key_aliases.tmpl b/aliases/key_aliases.tmpl index f0c2c64..ce2f697 100644 --- a/aliases/key_aliases.tmpl +++ b/aliases/key_aliases.tmpl @@ -28,8 +28,14 @@ td "tldr" # display [[[ # # nvt "nvidia-settings --assign CurrentMetaMode='DVI-I-1: nvidia-auto-select +0+0 {ForceCompositionPipeline=On}, HDMI-0: nvidia-auto-select +3840+0 {ForceCompositionPipeline=On}'" -{{ if eq .chezmoi.fullHostname "x1-carbon" }} xr "xrandr" + +{{ if eq .chezmoi.fullHostname "nzxt" }} +xrn "xrandr --output HDMI-0 --rotate normal" +xrr "xrandr --output HDMI-0 --rotate right" +{{ end }} + +{{ if eq .chezmoi.fullHostname "x1-carbon" }} xro "xrandr --output HDMI2 --off" xrr "xrandr --output HDMI2 --auto --right-of eDP1 --scale 1.33x1.33" xrm "xrandr --output HDMI2 --auto --same-as eDP1 --scale 1.33x1.33" @@ -45,9 +51,11 @@ mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg" ba "bat" # ba "bat *" awkp "awk -F',' '{print \$0}'" +fde "fd -e" grep "grep --color=auto -n" grpr "grep -r" rg "rg -S" +rge "rg -St" # pk "pkill -f" cld "colordiff -wy --suppress-common-lines" @@ -78,12 +86,15 @@ nctr "sudo systemctl restart netctl-auto@wlp4s0.service" cpssh "ssh-copy-id -i ~/.ssh/id_rsa.pub" xcssh "bat ~/.ssh/id_rsa.pub | xclip -selection clipboard" -sp "mosh --ssh='ssh -p 8022' 192.168.0.12" +# digital ocean ssd "mosh --ssh='ssh -p 399' kevin@165.22.239.234 tmux a" -sfd "sftp -P 399 kevin@165.22.239.234" sdh "mosh --ssh='ssh -p 399' kevin@165.22.239.234 htop" +sfd "sftp -P 399 kevin@165.22.239.234" +# phone +ssp "mosh --ssh='ssh -p 8022' 192.168.0.13" +sfp "sftp -P 8022 192.168.0.13" # test server sites -svp "firefox git.ataraxy.tk khkm.tk cal.khkm.tk pste.gq smol.gq twem.tk" +# svp "firefox git.ataraxy.tk khkm.tk cal.khkm.tk pste.gq smol.gq twem.tk" # postgres ssh tunnel sdt "ssh kevin@165.22.239.234 -L 5433:localhost:5432" @@ -103,7 +114,7 @@ udub "udisksctl unmount -b /dev/sdc2" # ]]] mounting # -tc "touch" +tch "touch" vdr "vidir --verbose" # directory-related [[[ # @@ -236,6 +247,7 @@ apu "apt upgrade" # python [[[ # py "python" +py2 "python2" # pyt "printf '\033c' && pytest -vvs" pyt "clear && tmux clear-history && pytest -vvs" pyts "clear && tmux clear-history && pytest -vv" @@ -280,13 +292,19 @@ am "antimicro" a "task" aa "task add" aal "task add proj:lnx" +aam "task add proj:mny" +aap "task add proj:" +aas "task add proj:sch" +aay "task add proj:pey" ac "task context" acn "task context none && task" ach "task context home && task" aco "task context out && task" acs "task context sch && task" -acpl "task completed" -al "task limit:10" +af "task proj:" +apl "task completed" +al "task limit:15" +alg "task log" ans "task +next" ao "taskopen" asm "task summary" @@ -316,6 +334,7 @@ bw "buku --immutable 1 -zw -1" # ]]] buku # cc "calcurse" ccc "calcurse -D ~/.calcurse/alt-cals/class" +cci "calcurse -i" ccs "calcurse-caldav" chr "google-chrome" clc "cloc ." @@ -326,7 +345,7 @@ fh "feh" fi "fish" gpd "gpg --decrypt" gpe "gpg --encrypt --recipient" -hb "habitctl log" +h "habitctl log" # hbe "habitctl edit" # hbeh "habitctl edith" htc "htop -s PERCENT_CPU" @@ -339,6 +358,7 @@ ka "killall" kd "killall Discord && killall Discord" kr "killall electron" kt "killall thunderbird" +lio "libreoffice" mp "mpv --volume=50" mra "man ranger" # mt "minetest" @@ -348,23 +368,26 @@ p3 "python3" pdft "pdftotext" pipes "pipes.sh -t 3" py "python" -qc "qalc '" -qcg "qalculate-gtk" +q "qalc '" +qg "qalculate-gtk" r "ranger" rbg "ranger --selectfile (grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2)" # rgc "printf '\033c' && rg" # rgc "printf '\033c' && rg" rgc "clear && tmux clear-history && rg -S" rx "redshift -x" +scm "sc-im" sn "sudo nvim" +sqlb "sqlitebrowser" ss "mosh" stp "termdown" # sw "swex" t "tmux"#[[[ ta "tmux a -t" -tac "tmux a -t config || tmux new -s config" +tacf "tmux a -t config || tmux new -s config" taj "tmux a -t journal || tmux new -s journal" tal "tmux a" +tc "clear && tmux clear-history" tk "tmux kill-server" tl "tmux ls" tn "tmux new -s" @@ -372,7 +395,10 @@ tnb "tmux new -s backup" #]]] usn "usernames --num 20" vmd "vimdiff" -wg "wego" +# wg "wego" +wg "curl -L wthr.ml" +wgm "curl -L wthr.ml/m" +wgt "curl -L wthr.ml/t" ytd "youtube-dl" z "zathura --fork" @@ -429,9 +455,10 @@ wl "watson log -Gcd" wla "watson log -Gca -p" wlat "watson log -Gca -T" ww "watson log -Gc" +wwb "watson log -Gc | bat" wr "watson report -Gcd" wra "watson report -Gca -p" -wram "watson report -Gca | rg -S '^\w.*-\s\d*h' | sort -t' ' -hk3" +wram "watson report -Gca | rg -S '^\w.*-\s\d*h' | sort -t' ' -hk3 | sed 's/ - /,/' | xsv table" wrat "watson report -Gca -T" wrw "watson report -Gc" @@ -457,10 +484,12 @@ gba "git branch --no-merged && echo '' && git branch --merged" gbu "git branch --no-merged" gbm "git branch --merged" -gsm "git submodule add" +gsm "git submodule" gsmp "git submodule foreach git pull" +gsmu "git submodule update --recursive --remote" gmg "git merge" +gmgts "git merge -X theirs" gmgt "git mergetool" gr "git remote -v" @@ -481,6 +510,9 @@ gaf "git add -f" # unsigned commt gacu "git add -A && git commit" +glf "git lfs" +glfi "git lfs install" + grm "git rm" grmf "git rm -f" grmc "git rm --cached" @@ -515,7 +547,7 @@ gchn "git checkout -b" gchm "git checkout master" gchnw "git checkout -b wip" gchw "git checkout wip" -gchfh "git checkout HEAD --" +gchh "git checkout HEAD --" grom "git reset --hard origin/master" gheadm1 "git reset --hard HEAD~1" @@ -564,6 +596,7 @@ gunc "git update-index --assume-unchanged" # coding projs [[[ # +tld "tldr" # fsl "zathura --fork ~/coding/fastest-languages.pdf" fsl "bat ~/Documents/fastest-languages/fastest-languages.md" rgt "rg TODO" @@ -604,14 +637,14 @@ upip "pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xa ureq "pip freeze > requirements.txt" # show last history scan -hlg "psql -d spotifyvis -a -f /home/kevin/coding/spotify-lib-vis/src/scripts/history.sql | rg 2019 | tac" +hlg "psql -d spotifyvis -a -f /home/kevin/coding/spotify-lib-vis/src/scripts/queries/history.sql | rg 2019 | tac" slg "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" # removes all but newest file # rmol "ls -t | tail -n +2 | xargs rm -- && l" -snw "spotify-now -i '%artist - %title'" +# snw "spotify-now -i '%artist - %title'" svd "pg_dump spotifyvis > spotifyvis.bak" @@ -631,7 +664,7 @@ wr0 "watson report --all --project=309 --tag=phase2" # server [[[ # -# nd "node" +no "node" ndm "nodemon" knd "killall node" mg "mongo" @@ -659,11 +692,12 @@ gpsh "git push heroku" # mfs [[[ # -ht "python3 -m http.server" +pyh "python -m http.server" # j "jekyll" # js "jekyll serve" -h "hugo" -he "hugo serve -D --disableFastRender" +hu "hugo" +hd "hugo server -D --disableFastRender --bind 192.168.0.10 --baseURL 'http://192.168.0.10:1313'" +hg "hugo serve --disableFastRender" # ]]] mfs # @@ -696,14 +730,15 @@ wrm "watson report --all --project=minetest" wamv "watson start minetest +video" mtg "minetest" -ms "minetestserver" -msc "minetestserver --gameid minetest --worldname Creative --terminal" -# msh "minetestserver --gameid minetest --worldname Hevin --config ~/.minetest/hevin.conf --terminal" -msh "minetestserver --gameid mineclone2 --worldname Hevin-MC --config ~/.minetest/hevin-mc.conf --terminal" -msv "minetestserver --gameid minimal --worldname Test --terminal" +mts "minetestserver" +mtsc "minetestserver --gameid minetest --worldname Creative --terminal" +# mtsh "minetestserver --gameid minetest --worldname Hevin --config ~/.minetest/hevin.conf --terminal" +mtsh "minetestserver --gameid mineclone2 --worldname Hevin-MC --config ~/.minetest/hevin-mc.conf --terminal" +mtsv "minetestserver --gameid minimal --worldname Test --terminal" # mtrsy "rsync -vr .minetest/ /mnt/linux-files/.minetest/" tet "pandoc -f markdown -t html twitch-emote-conversion.md | xclip -selection clipboard" +shrg "printf '¯\\\\\\\\\\_(ツ)_/¯' | xclip -selection clipboard" # ]]] games # @@ -712,16 +747,17 @@ tet "pandoc -f markdown -t html twitch-emote-conversion.md | xclip -selection cl # basic # wlf "watson log --all --tag=final" # wrf "watson report --all --tag=final" +gpa "column -ts',' ~/Documents/gpa.md" ssc "mosh mokkar@teach.cs.utoronto.ca" -# alg course -jc "javac -d out *.java" -jr "java -cp \"$CLASSPATH:out\"" +# 324 +rhs "clear && tmux clear-history && runhaskell Ex3.hs" +rk "clear && tmux clear-history && raco test" +rki "racket -l racket/base -i" +rke "clear && tmux clear-history && raco test ex1.rkt" -# 263 -wl6 "watson log --all --project=263 --tag=a5" -wr6 "watson report --all --project=263 --tag=a5" -z6 "zathura --fork ~/school/263/Introduction-to-Algorithms-CLRs/Introduction\ to\ Algorithms\ -\ 3rd\ Edition.pdf" -pd6 "pdflatex a5" +# 384 +rgp "clear && tmux clear-history && rg -S -t py" +8aa "clear && tmux clear-history && python2 autograder.py" # ]]] school # diff --git a/aliases/key_dirs.tmpl b/aliases/key_dirs.tmpl index e76f807..97776b4 100644 --- a/aliases/key_dirs.tmpl +++ b/aliases/key_dirs.tmpl @@ -13,6 +13,7 @@ k ~/ lc ~/linux-config lf /mnt/linux-files lfv /mnt/linux-files/Videos +me /run/media/kevin o / p ~/.password-store P ~/Pictures @@ -32,6 +33,7 @@ sv /etc/systemd/system ad ~/.task ccd ~/.calcurse cn ~/coding +drk ~/coding/dark-sky hbd ~/.habitctl ib ~/linux-config/dot_config/i3blocks/scripts ra ~/linux-config/dot_config/ranger @@ -49,7 +51,7 @@ ft ~/coding/face-tracker j ~/Documents/journal lh ~/Documents/listening-history mmd ~/coding/move-mouse-with-head -mfs ~/coding/mf-site +ms ~/coding/mf-site mh ~/coding/mf-site/layouts # mg ~/coding/best-mf-site-personal sv ~/coding/spotify-lib-vis/src @@ -88,25 +90,11 @@ adP ~/Pictures/ada-mario sc ~/school lt ~/school/latex-notes -6 ~/school/263 -63 ~/school/263/a5 -# 631 ~/school/263/a5/q1 -# 632 ~/school/263/a5/q2 -633 ~/school/263/a5/q3 -63t ~/school/latex-notes/263/a5 +2 ~/school/324 +2e ~/school/324/e/3 -al1 ~/school/algorithms/w1-union-find - -# 309 [[[ # - -0c ~/school/309-proj/css -0d ~/school/309 -0j ~/school/309-proj/public/js -0l ~/school/309/l -0p ~/school/309-proj -0m ~/school/309-proj/mongo - -# ]]] 309 # +8 ~/school/384 +8a ~/school/384/a1 +8t ~/school/latex-notes/384/a1 # ]]] sch # - diff --git a/aliases/key_files.tmpl b/aliases/key_files.tmpl index a2bfa9d..9d62cfe 100644 --- a/aliases/key_files.tmpl +++ b/aliases/key_files.tmpl @@ -8,7 +8,7 @@ ak ~/linux-config/dot_ssh/authorized_keys-all d ~/linux-config/aliases/key_dirs.tmpl dw ~/dwm/config.def.h f ~/linux-config/aliases/key_files.tmpl -h ~/.local/share/fish/fish_history +fh ~/.local/share/fish/fish_history n ~/linux-config/dot_vimrc.tmpl p ~/linux-config/txt/pacman-pkgs/pacman-pkgs.txt r ~/linux-config/dot_config/ranger/rc.conf.tmpl @@ -31,13 +31,14 @@ ng /etc/nginx/nginx.conf # cdn [[[ # ap ~/.task/pending.data +at ~/.task/to-add.md bid ~/Documents/journal/todo/blog.md cc ~/linux-config/private_dot_calcurse/conf ci ~/linux-config/txt/ideas.md cm ./commit-msg.txt cmt /tmp/commit-msg.txt -hb ~/.habitctl/log -hbh ~/.habitctl/habits +h ~/.habitctl/log +hh ~/.habitctl/habits hlg ~/coding/spotify-lib-vis/src/api/management/commands/update-history.log id ~/Documents/journal/todo/ideas.md ig ./.gitignore @@ -74,6 +75,10 @@ wt ~/.config/watson/state.tmp # ]]] 309 # +# 384 +8a ~/school/384/a1/searchAgents.py +8s ~/school/384/a1/search.py + # ]]] sch # mta ~/.minetest/clientmods/custom_aliases/init.lua diff --git a/dot_Xresources.tmpl b/dot_Xresources.tmpl index 874648e..c053602 100644 --- a/dot_Xresources.tmpl +++ b/dot_Xresources.tmpl @@ -1,6 +1,7 @@ /* dpi [[[ */ Xft.dpi: 135 +! Xft.dpi: 170 Xft.autohint: 0 Xft.lcdfilter: lcddefault Xft.hintstyle: hintfull @@ -42,8 +43,8 @@ URxvt*transparent: true URxvt*inheritPixmap: true ! URxvt*transparent: false ! URxvt*shading: 0 (blackest) to 99 black, 101 to 200 (whitest) white -URxvt*shading: 50 -! URxvt*shading: 40 +! URxvt*shading: 50 +URxvt*shading: 40 ! URxvt*shading: 35 ! urxvt*blurRadius: 10 diff --git a/dot_config/fish/config.fish.tmpl b/dot_config/fish/config.fish.tmpl index 745a5aa..20a6399 100755 --- a/dot_config/fish/config.fish.tmpl +++ b/dot_config/fish/config.fish.tmpl @@ -99,9 +99,15 @@ abbr aan "task-anno" abbr ae "task-edit" abbr adl "task-delete" abbr adn "task-done" +abbr adu "task-due" +abbr adr "task-due-rm" abbr an "task-next" +abbr anr "task-next-rm" abbr ant "task-notes" abbr apr "task-mod-pri" +abbr aprl "task-mod-pri L" +abbr aprm "task-mod-pri M" +abbr aprh "task-mod-pri H" abbr apj "task-mod-proj" abbr at "task-mod-tag" abbr asr "task-start" @@ -113,6 +119,7 @@ abbr b "buku-fzf" abbr bf "buku-fzf fq" abbr bq "benq-brightness" abbr bupp "backup-phone-pics" +abbr cccs "sync-alt-cal class" abbr cpc "copy cat" abbr cpe "copy echo" abbr cpp "copy echo (pwd)" @@ -122,8 +129,8 @@ abbr def "define" abbr ens "enable-site" abbr ev "evince-silent" # abbr fbg "find-bg" +abbr fv "fzf-vim" abbr fvft "find-vim-filetype" -abbr fzv "fzf-vim" # git [[[ # abbr gcamp "git-amend-push" @@ -131,16 +138,19 @@ abbr gclg "git-clone-gitea" abbr gdf "git-diff-files" abbr gpsi "git-push-initial" abbr gpsmt "git-push-multiple" -abbr gpng "git-push-new-gitea gitea" -abbr gpngo "git-push-new-gitea origin" +abbr gpng "git-push-new-gitea origin" +abbr gpngg "git-push-new-gitea gitea" abbr gremotes "git-mult-remotes" abbr grmb "git-delete-branch" abbr gro "git-replace-origin" +abbr grog "git-replace-origin-gitea" +abbr gsmb "git-submodule-branch" # ]]] git # abbr m "man-vim" abbr ma "man-vim task" abbr mat "math" +abbr mdf "mkdir-cd" abbr pgr "grep-pdf" abbr pgrf "grep-pdf-file" abbr png "git-push-new-gitea" @@ -152,9 +162,8 @@ abbr smd "smol-delete" abbr sml "smol-slist" abbr smr "smol-replace" abbr shrm "shred-rm" -abbr svs "scan-history" -abbr tac "tmux-attach config" -abbr taj "tmux-attach journal" +abbr shs "scan-history" +abbr svp "server-pages" abbr thes "thesaurus" abbr ut "unix-timestamp" abbr uzr "unzip-rm" @@ -176,4 +185,4 @@ abbr jct "java-compile-test" # ]]] fxn abbr's # # task sync > /dev/null 2>&1 -~/scripts/xmodmap-custom +# ~/scripts/xmodmap-custom diff --git a/dot_config/fish/functions/git-submodule-branch.fish b/dot_config/fish/functions/git-submodule-branch.fish new file mode 100644 index 0000000..70d94e4 --- /dev/null +++ b/dot_config/fish/functions/git-submodule-branch.fish @@ -0,0 +1,3 @@ +function git-submodule-branch + git submodule set-branch --branch $argv[2] -- $argv[1] +end diff --git a/dot_config/fish/functions/git/git-clone-gitea.fish b/dot_config/fish/functions/git/git-clone-gitea.fish index 6077717..979cc2c 100644 --- a/dot_config/fish/functions/git/git-clone-gitea.fish +++ b/dot_config/fish/functions/git/git-clone-gitea.fish @@ -1,3 +1,3 @@ function git-clone-gitea - git clone ssh://git@ataraxy.tk:399/Kevin-Mok/$argv[1].git + git clone ssh://git@kevin-mok.com:399/Kevin-Mok/$argv[1].git end diff --git a/dot_config/fish/functions/git/git-push-new-gitea.fish b/dot_config/fish/functions/git/git-push-new-gitea.fish index 5d1b230..36bb640 100644 --- a/dot_config/fish/functions/git/git-push-new-gitea.fish +++ b/dot_config/fish/functions/git/git-push-new-gitea.fish @@ -1,4 +1,4 @@ function git-push-new-gitea - git remote add $argv[1] ssh://git@ataraxy.tk:399/Kevin-Mok/$argv[2].git + git remote add $argv[1] ssh://git@kevin-mok.com:399/Kevin-Mok/$argv[2].git and git push --set-upstream $argv[1] master end diff --git a/dot_config/fish/functions/git/git-replace-origin-gitea.fish b/dot_config/fish/functions/git/git-replace-origin-gitea.fish new file mode 100644 index 0000000..c798138 --- /dev/null +++ b/dot_config/fish/functions/git/git-replace-origin-gitea.fish @@ -0,0 +1,6 @@ +function git-replace-origin-gitea + git remote remove origin + and git remote add origin ssh://git@kevin-mok.com:399/Kevin-Mok/$argv[1].git + and git branch --set-upstream-to=origin/master master + and git push +end diff --git a/dot_config/fish/functions/mkdir-cd.fish b/dot_config/fish/functions/mkdir-cd.fish new file mode 100644 index 0000000..0b71495 --- /dev/null +++ b/dot_config/fish/functions/mkdir-cd.fish @@ -0,0 +1,3 @@ +function mkdir-cd + mkdir -p $argv[1] && cd $argv[1] +end diff --git a/dot_config/fish/functions/server-pages.fish b/dot_config/fish/functions/server-pages.fish index 91728fc..071142e 100644 --- a/dot_config/fish/functions/server-pages.fish +++ b/dot_config/fish/functions/server-pages.fish @@ -1,8 +1,8 @@ function server-pages - set sites git.ataraxy.tk khkm.tk cal.khkm.tk mnpd.gq/k-bg pste.gq smol.gq twem.tk - set titles "Kevin Mok's Gitea" "Kevin Mok" "Baïkal server" "k-bg" "hastebin" "Kevin's URL Shortener" "Index of /" - # set sites mnpd.gq/k-bg - # set titles "k-bg" + set sites kevin-mok.com git.kevin-mok.com cal.khkm.tk mnpd.gq/kbg pste.gq smol.gq twem.tk + set titles "Kevin Mok" "Kevin Mok's Gitea" "Baïkal server" "kbg" "hastebin" "Kevin's URL Shortener" "Twitch Emote Links" + # set sites twem.tk + # set titles "Twitch Emote Links" for i in (seq (count $sites)) set title (wget -qO- "$sites[$i]" | perl -l -0777 -ne 'print $1 if /