mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
* 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:
parent
eaa32a057a
commit
4851f82962
4 changed files with 6 additions and 6 deletions
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue