1

Speed improvements on iSH

This commit is contained in:
Evan Pratten 2024-04-15 19:37:13 -04:00
parent 8ce24d5e61
commit 557d53ba1f
2 changed files with 26 additions and 15 deletions

View File

@ -2,6 +2,11 @@
# There are some important env vars that need to exist
export EWCONFIG_ROOT="$HOME/.config/ewconfig"
# Auto-detect if we are running inside of ISH (IOS Shell)
if [ $(uname -r | grep -c "\-ish$") -gt 0 ]; then
export EWCONFIG_IN_ISH=1
fi
# Load my custom prompt and macros
. $EWCONFIG_ROOT/configs/shells/zsh/prompt.sh
. $EWCONFIG_ROOT/configs/shells/zsh/macros.sh

View File

@ -29,6 +29,9 @@ fi
# Add the common prompt parts
export PROMPT="${PROMPT}%{$fg[cyan]%}%~ ${USER_ICON} %{$reset_color%}"
setopt prompt_subst
# Don't bother rendering VCS info on weak systems. Just fallback to the time and status
if [ -n "$EWCONFIG_IN_ISH" ]; then
autoload -Uz vcs_info
zstyle ':vcs_info:*' actionformats \
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
@ -46,3 +49,6 @@ vcs_info_wrapper() {
fi
}
export RPROMPT=$'%T $(vcs_info_wrapper)%?'
else
export RPROMPT=$'%T %?'
fi