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.

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