zsh: redo shell prompt, use OS specific icon in prompt

This commit is contained in:
Nico 2025-05-03 16:16:01 +10:00
parent 53174334aa
commit ec7c50dedc

View file

@ -1,6 +1,24 @@
# z shell configuration
PROMPT="%F{green}%~ %F{yellow}%m %f"
export OSICON="?"
if [ -e /System ]; then
OSICON=""
else
. /etc/os-release &> /dev/null
if [ "$ID" = "nixos" ]; then
OSICON=""
elif [ "$ID" = "debian" ]; then
OSICON=""
elif [ "$ID" = "fedora" ]; then
OSICON="󰣇"
elif [ "$ID" = "arch" ]; then
OSICON=""
fi
fi
PROMPT="%K{blue}%F{black} %~ %K{yellow} $OSICON %k "
bindkey -e