From e73d487c6e9b3dacbf18a979f593c1c20539e459 Mon Sep 17 00:00:00 2001 From: Alen Date: Sat, 23 Sep 2023 23:41:59 +0400 Subject: Move $ZDOTDIR to ~/.config/zsh --- .chezmoiremove | 4 ++++ dot_config/zsh/dot_zshrc | 12 ++++++++++++ dot_config/zsh/empty_dot_zlogin | 0 dot_config/zsh/empty_dot_zlogout | 0 dot_config/zsh/empty_dot_zprofile | 0 dot_config/zsh/symlink_dot_zshenv | 1 + dot_zshenv | 3 +++ dot_zshrc | 12 ------------ empty_dot_zlogin | 0 empty_dot_zlogout | 0 empty_dot_zprofile | 0 11 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 dot_config/zsh/dot_zshrc create mode 100644 dot_config/zsh/empty_dot_zlogin create mode 100644 dot_config/zsh/empty_dot_zlogout create mode 100644 dot_config/zsh/empty_dot_zprofile create mode 100644 dot_config/zsh/symlink_dot_zshenv delete mode 100644 dot_zshrc delete mode 100644 empty_dot_zlogin delete mode 100644 empty_dot_zlogout delete mode 100644 empty_dot_zprofile diff --git a/.chezmoiremove b/.chezmoiremove index 6fb1590..e03d1d9 100644 --- a/.chezmoiremove +++ b/.chezmoiremove @@ -1 +1,5 @@ /.nanorc +/.zlogin +/.zlogout +/.zprofile +/.zshrc diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc new file mode 100644 index 0000000..13b626a --- /dev/null +++ b/dot_config/zsh/dot_zshrc @@ -0,0 +1,12 @@ +# Set up nice and lengthy history +export HISTFILE="${ZDOTDIR:-$HOME}/.zsh_history" +export HISTSIZE=1000000 +export SAVEHIST=1000000 + +# Simple prompt +PROMPT="%F{15}%K{4}%n@%M:%~%f%k " +RPROMPT="%(?.%F{10}%?.%F{9}%?)%f %T" + +# Just do a simple compinit for now +autoload -U compinit +compinit diff --git a/dot_config/zsh/empty_dot_zlogin b/dot_config/zsh/empty_dot_zlogin new file mode 100644 index 0000000..e69de29 diff --git a/dot_config/zsh/empty_dot_zlogout b/dot_config/zsh/empty_dot_zlogout new file mode 100644 index 0000000..e69de29 diff --git a/dot_config/zsh/empty_dot_zprofile b/dot_config/zsh/empty_dot_zprofile new file mode 100644 index 0000000..e69de29 diff --git a/dot_config/zsh/symlink_dot_zshenv b/dot_config/zsh/symlink_dot_zshenv new file mode 100644 index 0000000..05e498d --- /dev/null +++ b/dot_config/zsh/symlink_dot_zshenv @@ -0,0 +1 @@ +../../.zshenv diff --git a/dot_zshenv b/dot_zshenv index 4cae70b..2983e2a 100644 --- a/dot_zshenv +++ b/dot_zshenv @@ -41,6 +41,9 @@ export LC_ALL=en_US.UTF-8 export LESS="--RAW-CONTROL-CHARS --chop-long-lines --mouse" export PAGER="less" +# Move zsh dot files to config dir +export ZDOTDIR="${XDG_CONFIG_HOME:-${HOME}/.config}/zsh" + # Add ~/.local paths to {,MAN,INFO}PATH and fpath export PATH="${HOME}/.local/bin${PATH:+:${PATH}}" export MANPATH="${XDG_DATA_HOME:-${HOME}/.local/share}/man${MANPATH:+:${MANPATH}}" diff --git a/dot_zshrc b/dot_zshrc deleted file mode 100644 index 13b626a..0000000 --- a/dot_zshrc +++ /dev/null @@ -1,12 +0,0 @@ -# Set up nice and lengthy history -export HISTFILE="${ZDOTDIR:-$HOME}/.zsh_history" -export HISTSIZE=1000000 -export SAVEHIST=1000000 - -# Simple prompt -PROMPT="%F{15}%K{4}%n@%M:%~%f%k " -RPROMPT="%(?.%F{10}%?.%F{9}%?)%f %T" - -# Just do a simple compinit for now -autoload -U compinit -compinit diff --git a/empty_dot_zlogin b/empty_dot_zlogin deleted file mode 100644 index e69de29..0000000 diff --git a/empty_dot_zlogout b/empty_dot_zlogout deleted file mode 100644 index e69de29..0000000 diff --git a/empty_dot_zprofile b/empty_dot_zprofile deleted file mode 100644 index e69de29..0000000 -- cgit 1.4.1-2-gfad0