mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
screen-profiles-status: stop grepping after one match, subtle perf
improvement -Dustin Kirkland <kirkland@ubuntu.com>Fri, 17 Apr 2009 16:33:53 -0500
This commit is contained in:
parent
f4f89c3fe7
commit
fd906813ac
2 changed files with 5 additions and 4 deletions
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -1,8 +1,9 @@
|
||||||
screen-profiles (1.47) unreleased; urgency=low
|
screen-profiles (1.47) unreleased; urgency=low
|
||||||
|
|
||||||
* UNRELEASED
|
* screen-profiles-status: stop grepping after one match, subtle perf
|
||||||
|
improvement
|
||||||
|
|
||||||
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 17 Apr 2009 15:47:15 -0500
|
-- Dustin Kirkland <kirkland@ubuntu.com> Fri, 17 Apr 2009 16:33:53 -0500
|
||||||
|
|
||||||
screen-profiles (1.46-0ubuntu1) jaunty; urgency=low
|
screen-profiles (1.46-0ubuntu1) jaunty; urgency=low
|
||||||
|
|
||||||
|
|
|
@ -39,11 +39,11 @@ P="$1"
|
||||||
case "$P" in
|
case "$P" in
|
||||||
# default = on, user must override to turn off
|
# default = on, user must override to turn off
|
||||||
cpu-count|cpu-freq|date|load-average|logo|mem-available|mem-used|menu|reboot-required|release|time|updates-available)
|
cpu-count|cpu-freq|date|load-average|logo|mem-available|mem-used|menu|reboot-required|release|time|updates-available)
|
||||||
grep -qs "^$P=0$" "$HOME/.screen-profiles/status" && exit 0
|
grep -qs -m1 "^$P=0$" "$HOME/.screen-profiles/status" && exit 0
|
||||||
;;
|
;;
|
||||||
# default = off, user must override to turn on
|
# default = off, user must override to turn on
|
||||||
arch|battery|ec2-cost|hostname|network-down|network-up|processes|uptime|users|whoami|wifi-quality)
|
arch|battery|ec2-cost|hostname|network-down|network-up|processes|uptime|users|whoami|wifi-quality)
|
||||||
grep -qs "^$P=1$" "$HOME/.screen-profiles/status" || exit 0
|
grep -qs -m1 "^$P=1$" "$HOME/.screen-profiles/status" || exit 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue