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.

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