show wifi bitrate

-- Dustin Kirkland <kirkland@ubuntu.com>Mon, 06 Apr 2009 13:55:41 -0700
This commit is contained in:
Dustin Kirkland 2009-04-07 07:35:37 -07:00
commit 3fd52e868f
2 changed files with 4 additions and 2 deletions

View file

@ -22,4 +22,6 @@ p="wifi-quality"
grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0 grep -qs "^$p=1$" "$HOME/.screen-profiles/status" || exit 0
interface=`route -n | tail -n 1 | sed "s/^.* //"` interface=`route -n | tail -n 1 | sed "s/^.* //"`
iwconfig "$interface" 2>/dev/null | grep "Link Quality=" | sed "s/^.*Link Quality=//" | sed "s/ .*$//g" | awk '{printf "\005{=b Ck}%.0f\005{-}\005{= Ck}%%)))\005{-} ", $1}' || exit 0 bitrate=`iwconfig "$interface" 2>/dev/null | grep "Bit Rate=" | sed "s/^.*Bit Rate=//" | sed "s/ .*$//g"`
quality=`iwconfig "$interface" 2>/dev/null | grep "Link Quality=" | sed "s/^.*Link Quality=//" | sed "s/ .*$//g"`
echo "$bitrate" "$quality" | awk '{printf "\005{= Ck}%sMb/s,\005{-}\005{=b Ck}%.0f\005{-}\005{= Ck}%%)))\005{-} ", $1, $2}'

2
debian/changelog vendored
View file

@ -21,7 +21,7 @@ screen-profiles (1.43) unreleased; urgency=low
added new status items for battery state, number of users, and system added new status items for battery state, number of users, and system
uptime uptime
-- Dustin Kirkland <kirkland@ubuntu.com> Mon, 06 Apr 2009 13:52:30 -0700 -- Dustin Kirkland <kirkland@ubuntu.com> Mon, 06 Apr 2009 13:55:41 -0700
screen-profiles (1.42-0ubuntu1) jaunty; urgency=low screen-profiles (1.42-0ubuntu1) jaunty; urgency=low