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.

297 lines
6.0 KiB

5 years ago
5 years ago
  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. rf "source ~/.config/fish/config.fish"
  79. rz "source ~/linux-config/aliases/zsh_aliases"
  80. lca "f ~/linux-config/aliases"
  81. pipes "pipes.sh -t 3"
  82. # }}} config files #
  83. # applications {{{ #
  84. # silent="> /dev/null 2>&1& "
  85. chr "google-chrome"
  86. h "htop -s PERCENT_MEM"
  87. hc "htop -s PERCENT_CPU"
  88. r "ranger"
  89. mr "man ranger"
  90. clc "cloc ."
  91. n "nvim"
  92. sni "sudo nvim"
  93. fh "feh"
  94. sx "sxiv"
  95. wp "grep wallpaper ~/.cache/wal/colors.sh"
  96. # rsl "java -jar ~/Downloads/RuneLite.jar"
  97. # swex "sudo nohup ~/Downloads/swex.appimage $silent"
  98. cv "cava"
  99. rx "redshift -x"
  100. gpe "gpg --encrypt --recipient"
  101. gpd "gpg --decrypt"
  102. # pass {{{ #
  103. ps "pass"
  104. psc "pass -c"
  105. pse "pass edit"
  106. psi "pass insert -m"
  107. psg "pass generate -c"
  108. xclip "xclip -selection clipboard"
  109. yh "echo 'kevin.mok@live.ca' | xclip -selection clipboard"
  110. yg "xclip -selection clipboard ~/.password-store/social/gmail"
  111. yt "xclip -selection clipboard ~/.password-store/social/trapbot"
  112. yu "echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard"
  113. # }}} pass #
  114. p3 "python3"
  115. py "python"
  116. wt "watson"
  117. wt "watson"
  118. wta "watson start"
  119. wte "watson edit"
  120. wtl "watson log"
  121. wts "watson stop"
  122. wtt "watson status"
  123. # }}} applications #
  124. # git {{{ #
  125. # aliases {{{
  126. gstr "git config credential.helper store"
  127. g "git"
  128. # add {{{ #
  129. ga "git add -A . && git status -u"
  130. gac "git add -A . && git commit -S"
  131. # unsigned commt
  132. gacu "git add -A . && git commit"
  133. # }}} add #
  134. # diff/log {{{ #
  135. gd "git diff -w"
  136. gdc "git diff --cached"
  137. gds "git diff --stat"
  138. gdt "git difftool --tool=vimdiff"
  139. gl "git log"
  140. gsl "git shortlog"
  141. # }}} diff/log #
  142. # update {{{ #
  143. gs "git status -u"
  144. gchom "git checkout master"
  145. gchnw "git checkout -b wip"
  146. gchw "git checkout wip"
  147. gheadm1 "git reset --hard HEAD~1"
  148. # show files in git repo
  149. # gls "git ls-tree -r HEAD --name-only"
  150. gls "git ls-tree HEAD --name-only"
  151. # push {{{ #
  152. gst "git stash"
  153. gstp "git stash pop"
  154. gc "git commit -S"
  155. gcu "git commit"
  156. gcam "ga && git commit --amend --no-edit -S"
  157. gcamp "ga && git commit --amend --no-edit -S && gpsf"
  158. psgi "git add . && git commit -m '.' -S && git push"
  159. gps "git push"
  160. gpsn "git push --set-upstream origin master"
  161. gpsf "git push --force"
  162. gclear "git stash clear"
  163. gpl "git pull --rebase"
  164. grbc "git rebase --continue"
  165. # }}} push #
  166. # }}} update #
  167. crm "mrk README.md"
  168. # aliases }}}
  169. gcho "git checkout"
  170. gchon "git checkout -b"
  171. gcln "git clone"
  172. gchp "git cherry-pick"
  173. gchpc "git cherry-pick --continue"
  174. # }}} merge repos #
  175. # assume file unchanged
  176. gunc "git update-index --assume-unchanged"
  177. # }}} git #
  178. # coding projs {{{ #
  179. # coding_dir="~/coding"
  180. # trapbot {{{ #
  181. # tb "$cd_coding_dir/trapbot"
  182. # vtb "$cd_coding_dir/trapbot && ni scan_reddit.py"
  183. # ptb "python scan_reddit.py"
  184. # rtb "$cd_coding_dir/trapbot && python scan_reddit.py"
  185. # }}} trapbot #
  186. # spotify-lib-vis {{{ #
  187. # spv_dir="$coding_dir""/spotify-lib-vis"
  188. # svl "f $spv_dir/src/login"
  189. # sva "f $spv_dir/src/api"
  190. # svg "f $spv_dir/src/graphs"
  191. # svscs "f $spv_dir/src/static/scss"
  192. # svcss "f $spv_dir/src/spotifyvis/static/scss"
  193. # start spv server from dir
  194. ssv "source ../bin/activate && python manage.py runserver"
  195. # start spv server outside dir
  196. sssv "sv && ssv"
  197. # open spv db in psql
  198. spvdb "psql -d spotifyvis -U django"
  199. mig "python manage.py makemigrations && python manage.py migrate --run-syncdb && ssv"
  200. cldb "python manage.py flush --no-input && ssv"
  201. # django shell
  202. djs "python manage.py shell"
  203. # update pip
  204. upip "pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U"
  205. # update pip req's.
  206. ureq "pip freeze > requirements.txt"
  207. # scan history
  208. hs "$spv_dir/src/update-history.sh && hlg"
  209. # show last history scan
  210. hlg "cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1"
  211. # scan cron log for hs cmd
  212. crnl "grep \"(kevin) CMD\" /var/log/syslog | tail -n 1 && hlg"
  213. # removes all but newest file
  214. # rmol "ls -t | tail -n +2 | xargs rm -- && l"
  215. # }}} spotify-lib-vis #
  216. sc "shellcheck"
  217. pdl "pdflatex"
  218. tcl "tex-clean"
  219. mfs "nvim /home/kevin/coding/best-mf-site-personal/index.html"
  220. # }}} coding projs #
  221. # school {{{ #
  222. # 369
  223. # sa "ssh k@192.168.0.17"
  224. # cpi "scp interceptor.c kevin@192.168.0.17:/home/kevin/a1"
  225. # cpti "gcc -m32 -o test_intercept test_intercept.c && scp test_intercept k@192.168.0.17:/home/k/a1"
  226. ma "make"
  227. mc "make clean"
  228. # }}} school #