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.

134 lines
3.3 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
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # vim: fdm=marker ft=fish.go-template
  2. # login to X [[[ #
  3. {{ if eq .chezmoi.username "kevin" }}
  4. if status is-login
  5. if test -z "$DISPLAY" -a $XDG_VTNR = 1
  6. exec startx -- -keeptty
  7. end
  8. end
  9. set -x GPG_TTY (tty)
  10. {{ end }}
  11. # ]]] login to X #
  12. # universal var's [[[ #
  13. # spv
  14. {{ if eq .chezmoi.fullHostname "nzxt" }}
  15. set -U spv_dir "/home/kevin/coding/spotify-lib-vis"
  16. set -U mfs_dir "/home/kevin/coding/mf-site"
  17. source /home/kevin/coding/spotify-lib-vis/src/scripts/api-keys-fish.sh
  18. {{ end }}
  19. set -x PATH $PATH ~/.local/bin ~/scripts ~/scripts/colors ~/go/bin
  20. set -x CLASSPATH $CLASSPATH /home/kevin/java/*.jar
  21. set -x LD_LIBRARY_PATH $LD_LIBRARY_PATH /usr/local/lib /usr/local/lib64
  22. set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig
  23. {{ if eq .linux_os "termux" }}
  24. # set SPACEFISH_PROMPT_ORDER time user dir host git package node docker ruby golang php rust haskell julia aws conda pyenv kubecontext exec_time line_sep battery jobs exit_code vi_mode char
  25. set SPACEFISH_DIR_PREFIX ''
  26. set SPACEFISH_PROMPT_ORDER vi_mode dir git pyenv exec_time jobs exit_code line_sep char
  27. set SPACEFISH_VI_MODE_INSERT ''
  28. set SPACEFISH_VI_MODE_NORMAL '[n] '
  29. set SPACEFISH_VI_MODE_SUFFIX ''
  30. {{ end }}
  31. set -x PASSWORD_STORE_CLIP_TIME 120
  32. set -xU XSET_RATE 90
  33. set -xU XSET_DELAY 200
  34. # causes xmodmap to have issues when opening terminal sometimes
  35. # xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE
  36. {{ if and (eq .chezmoi.fullHostname "x1-carbon") (not (eq .chezmoi.username "root")) }}
  37. xset r rate $XSET_DELAY $XSET_RATE
  38. {{ end }}
  39. # set -U BROWSER "chromium"
  40. set -U BROWSER "firefox"
  41. # ]]] universal var's #
  42. # fish-specific [[[ #
  43. fish_vi_key_bindings
  44. set -x EDITOR nvim
  45. set -x VISUAL nvim
  46. set -U fish_help_browser firefox
  47. builtin cd $last_dir
  48. bind \ce edit_command_buffer
  49. bind \cr forward-word
  50. chezmoi apply
  51. {{ if not (eq .linux_os "termux") }}
  52. ~/scripts/sync-shortcuts
  53. {{ end }}
  54. source ~/.config/fish/key_abbr.fish > /dev/null
  55. set -U fish_fxn_dir "{{ .chezmoi.homedir }}/linux-config/dot_config/fish/functions"
  56. # set -U fish_fxn_dir "~/.config/fish/functions"
  57. abbr ff "cd $fish_fxn_dir"
  58. for fxn in (find $fish_fxn_dir -name '*.fish')
  59. source $fxn
  60. end
  61. abbr ab "abbr"
  62. abbr abe "abbr -e"
  63. abbr rf "chezmoi apply && sync-shortcuts && source ~/.config/fish/key_abbr.fish > /dev/null"
  64. abbr rfc "chezmoi apply && source ~/.config/fish/config.fish"
  65. abbr xf "fish_config"
  66. abbr f. "cd .."
  67. abbr f.. "cd ../.."
  68. # ]]] fish-specific #
  69. # fxn abbr's [[[ #
  70. abbr ag "grep-aliases"
  71. abbr bq "benq-brightness"
  72. abbr cpc "copy cat"
  73. abbr cpe "copy echo"
  74. abbr cpp "copy echo (pwd)"
  75. abbr cff "create-fish-function"
  76. abbr def "define"
  77. abbr ev "evince-silent"
  78. abbr fbg "find-bg"
  79. abbr fzv "fzf-vim"
  80. # git [[[ #
  81. abbr gcamp "git-amend-push"
  82. abbr gdf "git-diff-files"
  83. abbr gpsmt "git-push-multiple"
  84. abbr gremotes "git-mult-remotes"
  85. abbr grmb "git-delete-branch"
  86. # ]]] git #
  87. abbr hs "scan-history"
  88. abbr hst "$EDITOR ~/.local/share/fish/fish_history"
  89. abbr mt "math"
  90. abbr pgr "grep-pdf"
  91. abbr pgrf "grep-pdf-file"
  92. abbr rs "redshift-set"
  93. abbr shrm "shred-rm"
  94. abbr thes "thesaurus"
  95. abbr ut "unix-timestamp"
  96. abbr uzr "unzip-rm"
  97. abbr vsnp "vim-snippet"
  98. abbr fvft "find-vim-filetype"
  99. # ]]] fxn abbr's #
  100. abbr hm "cd $mfs_dir && hugo serve -D --disableFastRender"
  101. # school [[[ #
  102. # 369
  103. abbr grc "grep-c"
  104. abbr grh "grep-headers"
  105. abbr rgh "rg-headers"
  106. abbr jcr "java-compile-run"
  107. abbr jct "java-compile-test"
  108. # ]]] school #