mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-14 10:46:58 -07:00
* usr/lib/byobu/memory: LP: #1059307
- drop fo_cached calculation, which was not actually used - change foreground color of free memory percentage to yellow, if its over 90% used - use a better variable name for memory usage
This commit is contained in:
parent
bf51947bb1
commit
268b67a6f0
3 changed files with 14 additions and 4 deletions
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -7,6 +7,11 @@ byobu (5.22) unreleased; urgency=low
|
|||
- clean up obsolete config file
|
||||
* usr/share/byobu/keybindings/f-keys.screen:
|
||||
- create a new shell when splitting a window in byobu-screen
|
||||
* usr/lib/byobu/memory: LP: #1059307
|
||||
- drop fo_cached calculation, which was not actually used
|
||||
- change foreground color of free memory percentage to yellow,
|
||||
if its over 90% used
|
||||
- use a better variable name for memory usage
|
||||
|
||||
[ Jake Biesinger and Dustin Kirkland ]
|
||||
* usr/share/byobu/keybindings/common, usr/share/byobu/keybindings/f-
|
||||
|
|
|
@ -39,9 +39,8 @@ __memory() {
|
|||
buffers_plus_cached=$(($buffers+$cached))
|
||||
# "free output" buffers and cache (output from 'free')
|
||||
fo_buffers=$(($kb_main_used - $buffers_plus_cached))
|
||||
fo_cached=$(($kb_main_free + $buffers_plus_cached))
|
||||
fpdiv $((100*${fo_buffers})) "${total}" 0;
|
||||
f=${_RET}
|
||||
usage=${_RET}
|
||||
if [ $total -ge 1048576 ]; then
|
||||
fpdiv "$total" 1048567 1
|
||||
total=${_RET}
|
||||
|
@ -53,8 +52,14 @@ __memory() {
|
|||
else
|
||||
unit="$ICON_KB"
|
||||
fi
|
||||
if [ $usage -gt 90 ]; then
|
||||
# Change foreground to yellow, if usage over 90%
|
||||
fg="Y"
|
||||
else
|
||||
fg="W"
|
||||
fi
|
||||
[ -n "$total" ] || return
|
||||
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 --
|
||||
color b g W; printf "%s" "$total"; color -; color g W; printf "%s" "$unit"; color -; color b g "$fg"; printf "%s" "$usage"; color -; color g "$fg"; printf "%s" "$PCT"; color --
|
||||
}
|
||||
|
||||
# vi: syntax=sh ts=4 noexpandtab
|
||||
|
|
|
@ -74,7 +74,7 @@ The background colors of the \fBbyobu\fP status lines can be adjusted by editing
|
|||
|
||||
\fBmail\fP \- system mail for the current user; the letter '[M]' is displayed in the lower bar toward the left in black text on a grey background
|
||||
|
||||
\fBmemory\fP \- total memory available and used in the system; displayed in the lower bar toward the right in white text on a green background
|
||||
\fBmemory\fP \- total memory available and used percentage in the system; displayed in the lower bar toward the right in white text on a green background
|
||||
|
||||
\fBmenu\fP \- a simple indicator directing new users to use the F9 keybinding to access the byobu menu
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue