diff --git a/bin/battery b/bin/battery index cd2f586f..770ebe1e 100755 --- a/bin/battery +++ b/bin/battery @@ -56,24 +56,13 @@ for bat in $BATS; do fi full=$(search "$infofile" "last full capacity: *\(.*\) m[AW]h") - warn=$(search "$infofile" "design capacity warning: \(.*\) m[AW]h") - low=$(search "$infofile" "design capacity low: \(.*\) m[AW]h") - rem=$(search "$statefile" "remaining capacity: *\(.*\) m[AW]h") - if [ "$rem" -lt "$low" ]; then - cap_color="{= rk}" - elif [ "$rem" -lt "$warn" ]; then - cap_color="{= yk}" - else - cap_color="{= gk}" - fi - percent=$( echo "$rem" "$full" | awk '{printf "%.0f", 100*$1/$2}') if [ "$percent" -lt 17 ]; then - per_color="{= rk}" + per_color="{= rw}" elif [ "$percent" -lt 33 ]; then - per_color="{= Rk}" + per_color="{= Rw}" elif [ "$percent" -lt 50 ]; then per_color="{= Yk}" elif [ "$percent" -lt 67 ]; then @@ -103,5 +92,5 @@ for bat in $BATS; do ;; esac - printf "\005%s%s\005{-}\005%s|%s|\005{-} " "$per_color" "$percent" "$cap_color" "$sign" + printf "\005%s%s|%s|\005{-} " "$per_color" "$percent" "$sign" done diff --git a/debian/changelog b/debian/changelog index af9d6de6..37d8dc03 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,7 @@ byobu (2.4) unreleased; urgency=low instead, LP: #376080 * bin/network-down,network-up,updates-available: use /var/run/screen for status cache files, to keep from waking up the disk + * bin/battery: color the entire battery the same way * byobu-export: tar files with owner/group as root/root, LP: #371025 * byobu, debian/install, motd+shell, profiles/byoburc: launch screen with a simple config file that includes the chosen profile plus @@ -29,7 +30,10 @@ byobu (2.4) unreleased; urgency=low [ David Duffey ] * rpm/byobu.spec: initial specfile for RH packaging - -- Dustin Kirkland Sat, 16 May 2009 20:19:38 +0100 + [ Dustin Kirkland ] + * - + + -- Dustin Kirkland Sat, 16 May 2009 20:35:23 +0100 byobu (2.3-0ubuntu1) karmic; urgency=low