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.

295 lines
5.9 KiB

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