From cf4ad66b492dce1c4044591a23e151bdf042b6f9 Mon Sep 17 00:00:00 2001 From: Harald Pfeiffer Date: Wed, 11 Mar 2026 02:03:45 +0100 Subject: feat: include OS version in prompt --- .bash/prompt.bash | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to '.bash/prompt.bash') diff --git a/.bash/prompt.bash b/.bash/prompt.bash index 9adc360..2a368f9 100644 --- a/.bash/prompt.bash +++ b/.bash/prompt.bash @@ -155,12 +155,37 @@ __prompt_command() { else local EXIT2="$EXIT" fi + PS1='\[\033[2m\033[3m\]\#\[\033[0m\] ' + if [ "$OSVER" ]; then + PS1+='\[\033[48;5;237m\033[\033[38;5;253m\] ' + PS1+="$OSVER" + PS1+=' \[\033[0m\] ' + fi + PS1+='\[\033[1m\]\[' + PS1+="$($FGC1)" + PS1+='\]' case "$MYUID" in 0) - PS1="\[\\033[2m\\033[3m\]\\#\[\\033[0m\] \[$(tput bold)\]\[$($FGC1)\]\\u\[$($FGC2)\]@$PHN \[$($FGC3)\]\\w \[$(tput sgr0)\]\\n" + # PS1="\[\\033[2m\\033[3m\]\\#\[\\033[0m\] \[$(tput bold)\]\[$($FGC1)\]\\u\[$($FGC2)\]@$PHN \[$($FGC3)\]\\w \[$(tput sgr0)\]\\n" + PS1+='\u\[' + PS1+="($FGC2)" + PS1+='\]' + PS1+="@$PHN" + PS1+='\[' + PS1+="$($FGC3)" + PS1+='\]\w \[\033[0m\]\n' ;; *) - PS1="\[\\033[2m\\033[3m\]\\#\[\\033[0m\] \[$(tput bold)\]\[$($FGC1)\]\t \[$($FGC2)\]\\u$UHSEP\[$($FGC3)\]$PHN \\w \[$(tput sgr0)\]\\n" + # PS1="\[\\033[2m\\033[3m\]\\#\[\\033[0m\] \[$(tput bold)\]\[$($FGC1)\]\t \[$($FGC2)\]\\u$UHSEP\[$($FGC3)\]$PHN \\w \[$(tput sgr0)\]\\n" + PS1+='\t \[' + PS1+="$($FGC2)" + PS1+='\]\u' + PS1+="$UHSEP" + PS1+='\[' + PS1+="$($FGC3)" + PS1+='\]' + PS1+="$PHN" + PS1+=' \w \[\033[0m\]\n' ;; esac # git-completion. Sources: -- cgit v1.2.3