* usr/lib/byobu/.constants, usr/lib/byobu/network:

- save a few more chars, drop the "ps" per second
This commit is contained in:
Dustin Kirkland 2011-10-20 12:53:22 -05:00
commit 8033b4cb4c
3 changed files with 6 additions and 4 deletions

2
debian/changelog vendored
View file

@ -13,6 +13,8 @@ byobu (4.42) unreleased; urgency=low
- add unicode characters for KB/MB/GB/GHz - add unicode characters for KB/MB/GB/GHz
* usr/lib/byobu/wifi_quality: * usr/lib/byobu/wifi_quality:
- drop comma, save a char - drop comma, save a char
* usr/lib/byobu/.constants, usr/lib/byobu/network:
- save a few more chars, drop the "ps" per second
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 14 Oct 2011 14:53:51 -0500 -- Dustin Kirkland <kirkland@ubuntu.com> Fri, 14 Oct 2011 14:53:51 -0500

View file

@ -42,7 +42,7 @@ if [ "$UTF8" = "1" ] || [ "$BYOBU_BACKEND" = "tmux" ]; then
ICON_MHz="㎒" ICON_MHz="㎒"
ICON_GHz="㎓" ICON_GHz="㎓"
#ICON_MBPS="㏔㎰" #ICON_MBPS="㏔㎰"
ICON_MBPS="Mbps" ICON_MBPS="Mb"
else else
ICON_C="C" ICON_C="C"
ICON_F="F" ICON_F="F"

View file

@ -34,7 +34,7 @@ __network() {
[ -n "$NETWORK_THRESHOLD" ] || NETWORK_THRESHOLD=20 [ -n "$NETWORK_THRESHOLD" ] || NETWORK_THRESHOLD=20
OIFS=$IFS OIFS=$IFS
for i in up down; do for i in up down; do
unit="kbps" unit="kb"
case $i in case $i in
up) symbol="$ICON_UP" ;; up) symbol="$ICON_UP" ;;
down) symbol="$ICON_DN" ;; down) symbol="$ICON_DN" ;;
@ -74,11 +74,11 @@ __network() {
if [ "$rate" -gt 1000000 ]; then if [ "$rate" -gt 1000000 ]; then
fpdiv "$rate" 1000000 1 fpdiv "$rate" 1000000 1
rate=${_RET} rate=${_RET}
unit="Gbps" unit="Gb"
elif [ "$rate" -gt 1000 ]; then elif [ "$rate" -gt 1000 ]; then
fpdiv "$rate" 1000 1 fpdiv "$rate" 1000 1
rate=${_RET} rate=${_RET}
unit="Mbps" unit="Mb"
fi fi
;; ;;
esac esac