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.

294 lines
5.9 KiB

  1. # system {{{ #
  2. # clear screen
  3. cs "printf '\033c'"
  4. hst "history"
  5. nf "cs && neofetch | lolcat"
  6. # reload urxvt
  7. ru "xrdb ~/.Xresources"
  8. # list file sizes in megabytes with depth 1
  9. dum "sudo du -d 1 -B M"
  10. vgb "sni /etc/default/grub"
  11. mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg"
  12. grep "grep --color=auto"
  13. rg "grep -nr"
  14. # pk "pkill -f"
  15. mkpk "makepkg -sri"
  16. mkex "chmod 777"
  17. # systemctl
  18. ctl "systemctl"
  19. ctle "systemctl enable"
  20. ctld "systemctl disable"
  21. ctls "systemctl start"
  22. wm "sudo wifi-menu"
  23. # mounting
  24. udm "udisksctl mount -b"
  25. udmb "udisksctl mount -b /dev/sdc2"
  26. udu "udisksctl unmount -b"
  27. udub "udisksctl unmount -b /dev/sdc2"
  28. tc "touch"
  29. # }}} command line related #
  30. # directory-related {{{ #
  31. l "ls -a"
  32. ll "ls -alFh"
  33. smv "sudo mv"
  34. f "cd"
  35. fz "fzf"
  36. fnd "find . -type f -name"
  37. rmr "rm -rf"
  38. mdp "mkdir -p"
  39. rsy "rsync -Pr"
  40. # list all (un)mounted drives
  41. lhd "sudo fdisk -l"
  42. # get disc space for mounted drives
  43. ds "df -h | tee >(head -n 1) >(grep sd) >/dev/null"
  44. chownw "sudo chown -R kevin:wheel"
  45. chwnm "sudo chown -R kevin:wheel /run/media/kevin"
  46. # cd into backup folder and show backup sizes
  47. nbu "f /run/media/kevin/pc-backup/backups/nzxt && ll | grep gz"
  48. # }}} directory-related #
  49. # power options {{{ #
  50. s "systemctl suspend"
  51. sd "sudo shutdown 0"
  52. reb "sudo shutdown -r 0"
  53. lo "i3-msg exit"
  54. x "xmodmap ~/.Xmodmap && xset r rate 200 60"
  55. # }}} power options #
  56. # sound
  57. vlm "alsamixer -c 0"
  58. vlh "alsamixer -c 2"
  59. # apt
  60. # apti "sudo apt install"
  61. # aptr "sudo apt remove"
  62. # aptu "sudo apt upgrade"
  63. # pacman
  64. pc "sudo pacman -S"
  65. pcr "sudo pacman -Rs"
  66. pcu "sudo pacman -Sy"
  67. xpc "pacman -Qqe > ~/linux-config/txt/nzxt-pkgs.txt"
  68. # tri "trizen -S --noconfirm"
  69. tri "trizen -S"
  70. # internet
  71. pg "ping -c 3 8.8.8.8"
  72. dh "sudo dhcpcd"
  73. rdh "sudo killall dhcpcd && sudo dhcpcd"
  74. id "identify"
  75. # }}} system #
  76. # config files {{{ #
  77. rz "source ~/linux-config/aliases/zsh_aliases"
  78. lca "f ~/linux-config/aliases"
  79. pipes "pipes.sh -t 3"
  80. # }}} config files #
  81. # applications {{{ #
  82. # silent="> /dev/null 2>&1& "
  83. chr "google-chrome"
  84. h "htop -s PERCENT_MEM"
  85. hc "htop -s PERCENT_CPU"
  86. r "ranger"
  87. mr "man ranger"
  88. clc "cloc ."
  89. n "nvim"
  90. sni "sudo nvim"
  91. fh "feh"
  92. sx "sxiv"
  93. wp "grep wallpaper ~/.cache/wal/colors.sh"
  94. # rsl "java -jar ~/Downloads/RuneLite.jar"
  95. # swex "sudo nohup ~/Downloads/swex.appimage $silent"
  96. cv "cava"
  97. rx "redshift -x"
  98. gpe "gpg --encrypt --recipient"
  99. gpd "gpg --decrypt"
  100. # pass {{{ #
  101. ps "pass"
  102. psc "pass -c"
  103. pse "pass edit"
  104. psi "pass insert -m"
  105. psg "pass generate -c"
  106. xclip "xclip -selection clipboard"
  107. yh "echo 'kevin.mok@live.ca' | xclip -selection clipboard"
  108. yg "xclip -selection clipboard ~/.password-store/social/gmail"
  109. yt "xclip -selection clipboard ~/.password-store/social/trapbot"
  110. yu "echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard"
  111. # }}} pass #
  112. p3 "python3"
  113. py "python"
  114. wt "watson"
  115. wt "watson"
  116. wta "watson start"
  117. wte "watson edit"
  118. wtl "watson log"
  119. wts "watson stop"
  120. wtt "watson status"
  121. # }}} applications #
  122. # git {{{ #
  123. # aliases {{{
  124. gstr "git config credential.helper store"
  125. g "git"
  126. # add {{{ #
  127. ga "git add -A . && gs"
  128. gac "git add -A . && git commit -S"
  129. # unsigned commt
  130. gacu "git add -A . && git commit"
  131. # }}} add #
  132. # diff/log {{{ #
  133. gd "git diff -w"
  134. gdc "git diff --cached"
  135. gds "git diff --stat"
  136. gdt "git difftool --tool=vimdiff"
  137. gl "git log"
  138. gsl "git shortlog"
  139. # }}} diff/log #
  140. # update {{{ #
  141. gs "git status -u"
  142. gchom "git checkout master"
  143. gchnw "git checkout -b wip"
  144. gchw "git checkout wip"
  145. gheadm1 "git reset --hard HEAD~1"
  146. # show files in git repo
  147. gls "git ls-tree -r HEAD --name-only"
  148. # push {{{ #
  149. gst "git stash"
  150. gstp "git stash pop"
  151. gc "git commit -S"
  152. gcu "git commit"
  153. gcam "ga && git commit --amend --no-edit -S"
  154. gcamp "ga && git commit --amend --no-edit -S && gpsf"
  155. psgi "git add . && git commit -m '.' -S && git push"
  156. gps "git push"
  157. gpsn "git push --set-upstream origin master"
  158. gpsf "git push --force"
  159. gclear "git stash clear"
  160. gpl "git pull --rebase"
  161. grbc "git rebase --continue"
  162. # }}} push #
  163. # }}} update #
  164. crm "mrk README.md"
  165. # aliases }}}
  166. gcho "git checkout"
  167. gchon "git checkout -b"
  168. gcln "git clone"
  169. gchp "git cherry-pick"
  170. gchpc "git cherry-pick --continue"
  171. # }}} merge repos #
  172. # assume file unchanged
  173. gunc "git update-index --assume-unchanged"
  174. # }}} git #
  175. # coding projs {{{ #
  176. # coding_dir="~/coding"
  177. # trapbot {{{ #
  178. # tb "$cd_coding_dir/trapbot"
  179. # vtb "$cd_coding_dir/trapbot && ni scan_reddit.py"
  180. # ptb "python scan_reddit.py"
  181. # rtb "$cd_coding_dir/trapbot && python scan_reddit.py"
  182. # }}} trapbot #
  183. # spotify-lib-vis {{{ #
  184. # spv_dir="$coding_dir""/spotify-lib-vis"
  185. # svl "f $spv_dir/src/login"
  186. # sva "f $spv_dir/src/api"
  187. # svg "f $spv_dir/src/graphs"
  188. # svscs "f $spv_dir/src/static/scss"
  189. # svcss "f $spv_dir/src/spotifyvis/static/scss"
  190. # start spv server from dir
  191. ssv "source ../bin/activate && python manage.py runserver"
  192. # start spv server outside dir
  193. sssv "sv && ssv"
  194. # open spv db in psql
  195. spvdb "psql -d spotifyvis -U django"
  196. mig "python manage.py makemigrations && python manage.py migrate --run-syncdb && ssv"
  197. cldb "python manage.py flush --no-input && ssv"
  198. # django shell
  199. djs "python manage.py shell"
  200. # update pip
  201. upip "pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U"
  202. # update pip req's.
  203. ureq "pip freeze > requirements.txt"
  204. # scan history
  205. hs "$spv_dir/src/update-history.sh && hlg"
  206. # show last history scan
  207. hlg "cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1"
  208. # scan cron log for hs cmd
  209. crnl "grep \"(kevin) CMD\" /var/log/syslog | tail -n 1 && hlg"
  210. # removes all but newest file
  211. # rmol "ls -t | tail -n +2 | xargs rm -- && l"
  212. # }}} spotify-lib-vis #
  213. sc "shellcheck"
  214. pdl "pdflatex"
  215. tcl "tex-clean"
  216. mfs "nvim /home/kevin/coding/best-mf-site-personal/index.html"
  217. # }}} coding projs #
  218. # school {{{ #
  219. # 369
  220. # sa "ssh k@192.168.0.17"
  221. # cpi "scp interceptor.c kevin@192.168.0.17:/home/kevin/a1"
  222. # cpti "gcc -m32 -o test_intercept test_intercept.c && scp test_intercept k@192.168.0.17:/home/k/a1"
  223. ma "make"
  224. mc "make clean"
  225. # }}} school #