* usr/lib/byobu/wifi_quality:

- clear wifi status indicator when there is no wifi connection
This commit is contained in:
Dustin Kirkland 2013-05-15 20:52:23 -04:00
commit 9afa191ae5
2 changed files with 6 additions and 2 deletions

2
debian/changelog vendored
View file

@ -2,6 +2,8 @@ byobu (5.42) unreleased; urgency=low
* usr/bin/Makefile.am:
- install byobu-ulevel
* usr/lib/byobu/wifi_quality:
- clear wifi status indicator when there is no wifi connection
-- Dustin Kirkland <kirkland@ubuntu.com> Thu, 09 May 2013 09:06:07 -0500

View file

@ -40,8 +40,10 @@ __wifi_quality() {
if [ -z "$quality" ] || [ "$quality" = "0" ]; then
quality="0"
fi
[ -n "$quality" ] || return
[ "$quality" = "0" ] && return
if [ "$bitrate" = "0" ] || [ "$quality" = "0" ] || [ -z "$bitrate" ] || [ -z "$quality"]; then
rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/wifi_quality"*
return
fi
printf "${ICON_WIFI}"; color b C k; printf "%s" "$bitrate"; color -; color C k; printf "%s" "$ICON_MBPS"; color -; color b C k; printf "%s" "$quality"; color -; color C k; printf "%s" "$PCT"; color --
}