* bin/ip-address, bin/whoami, bin/hostname: use +b rather than =b,

colors look bad on the light* profiles


Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
Dustin Kirkland 2009-05-13 23:04:40 -05:00
commit 4851f82962
4 changed files with 6 additions and 6 deletions

View file

@ -27,4 +27,4 @@ fi
at= at=
grep -qs "^whoami=1$" "$HOME/.$PKG/status" && at="@" grep -qs "^whoami=1$" "$HOME/.$PKG/status" && at="@"
printf "\005{=b }%s%s\005{-}" "$at" $(hostname -s 2>/dev/null || hostname) printf "\005{+b W}%s%s\005{-}" "$at" $(hostname -s 2>/dev/null || hostname)

View file

@ -28,4 +28,4 @@ space=
grep -qs "^hostname=1$" "$HOME/.$PKG/status" && space=" " grep -qs "^hostname=1$" "$HOME/.$PKG/status" && space=" "
grep -qs "^whoami=1$" "$HOME/.$PKG/status" && space=" " grep -qs "^whoami=1$" "$HOME/.$PKG/status" && space=" "
printf "%s\005{=b }%s\005{-}" "$space" $(hostname -i 2>/dev/null) printf "%s\005{+b }%s\005{-}" "$space" $(hostname -i 2>/dev/null)

View file

@ -26,13 +26,13 @@ if which lsb_release >/dev/null 2>&1; then
r=$(lsb_release -s -d) r=$(lsb_release -s -d)
if echo "$r" | grep -qs "^Ubuntu .*\..*\..*$"; then if echo "$r" | grep -qs "^Ubuntu .*\..*\..*$"; then
# Use the -d if an Ubuntu LTS # Use the -d if an Ubuntu LTS
printf "\005{=b }%s\005{-} " "$r" printf "\005{+b }%s\005{-} " "$r"
else else
# But for other distros the description # But for other distros the description
# is too long, so build from -i and -r # is too long, so build from -i and -r
i=$(lsb_release -s -i) i=$(lsb_release -s -i)
r=$(lsb_release -s -r) r=$(lsb_release -s -r)
printf "\005{=b }%s %s\005{-} " "$i" "$r" printf "\005{+b }%s %s\005{-} " "$i" "$r"
fi fi
elif [ -r "/etc/issue" ]; then elif [ -r "/etc/issue" ]; then
if [ "$1" = "--detail" ]; then if [ "$1" = "--detail" ]; then
@ -40,7 +40,7 @@ elif [ -r "/etc/issue" ]; then
exit 0 exit 0
fi fi
# Otherwise, grab part of /etc/issue, ideally the distro and version # Otherwise, grab part of /etc/issue, ideally the distro and version
printf "\005{=b }%s\005{-} " $(head -n1 /etc/issue | sed "s/ [^0-9]* / /" | awk '{print $1 " " $2}') printf "\005{+b }%s\005{-} " $(head -n1 /etc/issue | sed "s/ [^0-9]* / /" | awk '{print $1 " " $2}')
else else
echo "Unknown" echo "Unknown"
fi fi

View file

@ -22,4 +22,4 @@ if [ "$1" = "--detail" ]; then
exit 0 exit 0
fi fi
printf "\005{=b }%s\005{-}" $(whoami) printf "\005{+b W}%s\005{-}" $(whoami)