mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-21 14:03:18 -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:
|
||||
- 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
|
||||
|
||||
byobu (4.43-0ubuntu1) precise; urgency=low
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 --
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue