summaryrefslogtreecommitdiff
path: root/zsh/zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/zshrc')
-rw-r--r--zsh/zshrc23
1 files changed, 19 insertions, 4 deletions
diff --git a/zsh/zshrc b/zsh/zshrc
index 9acd42f..c25f285 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -1,8 +1,17 @@
#zmodload zsh/zprof
-if [ -d "$HOME/.zplug" ]; then
+if [ -n "$ZPLUG_HOME" ]; then
+ if [ -d "$ZPLUG_HOME" ]; then
+ export ZPLUG_INSTALLED="y"
+ source "$ZPLUG_HOME/init.zsh"
+ fi
+elif [ -d "$XDG_DATA_HOME/zplug" ]; then
+ export ZPLUG_INSTALLED="y"
+ source "$XDG_DATA_HOME/zplug/init.zsh"
+elif [ -d "$HOME/.zplug" ]; then
export ZPLUG_INSTALLED="y"
source "$HOME/.zplug/init.zsh"
fi
+[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config"
HISTFILE="$XDG_CONFIG_HOME/zsh/hist"
SAVEHIST=1000
HISTSIZE=1000
@@ -44,9 +53,13 @@ bindkey "${key[End]}" end-of-line
bindkey "${key[PageUp]}" history-substring-search-up
bindkey "${key[PageDown]}" history-substring-search-down
-MYPROMPT=$'%S%F{002}[%n@%m]\UE0B2%F{015}%s%~%S%F{002}\UE0B0%#%s\UE0B0%f '
+if (env | grep -Fq 'DISTROBOX'); then
+ MYPROMPT=$'%F{000}%K{004}[%n@%m]%F{013}\UE0B2%K{013}%F{000}%~%F{013}%K{004}\UE0B0%F{000}%#%F{004}%k\UE0B0%f '
+else
+ MYPROMPT=$'%F{000}%K{002}[%n@%m]%F{006}\UE0B2%K{006}%F{000}%~%F{006}%K{002}\UE0B0%F{000}%#%F{002}%k\UE0B0%f '
+fi
function zle-line-init zle-keymap-select {
- VIM_PROMPT=$'%S%F{012}[%n@%m]\UE0B2%F{015}%s%~%S%F{012}\UE0B0%#%s\UE0B0%f '
+ VIM_PROMPT=$'%F{000}%K{012}[%n@%m]%F{006}\UE0B2%K{006}%F{000}%~%F{006}%K{012}\UE0B0%F{000}%#%F{012}%k\UE0B0%f '
PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}"
zle reset-prompt
}
@@ -76,6 +89,8 @@ if [ -n "$ZPLUG_INSTALLED" ]; then
fi
autoload -Uz compinit
-compinit
+compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
+
+zstyle ':completion:*' hosts off
#zprof