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.

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