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.

108 lines
2.8 KiB

  1. alias "f."="f .."
  2. alias "f.."="f ..."
  3. function cld() { colordiff -y --suppress-common-lines $1 $2 ; }
  4. function gpdf() {
  5. pdfgrep -n -e $1 $2
  6. }
  7. function cpd() { cp -avr $1 $2 ; }
  8. # extract tar archive
  9. function utar() { tar -xzvf $1 && rm $1; }
  10. function rzip() { unzip $1 && rm $1; }
  11. function lzip() { unzip -l $1 | less; }
  12. export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""'
  13. shrm() {
  14. for file in "$@"; do
  15. shred "$file" && rm "$file"
  16. done
  17. }
  18. f `cat /home/kevin/.oh-my-zsh/cache/last-working-dir`
  19. function mvd() { mv $1 ~/Downloads ; }
  20. # rewrite in dmenu if really need
  21. # rotate monitor {{{ #
  22. function rt() {
  23. output="HDMI-0"
  24. if [ "$1" = "s" ]
  25. # if [ "${1:0:1}" = "s" ]
  26. then
  27. output="DVI-I-1"
  28. fi
  29. dir="normal"
  30. if [ "$2" = "r" ]
  31. # if [ "${1:1:2}" = "r" ]
  32. then
  33. dir="right"
  34. fi
  35. if [ "$2" = "l" ]
  36. then
  37. dir="left"
  38. fi
  39. # echo "xrandr --output \"$output\" --rotate \"$dir\""
  40. xrandr --output "$output" --rotate "$dir"
  41. }
  42. # }}} rotate monitor #
  43. function gz() { grep $1 ~/linux-config/aliases/zsh_aliases ; }
  44. function vsnp() { nvim ~/.vim/plugged/vim-snippets/UltiSnips/"$1".snippets ; }
  45. silent="> /dev/null 2>&1& "
  46. function z() { nohup zathura $1 > /dev/null 2>&1& ; }
  47. function ev() { nohup evince $1 > /dev/null 2>&1& ; }
  48. function mrk() { pandoc -o ${1%.*}.html $1 ; }
  49. # auto-clicker {{{ #
  50. function auc() { xdotool click --repeat 1000000 --delay $1 1 ; }
  51. # auc1 "xdotool click --repeat 1000000 --delay 1 1"
  52. # auc3 "xdotool click --repeat 1000000 --delay 300 1"
  53. # auc5 "xdotool click --repeat 1000000 --delay 500 1"
  54. # kauc "pkill -f xdotool"
  55. # }}} auto-clicker #
  56. function rs(){ redshift -P -O $(echo "scale=2;$1*1000" | bc) ; }
  57. function grpy() { grep $1 *.py ; }
  58. # git {{{ #
  59. function gde() { git diff --cached -- ':(exclude)'$1 ; }
  60. # todo: fix
  61. function gcm(){ echo git commit -m \""$1"\" ; }
  62. function gchof() { git checkout $1 $2 ; }
  63. # add multiple push repos
  64. function gremotes() {
  65. git remote set-url --add --push origin $1
  66. git remote set-url --add --push origin $2
  67. git remote -v
  68. }
  69. # merge repos
  70. function gmrgr() {
  71. # 1 = remote name, 2 = remote path
  72. git remote add $1 $2
  73. git fetch $1
  74. # whichever branch you want to merge
  75. git merge --allow-unrelated-histories $1/master
  76. git remote remove $1
  77. }
  78. # delete branch locally and on server
  79. function grmb() { git push origin --delete $1 && git branch -D $1 ; }
  80. # }}} git #
  81. # # Stardew Valley {{{
  82. # sdv_save_dir=~/Documents/sdv-save
  83. # sdv "f $sdv_save_dir"
  84. # smp "~/Downloads/sdv/smapi/install\ on\ Linux.sh"
  85. # # imc "sdv && source import-save.sh coop"
  86. # function ucf() { f ~/Documents/StardewMods/UncaughtFish ; }
  87. # function svmd() { f ~/.local/share/Steam/steamapps/common/Stardew\ Valley/Mods ; }
  88. # function svm() { mv $1 ~/.local/share/Steam/steamapps/common/Stardew\ Valley/Mods ; }
  89. # # }}}
  90. source /home/kevin/coding/spotify-lib-vis/src/api-keys.sh