diff --git a/debian/changelog b/debian/changelog index 0855e90e..75a2a337 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,11 @@ byobu (4.44) unreleased; urgency=low * usr/lib/byobu/battery: - protect against division by zero + [ Daniel Hahler ] + * usr/lib/byobu/battery, usr/lib/byobu/.shutil, + usr/share/byobu/profiles/tmux, usr/share/byobu/status/statusrc: + - various fixes and documentation enhancements + -- Dustin Kirkland Sat, 22 Oct 2011 03:21:46 -0500 byobu (4.43-0ubuntu1) precise; urgency=low diff --git a/usr/lib/byobu/.shutil b/usr/lib/byobu/.shutil index e98f7f54..a7c04478 100755 --- a/usr/lib/byobu/.shutil +++ b/usr/lib/byobu/.shutil @@ -269,9 +269,7 @@ status_freq() { } get_now() { - if [ -n "${BASH_VERSION}" ] && [ -n "${SECONDS}" ]; then - _RET=${SECONDS} - elif [ -r /proc/uptime ]; then + if [ -r /proc/uptime ]; then # return the integer part of the first item in /proc/uptime local s c read s c < /proc/uptime diff --git a/usr/lib/byobu/battery b/usr/lib/byobu/battery index 76a5e7e3..c2011b12 100755 --- a/usr/lib/byobu/battery +++ b/usr/lib/byobu/battery @@ -26,6 +26,7 @@ __battery_detail() { cat "$bat/info" cat "$bat/state" done + # FIXME: do the same thing with the /sys interface } __battery() { @@ -40,7 +41,7 @@ __battery() { full="$POWER_SUPPLY_CHARGE_FULL" rem="$POWER_SUPPLY_CHARGE_NOW" state="$POWER_SUPPLY_STATUS" - [ -n "$present" ] && [ -n "$full" ] && [ -n "$rem" ] && [ "$state" ] && break + [ "$present" = "1" ] && [ -n "$full" ] && [ -n "$rem" ] && [ -n "$state" ] && break fi ;; /proc/*) @@ -64,6 +65,7 @@ __battery() { esac [ -n "$rem" -a -n "$state" ] && break done < "$bat/state" + [ -n "$full" ] && [ -n "$rem" ] && [ -n "$state" ] && break ;; esac done @@ -83,7 +85,7 @@ __battery() { case $state in charging|Charging|Unknown) sign="+" ;; discharging|Discharging) sign="-" ;; - charged|Unknown) sign="="; percent="" ;; + charged|Unknown|Full) sign="="; percent="" ;; *) sign="$state" ;; esac color $bcolor; printf "%s" "$percent"; color -; color $color; printf "%s" "$sign"; color -- diff --git a/usr/share/byobu/profiles/tmux b/usr/share/byobu/profiles/tmux index 97aec165..8e878100 100644 --- a/usr/share/byobu/profiles/tmux +++ b/usr/share/byobu/profiles/tmux @@ -27,6 +27,8 @@ set -s escape-time 0 # Change to Screen's ctrl-a escape sequence source /usr/share/doc/tmux/examples/screen-keys.conf +# On Archlinux, this file is not under the same directory +source /usr/share/tmux/screen-keys.conf # Byobu's Keybindings bind-key -n F1 new-window -k -t config byobu-config diff --git a/usr/share/byobu/status/statusrc b/usr/share/byobu/status/statusrc index e881a3d9..3e96dc7b 100644 --- a/usr/share/byobu/status/statusrc +++ b/usr/share/byobu/status/statusrc @@ -22,13 +22,39 @@ # Configurations that you can override; if you leave these commented out, # Byobu will try to auto-detect them. -#LOGO="\o/" -#MONITORED_DISK=/ -#DISK_IO_THRESHOLD=50 -#MONITORED_INTERFACE=eth0 -#NETWORK_THRESHOLD=20 -#MONITORED_TEMP=/proc/acpi/thermal_zone/THM0/temperature -#TEMP=F + +# This should be auto-detected for most distro, but setting it here will save +# some call to lsb_release and the like. #DISTRO=Ubuntu + +# Default: depends on the distro (which is either auto-detected, either set +# via $DISTRO) +#LOGO="\o/" + +# Default: / +#MONITORED_DISK=/ + +# Minimum disk throughput that triggers the notification (in kB/s) +# Default: 50 +#DISK_IO_THRESHOLD=50 + +# Default: eth0 +#MONITORED_INTERFACE=eth0 + +# Unit used for network throughput (either bits per second or bytes per second) +# Default: bits +#NETWORK_UNITS=bytes + +# Minimum network throughput that triggers the notification (in kbit/s) +# Default: 20 +#NETWORK_THRESHOLD=20 + +# You can add an additional source of temperature here +#MONITORED_TEMP=/proc/acpi/thermal_zone/THM0/temperature + +# Default: C +#TEMP=F + #SERVICES="eucalyptus-nc|NC eucalyptus-cloud|CLC eucalyptus-walrus eucalyptus-cc|CC eucalyptus-sc|SC" + #FAN=$(find /sys -type f -name fan1_input | head -n1)