From 074a68dce6b5b912773d0d27f2e61075bc0919b6 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Mon, 7 Nov 2016 18:31:09 +0100 Subject: zsh: Reorganize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- zsh/profile-leeloo | 21 --------------------- zsh/profile-tirxu | 21 --------------------- zsh/profile-zorg | 21 --------------------- zsh/profile.d/leeloo | 21 +++++++++++++++++++++ zsh/profile.d/tirxu | 21 +++++++++++++++++++++ zsh/profile.d/zorg | 21 +++++++++++++++++++++ zsh/zprofile | 6 ++++-- zsh/zshrc | 5 ++--- 8 files changed, 69 insertions(+), 68 deletions(-) delete mode 100644 zsh/profile-leeloo delete mode 100644 zsh/profile-tirxu delete mode 100644 zsh/profile-zorg create mode 100644 zsh/profile.d/leeloo create mode 100644 zsh/profile.d/tirxu create mode 100644 zsh/profile.d/zorg (limited to 'zsh') diff --git a/zsh/profile-leeloo b/zsh/profile-leeloo deleted file mode 100644 index 56618a8..0000000 --- a/zsh/profile-leeloo +++ /dev/null @@ -1,21 +0,0 @@ -if (( UID )); then - function { - local envfile="$XDG_RUNTIME_DIR"/ssh-agent.env - local pid=$(awk -F'[=;]' 'FNR == 2 {print $2}' "$envfile" 2>/dev/null) - if [[ -n "$pid" ]] && kill -0 "$pid" &>/dev/null; then - source "$envfile" >/dev/null - else - ssh-agent > "$envfile" - source "$envfile" >/dev/null - fi - } - - export PERL5LIB="$HOME"/misc/grawity/code/lib/perl5"${PERL5LIB+:}$PERL5LIB"; - path+=("$HOME"/misc/grawity/code/obj/host."$(hostname)"/ - "$HOME"/misc/grawity/code/bin) - source "$HOME"/misc/grawity/code/kerberos/kc.sh - - export MAILDIR="$HOME"/mail -fi - -# vim: ft=zsh diff --git a/zsh/profile-tirxu b/zsh/profile-tirxu deleted file mode 100644 index 56618a8..0000000 --- a/zsh/profile-tirxu +++ /dev/null @@ -1,21 +0,0 @@ -if (( UID )); then - function { - local envfile="$XDG_RUNTIME_DIR"/ssh-agent.env - local pid=$(awk -F'[=;]' 'FNR == 2 {print $2}' "$envfile" 2>/dev/null) - if [[ -n "$pid" ]] && kill -0 "$pid" &>/dev/null; then - source "$envfile" >/dev/null - else - ssh-agent > "$envfile" - source "$envfile" >/dev/null - fi - } - - export PERL5LIB="$HOME"/misc/grawity/code/lib/perl5"${PERL5LIB+:}$PERL5LIB"; - path+=("$HOME"/misc/grawity/code/obj/host."$(hostname)"/ - "$HOME"/misc/grawity/code/bin) - source "$HOME"/misc/grawity/code/kerberos/kc.sh - - export MAILDIR="$HOME"/mail -fi - -# vim: ft=zsh diff --git a/zsh/profile-zorg b/zsh/profile-zorg deleted file mode 100644 index 56618a8..0000000 --- a/zsh/profile-zorg +++ /dev/null @@ -1,21 +0,0 @@ -if (( UID )); then - function { - local envfile="$XDG_RUNTIME_DIR"/ssh-agent.env - local pid=$(awk -F'[=;]' 'FNR == 2 {print $2}' "$envfile" 2>/dev/null) - if [[ -n "$pid" ]] && kill -0 "$pid" &>/dev/null; then - source "$envfile" >/dev/null - else - ssh-agent > "$envfile" - source "$envfile" >/dev/null - fi - } - - export PERL5LIB="$HOME"/misc/grawity/code/lib/perl5"${PERL5LIB+:}$PERL5LIB"; - path+=("$HOME"/misc/grawity/code/obj/host."$(hostname)"/ - "$HOME"/misc/grawity/code/bin) - source "$HOME"/misc/grawity/code/kerberos/kc.sh - - export MAILDIR="$HOME"/mail -fi - -# vim: ft=zsh diff --git a/zsh/profile.d/leeloo b/zsh/profile.d/leeloo new file mode 100644 index 0000000..56618a8 --- /dev/null +++ b/zsh/profile.d/leeloo @@ -0,0 +1,21 @@ +if (( UID )); then + function { + local envfile="$XDG_RUNTIME_DIR"/ssh-agent.env + local pid=$(awk -F'[=;]' 'FNR == 2 {print $2}' "$envfile" 2>/dev/null) + if [[ -n "$pid" ]] && kill -0 "$pid" &>/dev/null; then + source "$envfile" >/dev/null + else + ssh-agent > "$envfile" + source "$envfile" >/dev/null + fi + } + + export PERL5LIB="$HOME"/misc/grawity/code/lib/perl5"${PERL5LIB+:}$PERL5LIB"; + path+=("$HOME"/misc/grawity/code/obj/host."$(hostname)"/ + "$HOME"/misc/grawity/code/bin) + source "$HOME"/misc/grawity/code/kerberos/kc.sh + + export MAILDIR="$HOME"/mail +fi + +# vim: ft=zsh diff --git a/zsh/profile.d/tirxu b/zsh/profile.d/tirxu new file mode 100644 index 0000000..56618a8 --- /dev/null +++ b/zsh/profile.d/tirxu @@ -0,0 +1,21 @@ +if (( UID )); then + function { + local envfile="$XDG_RUNTIME_DIR"/ssh-agent.env + local pid=$(awk -F'[=;]' 'FNR == 2 {print $2}' "$envfile" 2>/dev/null) + if [[ -n "$pid" ]] && kill -0 "$pid" &>/dev/null; then + source "$envfile" >/dev/null + else + ssh-agent > "$envfile" + source "$envfile" >/dev/null + fi + } + + export PERL5LIB="$HOME"/misc/grawity/code/lib/perl5"${PERL5LIB+:}$PERL5LIB"; + path+=("$HOME"/misc/grawity/code/obj/host."$(hostname)"/ + "$HOME"/misc/grawity/code/bin) + source "$HOME"/misc/grawity/code/kerberos/kc.sh + + export MAILDIR="$HOME"/mail +fi + +# vim: ft=zsh diff --git a/zsh/profile.d/zorg b/zsh/profile.d/zorg new file mode 100644 index 0000000..56618a8 --- /dev/null +++ b/zsh/profile.d/zorg @@ -0,0 +1,21 @@ +if (( UID )); then + function { + local envfile="$XDG_RUNTIME_DIR"/ssh-agent.env + local pid=$(awk -F'[=;]' 'FNR == 2 {print $2}' "$envfile" 2>/dev/null) + if [[ -n "$pid" ]] && kill -0 "$pid" &>/dev/null; then + source "$envfile" >/dev/null + else + ssh-agent > "$envfile" + source "$envfile" >/dev/null + fi + } + + export PERL5LIB="$HOME"/misc/grawity/code/lib/perl5"${PERL5LIB+:}$PERL5LIB"; + path+=("$HOME"/misc/grawity/code/obj/host."$(hostname)"/ + "$HOME"/misc/grawity/code/bin) + source "$HOME"/misc/grawity/code/kerberos/kc.sh + + export MAILDIR="$HOME"/mail +fi + +# vim: ft=zsh diff --git a/zsh/zprofile b/zsh/zprofile index 37bfee6..b8901b2 100644 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -8,6 +8,8 @@ export XDG_CACHE_HOME="$HOME"/.cache export XDG_CONFIG_HOME="$HOME"/.config export XDG_DATA_HOME="$HOME"/.local/share +export HISTFILE="$XDG_CACHE_HOME"/zsh/history + # Program homedir overrides export MPV_HOME="$XDG_CONFIG_HOME"/mpv export GNUPGHOME="$XDG_CONFIG_HOME"/gnupg @@ -47,8 +49,8 @@ export QT_IM_MODULE=ibus # LS_COLORS is now required for `ls` to use colors source <(dircolors -b "$XDG_CONFIG_HOME"/dircolors) -if [[ -f "$ZDOTDIR"/profile-"$SHORTHOST" ]]; then - source "$ZDOTDIR"/profile-"$SHORTHOST" +if [[ -f "$ZDOTDIR"/profile.d/"$SHORTHOST" ]]; then + source "$ZDOTDIR"/profile.d/"$SHORTHOST" fi if [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then diff --git a/zsh/zshrc b/zsh/zshrc index 4e21f7e..47842cf 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,4 +1,3 @@ -HISTFILE=~/.config/zsh/.zsh_history HISTSIZE=500000 SAVEHIST=500000 @@ -49,8 +48,8 @@ if [[ -n "$VTE_VERSION" ]]; then __vte_prompt_command fi -if [[ -f "$ZDOTDIR"/zshrc-"$SHORTHOST" ]]; then - source "$ZDOTDIR"/zshrc-"$SHORTHOST" +if [[ -f "$ZDOTDIR"/rc.d/"$SHORTHOST" ]]; then + source "$ZDOTDIR"/rc.d/"$SHORTHOST" fi GPG_TTY=$(tty) -- cgit v1.2.3-70-g09d2