Update fastfetch.nix

This commit is contained in:
ediblerope 2025-12-21 19:52:24 +00:00 committed by GitHub
parent bc21b14d46
commit fd1a52bae7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,7 +59,15 @@
output+="''${FG_ORANGE}\u''${RESET} "
# Path segments
local path="''${PWD/#$HOME/~}"
local path="''${PWD/#$HOME/\~}"
# If we're in home directory, just show ~
if [ "$path" = "~" ]; then
output+="''${FG_GREEN}~''${RESET}"
echo -n "$output"
return
fi
local IFS='/'
local parts=($path)
local colors=("''${FG_GREEN}" "''${FG_CYAN}" "''${FG_BLUE}")