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.

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