* usr/lib/byobu/battery, usr/lib/byobu/cpu_freq, usr/lib/byobu/disk,

usr/lib/byobu/memory, usr/share/man/man1/byobu.1:
  - save a few characters on the status line
This commit is contained in:
Dustin Kirkland 2011-10-07 12:16:29 -05:00
commit 7034cc2d02
6 changed files with 10 additions and 7 deletions

3
debian/changelog vendored
View file

@ -3,6 +3,9 @@ byobu (4.40) unreleased; urgency=low
* usr/bin/byobu-janitor, usr/share/byobu/profiles/tmux:
- use screen keys by default (should probably make this configurable)
- allow local overrides in local tmux.conf
* usr/lib/byobu/battery, usr/lib/byobu/cpu_freq, usr/lib/byobu/disk,
usr/lib/byobu/memory, usr/share/man/man1/byobu.1:
- save a few characters on the status line
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 05 Oct 2011 18:05:32 -0400

View file

@ -70,7 +70,7 @@ __battery() {
charged) sign="="; percent="" ;;
*) sign="$state" ;;
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 --
break
done
}

View file

@ -39,7 +39,7 @@ __cpu_freq() {
freq=$(echo "$freq" "$count" | awk '{printf "%.1f\n", $1/$2/1000}')
fi
fi
color b c W; printf "%s" "$freq"; color -; color c W; printf "%s" "GHz"; color --
color b c W; printf "%s" "$freq"; color -; color c W; printf "%s" "Gz"; color --
}
# vi: syntax=sh ts=4 noexpandtab

View file

@ -39,7 +39,7 @@ __disk() {
size=${size%?}; # take the unit off
pct=${pct%?}; # take off the '%'
_UNIT=${unit}; _SIZE=${size}; _PCT=${pct};
color b M W; echo -n "$_SIZE"; color -; color M W; echo -n "${_UNIT}B,"; color -;
color b M W; echo -n "$_SIZE"; color -; color M W; echo -n "${_UNIT},"; color -;
color b M W; echo -n "$_PCT"; color -; color M W; echo -n "$PCT" ; color --;
}

View file

@ -45,13 +45,13 @@ __memory() {
if [ $total -ge 1048576 ]; then
fpdiv "$total" 1048567 1
total=${_RET}
unit="GB"
unit="G"
elif [ $total -ge 1024 ]; then
fpdiv "$total" 1024 0
total=${_RET}
unit="MB"
unit="M"
else
unit="KB"
unit="K"
fi
color b g W; printf "%s" "$total"; color -; color g W; printf "%s," "$unit"; color -; color b g W; printf "%s" "$f"; color -; color g W; printf "%s" "$PCT"; color --
}

View file

@ -20,7 +20,7 @@ Note that BYOBU_CONFIG_DIR=\fI$XDG_CONFIG_HOME/byobu\fP if defined, and \fI$HOME
\fBarch\fP \- system architecture; displayed on the lower bar toward the left, in the default text color on the default background color
\fBbattery\fP \- battery information; display on the lower bar toward the right; |\-| indicates discharging, |+| indicates charging, |=| indicates fully charged; when charging or discharging, the current battery capacity as a percentage is displayed; the colours green, yellow, and red are used to give further indication of the battery's charge state; you may override the detected battery by setting BATTERY=/proc/acpi/battery/BAT0 in \fI$BYOBU_CONFIG_DIR/statusrc\fP
\fBbattery\fP \- battery information; display on the lower bar toward the right; \- indicates discharging, + indicates charging, = indicates fully charged; when charging or discharging, the current battery capacity as a percentage is displayed; the colours green, yellow, and red are used to give further indication of the battery's charge state; you may override the detected battery by setting BATTERY=/proc/acpi/battery/BAT0 in \fI$BYOBU_CONFIG_DIR/statusrc\fP
\fBcpu_count\fP \- the number of cpu's or cores on the system; displayed in the lower bar toward the right in the default text color on the default background, followed by a trailing 'x'