diff options
author | mail_redacted_for_web | 2024-10-31 02:56:18 +0100 |
---|---|---|
committer | mail_redacted_for_web | 2024-10-31 02:56:18 +0100 |
commit | 445b4c69cf1580a83731c37d42f944500f2f98d4 (patch) | |
tree | be4afdcb5150d7c6d6bf43ca2876516ffe1c7ec1 /.bash/prompt.bash | |
parent | eb3c669bcf77786dd49f1606963c4dd2f70bdf4d (diff) | |
download | dotfiles-445b4c69cf1580a83731c37d42f944500f2f98d4.tar.bz2 |
Make a difference between Ubuntu 22 and 24
As currently I have to deal with Canonical's whimsical "distro",
I like to differ more between major "releases".
Diffstat (limited to '.bash/prompt.bash')
-rw-r--r-- | .bash/prompt.bash | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/.bash/prompt.bash b/.bash/prompt.bash index 8c4dbaa..c5b8c92 100644 --- a/.bash/prompt.bash +++ b/.bash/prompt.bash @@ -47,12 +47,18 @@ case "$MYUID" in *centos*) FGC2="fgcolor 25";FGC3="fgcolor 208";; *solaris) FGC2="fgcolor 31";FGC3="fgcolor 124";; ubuntu) - if [ "$OSMAJVER" -ge 22 ];then + if [ "$OSMAJVER" -ge 24 ];then if printf "%b" "$TERM"|grep -P 'xterm|256' > /dev/null;then - FGC2="fgcolor 89";FGC3="fgcolor 208" + FGC2="fgcolor 125";FGC3="fgcolor 202" else FGC2="fgcolor 53";FGC3="fgcolor 184" fi + elif [ "$OSMAJVER" -ge 22 ];then + if printf "%b" "$TERM"|grep -P 'xterm|256' > /dev/null;then + FGC2="fgcolor 208";FGC3="fgcolor 89" + else + FGC2="fgcolor 184";FGC3="fgcolor 53" + fi else FGC2="fgcolor 130";FGC3="fgcolor 215" fi @@ -92,7 +98,13 @@ case "$MYUID" in *centos*) FGC1="fgcolor 25";FGC3="fgcolor 208";; *solaris) FGC1="fgcolor 31";FGC3="fgcolor 124";; ubuntu) - if [ "$OSMAJVER" -ge 22 ];then + if [ "$OSMAJVER" -ge 24 ];then + if printf "%b" "$TERM"|grep -P 'xterm|256' > /dev/null;then + FGC1="fgcolor 125";FGC3="fgcolor 202" + else + FGC1="fgcolor 53";FGC3="fgcolor 184" + fi + elif [ "$OSMAJVER" -ge 22 ];then if printf "%b" "$TERM"|grep -P 'xterm|256' > /dev/null;then FGC1="fgcolor 89";FGC3="fgcolor 208" else |