mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 22:13:19 -07:00
* usr/lib/byobu/battery, usr/lib/byobu/.shutil,
usr/share/byobu/profiles/tmux, usr/share/byobu/status/statusrc: - various fixes and documentation enhancements
This commit is contained in:
commit
ef5a077a81
5 changed files with 45 additions and 12 deletions
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -4,6 +4,11 @@ byobu (4.44) unreleased; urgency=low
|
||||||
* usr/lib/byobu/battery:
|
* usr/lib/byobu/battery:
|
||||||
- protect against division by zero
|
- 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 <kirkland@ubuntu.com> Sat, 22 Oct 2011 03:21:46 -0500
|
-- Dustin Kirkland <kirkland@ubuntu.com> Sat, 22 Oct 2011 03:21:46 -0500
|
||||||
|
|
||||||
byobu (4.43-0ubuntu1) precise; urgency=low
|
byobu (4.43-0ubuntu1) precise; urgency=low
|
||||||
|
|
|
@ -269,9 +269,7 @@ status_freq() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_now() {
|
get_now() {
|
||||||
if [ -n "${BASH_VERSION}" ] && [ -n "${SECONDS}" ]; then
|
if [ -r /proc/uptime ]; then
|
||||||
_RET=${SECONDS}
|
|
||||||
elif [ -r /proc/uptime ]; then
|
|
||||||
# return the integer part of the first item in /proc/uptime
|
# return the integer part of the first item in /proc/uptime
|
||||||
local s c
|
local s c
|
||||||
read s c < /proc/uptime
|
read s c < /proc/uptime
|
||||||
|
|
|
@ -26,6 +26,7 @@ __battery_detail() {
|
||||||
cat "$bat/info"
|
cat "$bat/info"
|
||||||
cat "$bat/state"
|
cat "$bat/state"
|
||||||
done
|
done
|
||||||
|
# FIXME: do the same thing with the /sys interface
|
||||||
}
|
}
|
||||||
|
|
||||||
__battery() {
|
__battery() {
|
||||||
|
@ -40,7 +41,7 @@ __battery() {
|
||||||
full="$POWER_SUPPLY_CHARGE_FULL"
|
full="$POWER_SUPPLY_CHARGE_FULL"
|
||||||
rem="$POWER_SUPPLY_CHARGE_NOW"
|
rem="$POWER_SUPPLY_CHARGE_NOW"
|
||||||
state="$POWER_SUPPLY_STATUS"
|
state="$POWER_SUPPLY_STATUS"
|
||||||
[ -n "$present" ] && [ -n "$full" ] && [ -n "$rem" ] && [ "$state" ] && break
|
[ "$present" = "1" ] && [ -n "$full" ] && [ -n "$rem" ] && [ -n "$state" ] && break
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
/proc/*)
|
/proc/*)
|
||||||
|
@ -64,6 +65,7 @@ __battery() {
|
||||||
esac
|
esac
|
||||||
[ -n "$rem" -a -n "$state" ] && break
|
[ -n "$rem" -a -n "$state" ] && break
|
||||||
done < "$bat/state"
|
done < "$bat/state"
|
||||||
|
[ -n "$full" ] && [ -n "$rem" ] && [ -n "$state" ] && break
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -83,7 +85,7 @@ __battery() {
|
||||||
case $state in
|
case $state in
|
||||||
charging|Charging|Unknown) sign="+" ;;
|
charging|Charging|Unknown) sign="+" ;;
|
||||||
discharging|Discharging) sign="-" ;;
|
discharging|Discharging) sign="-" ;;
|
||||||
charged|Unknown) sign="="; percent="" ;;
|
charged|Unknown|Full) sign="="; percent="" ;;
|
||||||
*) sign="$state" ;;
|
*) sign="$state" ;;
|
||||||
esac
|
esac
|
||||||
color $bcolor; printf "%s" "$percent"; color -; color $color; printf "%s" "$sign"; color --
|
color $bcolor; printf "%s" "$percent"; color -; color $color; printf "%s" "$sign"; color --
|
||||||
|
|
|
@ -27,6 +27,8 @@ set -s escape-time 0
|
||||||
|
|
||||||
# Change to Screen's ctrl-a escape sequence
|
# Change to Screen's ctrl-a escape sequence
|
||||||
source /usr/share/doc/tmux/examples/screen-keys.conf
|
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
|
# Byobu's Keybindings
|
||||||
bind-key -n F1 new-window -k -t config byobu-config
|
bind-key -n F1 new-window -k -t config byobu-config
|
||||||
|
|
|
@ -22,13 +22,39 @@
|
||||||
|
|
||||||
# Configurations that you can override; if you leave these commented out,
|
# Configurations that you can override; if you leave these commented out,
|
||||||
# Byobu will try to auto-detect them.
|
# Byobu will try to auto-detect them.
|
||||||
#LOGO="\o/"
|
|
||||||
#MONITORED_DISK=/
|
# This should be auto-detected for most distro, but setting it here will save
|
||||||
#DISK_IO_THRESHOLD=50
|
# some call to lsb_release and the like.
|
||||||
#MONITORED_INTERFACE=eth0
|
|
||||||
#NETWORK_THRESHOLD=20
|
|
||||||
#MONITORED_TEMP=/proc/acpi/thermal_zone/THM0/temperature
|
|
||||||
#TEMP=F
|
|
||||||
#DISTRO=Ubuntu
|
#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"
|
#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)
|
#FAN=$(find /sys -type f -name fan1_input | head -n1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue