Browse Source

Adding XDG settings and moving ZSH

pull/2/head
Ryan Reed 3 years ago
parent
commit
1173269824
22 changed files with 14 additions and 4 deletions
  1. +0
    -0
      dot_config/zsh/README.md
  2. +0
    -0
      dot_config/zsh/configs/aliases.zsh
  3. +0
    -0
      dot_config/zsh/configs/colors.zsh
  4. +0
    -0
      dot_config/zsh/configs/editor.zsh
  5. +0
    -0
      dot_config/zsh/configs/exports.zsh.tmpl
  6. +0
    -1
      dot_config/zsh/configs/history.zsh
  7. +0
    -0
      dot_config/zsh/configs/keybindings.zsh
  8. +0
    -0
      dot_config/zsh/configs/options.zsh
  9. +0
    -0
      dot_config/zsh/configs/post/path.zsh
  10. +3
    -3
      dot_config/zsh/dot_zshrc.tmpl
  11. +0
    -0
      dot_config/zsh/functions/calc.zsh
  12. +0
    -0
      dot_config/zsh/functions/curl_json.zsh
  13. +0
    -0
      dot_config/zsh/functions/extract.zsh
  14. +0
    -0
      dot_config/zsh/functions/fix.zsh
  15. +0
    -0
      dot_config/zsh/functions/man.zsh
  16. +0
    -0
      dot_config/zsh/functions/mktmpdir.zsh
  17. +0
    -0
      dot_config/zsh/functions/prettyjson.zsh
  18. +0
    -0
      dot_config/zsh/functions/server.zsh
  19. +0
    -0
      dot_config/zsh/functions/systemload.zsh
  20. +0
    -0
      dot_config/zsh/functions/yubikey.zsh
  21. +0
    -0
      dot_local/state/zsh/.keep
  22. +11
    -0
      dot_zshenv

dot_zsh/README.md → dot_config/zsh/README.md View File


dot_zsh/configs/aliases.zsh → dot_config/zsh/configs/aliases.zsh View File


dot_zsh/configs/colors.zsh → dot_config/zsh/configs/colors.zsh View File


dot_zsh/configs/editor.zsh → dot_config/zsh/configs/editor.zsh View File


dot_zsh/configs/exports.zsh.tmpl → dot_config/zsh/configs/exports.zsh.tmpl View File


dot_zsh/configs/history.zsh → dot_config/zsh/configs/history.zsh View File

@ -11,4 +11,3 @@ setopt hist_verify # Do not submit history searches before allowing f
#HISTCONTRO=ignoreboth:erasedups # Ignore duplicates in the history and commands starting with space #HISTCONTRO=ignoreboth:erasedups # Ignore duplicates in the history and commands starting with space
HISTSIZE=10000 HISTSIZE=10000
SAVEHIST=10000 SAVEHIST=10000
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history

dot_zsh/configs/keybindings.zsh → dot_config/zsh/configs/keybindings.zsh View File


dot_zsh/configs/options.zsh → dot_config/zsh/configs/options.zsh View File


dot_zsh/configs/post/path.zsh → dot_config/zsh/configs/post/path.zsh View File


dot_zshrc.tmpl → dot_config/zsh/dot_zshrc.tmpl View File

@ -1,9 +1,9 @@
# load custom executable functions # load custom executable functions
for function in ~/.zsh/functions/*; do
for function in "$ZDOTDIR"/functions/*; do
source $function source $function
done done
# extra files in ~/.zsh/configs/pre , ~/.zsh/configs , and ~/.zsh/configs/post
# extra files in $ZDOTDIR/configs/pre , $ZDOTDIR/configs , and $ZDOTDIR/configs/post
# these are loaded first, second, and third, respectively. # these are loaded first, second, and third, respectively.
_load_settings() { _load_settings() {
_dir="$1" _dir="$1"
@ -32,7 +32,7 @@ _load_settings() {
fi fi
fi fi
} }
_load_settings "$HOME/.zsh/configs"
_load_settings "$ZDOTDIR/configs"
declare -A hostname_colors declare -A hostname_colors

dot_zsh/functions/calc.zsh → dot_config/zsh/functions/calc.zsh View File


dot_zsh/functions/curl_json.zsh → dot_config/zsh/functions/curl_json.zsh View File


dot_zsh/functions/extract.zsh → dot_config/zsh/functions/extract.zsh View File


dot_zsh/functions/fix.zsh → dot_config/zsh/functions/fix.zsh View File


dot_zsh/functions/man.zsh → dot_config/zsh/functions/man.zsh View File


dot_zsh/functions/mktmpdir.zsh → dot_config/zsh/functions/mktmpdir.zsh View File


dot_zsh/functions/prettyjson.zsh → dot_config/zsh/functions/prettyjson.zsh View File


dot_zsh/functions/server.zsh → dot_config/zsh/functions/server.zsh View File


dot_zsh/functions/systemload.zsh → dot_config/zsh/functions/systemload.zsh View File


dot_zsh/functions/yubikey.zsh → dot_config/zsh/functions/yubikey.zsh View File


+ 0
- 0
dot_local/state/zsh/.keep View File


+ 11
- 0
dot_zshenv View File

@ -1,3 +1,14 @@
# Ensure XDG locations are defined
export XDG_CONFIG_HOME="$HOME"/.config
export XDG_CACHE_HOME="$HOME"/.cache
export XDG_DATA_HOME="$HOME"/.local/share
export XDG_STATE_HOME="$HOME"/.local/state
# Move most of ZSH into XDG locations
export ZDOTDIR="$XDG_CONFIG_HOME"/zsh
export HISTFILE="$XDG_STATE_HOME"/zsh/history
# Taken from https://github.com/thoughtbot/dotfiles/blob/master/zshenv # Taken from https://github.com/thoughtbot/dotfiles/blob/master/zshenv
local _old_path="$PATH" local _old_path="$PATH"


Loading…
Cancel
Save