summaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/zshenv1
-rw-r--r--zsh/zshrc8
2 files changed, 7 insertions, 2 deletions
diff --git a/zsh/zshenv b/zsh/zshenv
index df0371e..3719ef4 100644
--- a/zsh/zshenv
+++ b/zsh/zshenv
@@ -2,5 +2,6 @@
unset HISTFILE
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export skip_global_compinit=1
+fpath=($XDG_CONFIG_HOME/functions $fpath)
[ -f /etc/profile ] && . /etc/profile
[ -f "$XDG_CONFIG_HOME/sh/profile" ] && . "$XDG_CONFIG_HOME/sh/profile"
diff --git a/zsh/zshrc b/zsh/zshrc
index 9acd42f..dffdc65 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -44,9 +44,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{009}[%n@%m]%F{013}\UE0B2%K{013}%F{000}%~%F{013}%K{009}\UE0B0%F{000}%#%F{009}%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{013}\UE0B2%K{013}%F{000}%~%F{013}%K{012}\UE0B0%F{000}%#%F{012}%k\UE0B0%f '
PS1="${${KEYMAP/vicmd/$VIM_PROMPT}/main/$MYPROMPT}"
zle reset-prompt
}