From ec7c50dedcc24e97ab068788b88074d93ac44182 Mon Sep 17 00:00:00 2001 From: Nico Date: Sat, 3 May 2025 16:16:01 +1000 Subject: [PATCH] zsh: redo shell prompt, use OS specific icon in prompt --- stow/.zshrc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/stow/.zshrc b/stow/.zshrc index a468ff6..c573433 100644 --- a/stow/.zshrc +++ b/stow/.zshrc @@ -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