Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

409 lines
9.1 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # system {{{ #
  2. # vim: fdm=marker
  3. # clear screen
  4. c "printf '\033c'"
  5. hst "history"
  6. nf "printf '\033c' && neofetch | lolcat"
  7. fi "fish"
  8. # reload urxvt
  9. ru "xrdb ~/.Xresources"
  10. # list file sizes in megabytes with depth 1
  11. duh "sudo du -d 1 -ah | sort -hr"
  12. dum "sudo du -d 1 -am | sort -hr"
  13. m "man"
  14. tl "tldr"
  15. nvt "nvidia-settings --assign CurrentMetaMode='DVI-I-1: nvidia-auto-select +0+0 {ForceCompositionPipeline=On}, HDMI-0: nvidia-auto-select +3840+0 {ForceCompositionPipeline=On}'"
  16. vgb "sudo nvim /etc/default/grub"
  17. mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg"
  18. b "bat"
  19. ba "bat *"
  20. grep "grep --color=auto -n"
  21. grr "grep -r"
  22. # pk "pkill -f"
  23. cld "colordiff -y --suppress-common-lines"
  24. mkpk "makepkg -sri"
  25. ex "chmod 777"
  26. ex "chmod 777"
  27. # systemctl {{{ #
  28. ctl "sudo systemctl"
  29. ctle "sudo systemctl enable"
  30. ctld "sudo systemctl disable"
  31. ctla "sudo systemctl start"
  32. ctls "sudo systemctl stop"
  33. ctlt "sudo systemctl status"
  34. ctltd "sudo systemctl status dhcpcd"
  35. ctlr "sudo systemctl restart"
  36. # }}} systemctl #
  37. wm "sudo wifi-menu"
  38. # mounting
  39. udm "udisksctl mount -b"
  40. udmb "udisksctl mount -b /dev/sdc2"
  41. udu "udisksctl unmount -b"
  42. udub "udisksctl unmount -b /dev/sdc2"
  43. tc "touch"
  44. # directory-related {{{ #
  45. ls "lsd"
  46. l "lsd -a"
  47. ll "lsd -al"
  48. smv "sudo mv"
  49. f "cd"
  50. fz "fzf"
  51. fnd "find . -type f -name"
  52. rmr "rm -rf"
  53. rmd "rm ~/Downloads/*"
  54. md "mkdir -p"
  55. rsy "rsync -Pr"
  56. # list all (un)mounted drives
  57. lhd "sudo fdisk -l"
  58. # get disc space for mounted drives
  59. # ds "df -h | tee >(head -n 1) >(grep sd) >/dev/null"
  60. ds "df -h | head -n 1 && df -h | grep sd"
  61. chownw "sudo chown -R kevin:wheel"
  62. chwnm "sudo chown -R kevin:wheel /run/media/kevin"
  63. # cd into backup folder and show backup sizes
  64. nbu "cd /run/media/kevin/backup-hd/nzxt/tar && lsd -l"
  65. # }}} directory-related #
  66. # power options {{{ #
  67. s "systemctl suspend"
  68. so "xset dpms force off"
  69. sd "systemctl poweroff"
  70. rb "systemctl reboot"
  71. lo "i3-msg exit"
  72. x "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE"
  73. X "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE"
  74. # }}} power options #
  75. # sound
  76. vlm "alsamixer -c 0"
  77. vlh "alsamixer -c 2"
  78. # apt
  79. # apti "sudo apt install"
  80. # aptr "sudo apt remove"
  81. # aptu "sudo apt upgrade"
  82. # pacman {{{ #
  83. pc "sudo pacman -S"
  84. pcq "sudo pacman -Qi"
  85. pcr "sudo pacman -Rns"
  86. pcud "sudo pacman -Sy"
  87. pcug "sudo pacman -Syu"
  88. xpc "pacman -Qqne > ~/linux-config/txt/nzxt-pkgs.txt && pacman -Qqme > ~/linux-config/txt/nzxt-aur.txt "
  89. # tri "trizen -S --noconfirm"
  90. tri "trizen -S --noedit"
  91. # }}} pacman #
  92. py "python"
  93. pipi "sudo pip install"
  94. # internet
  95. pgo "ping -c 3 8.8.8.8"
  96. dh "sudo dhcpcd"
  97. kdh "sudo killall dhcpcd"
  98. rdh "sudo killall dhcpcd && sudo dhcpcd"
  99. id "identify"
  100. # }}} system #
  101. # config files {{{ #
  102. rf "source ~/.config/fish/config.fish"
  103. srf "sync-shortcuts && source ~/.config/fish/config.fish"
  104. rz "source ~/linux-config/aliases/zsh_aliases"
  105. pipes "pipes.sh -t 3"
  106. # }}} config files #
  107. # applications {{{ #
  108. # silent="> /dev/null 2>&1& "
  109. chr "google-chrome"
  110. clc "cloc ."
  111. cv "cava"
  112. fh "feh"
  113. gpd "gpg --decrypt"
  114. gpe "gpg --encrypt --recipient"
  115. htc "htop -s PERCENT_CPU"
  116. htm "htop -s PERCENT_MEM"
  117. kd "killall Discord && killall Discord"
  118. mp "mpv --volume=50"
  119. mra "man ranger"
  120. n "nvim"
  121. nd "node"
  122. p3 "python3"
  123. py "python"
  124. r "ranger"
  125. rx "redshift -x"
  126. sn "sudo nvim"
  127. sx "sxiv"
  128. sxa "sxiv -a"
  129. wg "wego"
  130. wp "grep wallpaper ~/.cache/wal/colors.sh"
  131. z "zathura --fork"
  132. lz "unzip -l"
  133. # rsl "java -jar ~/Downloads/RuneLite.jar"
  134. # swex "sudo nohup ~/Downloads/swex.appimage $silent"
  135. # pass {{{ #
  136. ps "pass"
  137. psc "pass -c"
  138. pse "pass edit"
  139. psi "pass insert -m"
  140. psg "pass generate -c"
  141. xc "xclip -selection clipboard"
  142. yh "echo 'kevin.mok@live.ca' | xclip -selection clipboard"
  143. yg "xclip -selection clipboard ~/.password-store/social/gmail"
  144. yt "xclip -selection clipboard ~/.password-store/social/trapbot"
  145. yu "echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard"
  146. # }}} pass #
  147. # watson {{{ #
  148. w "watson"
  149. wa "watson start"
  150. wae "watson start && watson edit"
  151. we "watson edit"
  152. wl "watson log --day"
  153. ww "watson log"
  154. # wlm "watson log --project coding --tag mfs"
  155. wr "watson report --day"
  156. wrw "watson report"
  157. wre "watson restart"
  158. ws "watson status && watson stop"
  159. wse "watson stop && watson edit"
  160. wsl "watson stop && watson log --day"
  161. wt "watson status"
  162. # }}} watson #
  163. # }}} applications #
  164. # git {{{ #
  165. gstr "git config credential.helper store"
  166. g "git"
  167. # branch {{{ #
  168. gb "git branch"
  169. gbd "git branch -D"
  170. gba "git branch --no-merged && echo '' && git branch --merged"
  171. gbu "git branch --no-merged"
  172. gbm "git branch --merged"
  173. # }}} branch #
  174. gr "git remote"
  175. gro "git remote show origin"
  176. # add/remove {{{ #
  177. ga "git add -A . && git status -u"
  178. gac "git add -A . && git commit -S"
  179. gaf "git add -f"
  180. # unsigned commt
  181. gacu "git add -A . && git commit"
  182. grm "git rm"
  183. grmf "git rm -f"
  184. grmc "git rm --cached"
  185. grmfc "git rm -f --cached"
  186. # }}} add #
  187. # diff/log {{{ #
  188. gd "git difftool -w --tool=vimdiff"
  189. gdc "git difftool -w --cached --tool=vimdiff"
  190. gdl "git diff -w"
  191. gdlc "git diff --cached -w"
  192. gdh "git diff --cached -w HEAD~1"
  193. gds "git diff --stat"
  194. gl "git log"
  195. gsl "git shortlog"
  196. # }}} diff/log #
  197. # update {{{ #
  198. gs "git status -u"
  199. gchom "git checkout master"
  200. gchnw "git checkout -b wip"
  201. gchw "git checkout wip"
  202. gheadm1 "git reset --hard HEAD~1"
  203. # show files in git repo
  204. # gls "git ls-tree -r HEAD --name-only"
  205. gls "git ls-tree HEAD --name-only"
  206. # push {{{ #
  207. gst "git stash"
  208. gstl "git stash list"
  209. gstp "git stash pop"
  210. gc "git commit -S"
  211. gcu "git commit"
  212. gca "git add -A . && git commit --amend --no-edit -S"
  213. gcam "git add -A . && git commit --amend -S"
  214. # gcamp "git add -A . && git commit --amend --no-edit -S && gpsf"
  215. psgi "git add . && git commit -m 'Update' -S && git push"
  216. gps "git push"
  217. # gpsn "git push --set-upstream origin master"
  218. gpsn "eval (git push 2>&1 | tail -n 2)"
  219. gpsf "git push --force"
  220. gclear "git stash clear"
  221. gpl "git pull --rebase"
  222. grba "git rebase --abort"
  223. grbc "git rebase --continue"
  224. # }}} push #
  225. # }}} update #
  226. crm "mrk README.md"
  227. gcho "git checkout"
  228. gchon "git checkout -b"
  229. gf "git fetch origin"
  230. gcln "git clone"
  231. gchp "git cherry-pick"
  232. gchpc "git cherry-pick --continue"
  233. # assume file unchanged
  234. gunc "git update-index --assume-unchanged"
  235. # }}} git #
  236. # coding projs {{{ #
  237. # coding_dir="~/coding"
  238. rgt "rg TODO"
  239. # trapbot {{{ #
  240. # tb "$cd_coding_dir/trapbot"
  241. # vtb "$cd_coding_dir/trapbot && ni scan_reddit.py"
  242. # ptb "python scan_reddit.py"
  243. # rtb "$cd_coding_dir/trapbot && python scan_reddit.py"
  244. # }}} trapbot #
  245. # spotify-lib-vis {{{ #
  246. # spv_dir="$coding_dir""/spotify-lib-vis"
  247. # svl "f $spv_dir/src/login"
  248. # sva "f $spv_dir/src/api"
  249. # svg "f $spv_dir/src/graphs"
  250. # svscs "f $spv_dir/src/static/scss"
  251. # svcss "f $spv_dir/src/spotifyvis/static/scss"
  252. # start spv server from dir
  253. pg "sudo systemctl start postgresql.service && systemctl status postgresql.service"
  254. ssv "bash ../bin/activate && python manage.py runserver"
  255. # start spv server outside dir
  256. sssv "sv && ssv"
  257. # open spv db in psql
  258. spvdb "psql -d spotifyvis -U django"
  259. mig "python manage.py makemigrations && python manage.py migrate --run-syncdb && ssv"
  260. cldb "python manage.py flush --no-input && ssv"
  261. # django shell
  262. djs "python manage.py shell"
  263. # update pip
  264. upip "pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U"
  265. # update pip req's.
  266. ureq "pip freeze > requirements.txt"
  267. # show last history scan
  268. hlg "cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1"
  269. # scan history
  270. # hs "$spv_dir/src/update-history.sh && cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1"
  271. # scan cron log for hs cmd
  272. crnl "grep \"(kevin) CMD\" /var/log/syslog | tail -n 1 && hlg"
  273. # removes all but newest file
  274. # rmol "ls -t | tail -n +2 | xargs rm -- && l"
  275. snw "spotify-now -i '%artist - %title'"
  276. # }}} spotify-lib-vis #
  277. shc "shellcheck"
  278. pdl "pdflatex"
  279. tcl "tex-clean"
  280. # mfs
  281. mfs "nvim /home/kevin/coding/best-mf-site-personal/index.html"
  282. ht "python3 -m http.server"
  283. # j "jekyll"
  284. # js "jekyll serve"
  285. h "hugo"
  286. he "hugo serve -D --disableFastRender"
  287. ss "ssh kevin@192.168.0.100"
  288. ssb "ssh-bandit"
  289. rt "python ~/coding/rt-scraper/rt-scraper.py"
  290. # }}} coding projs #
  291. # school {{{ #
  292. # 369 {{{ #
  293. ma "printf '\033c' && bear make"
  294. mc "bear make clean"
  295. rms "rm swapfile.*"
  296. wl6 "watson log --all --project=369 --tag=a3"
  297. wr6 "watson report --all --project=369 --tag=a3"
  298. # a2 {{{ #
  299. mcr "bear make clean && printf '\033c' && bear make && ./carsim light 1 20"
  300. # mr "printf '\033c' && make && ./carsim stop 10 20"
  301. # mr "printf '\033c' && bear make && ./carsim light 1 20"
  302. # "valgrind --tool=helgrind ./carsim stop 10 50 > helgrind.txt 2>&1 && valgrind --tool=helgrind ./carsim light 10 50 >> helgrind.txt 2>&1"
  303. # lk "valgrind --leak-check=yes ./carsim stop 10 20"
  304. lk "valgrind --leak-check=yes ./carsim light 1 1"
  305. # hl "valgrind --tool=helgrind ./carsim stop 10 20"
  306. hl "valgrind --tool=helgrind ./carsim light 10 20"
  307. # }}} a2 #
  308. # a1
  309. # sa "ssh k@192.168.0.17"
  310. # cpi "scp interceptor.c kevin@192.168.0.17:/home/kevin/a1"
  311. # cpti "gcc -m32 -o test_intercept test_intercept.c && scp test_intercept k@192.168.0.17:/home/k/a1"
  312. # }}} 369 #
  313. # 309
  314. 0ht "cd ~/school/309-proj && python3 -m http.server"
  315. wl0 "watson log --all --project=309 --tag=project"
  316. wr0 "watson report --all --project=309 --tag=project"
  317. e3t "node test-app.js"
  318. # }}} school #