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.

305 lines
6.4 KiB

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