diff --git a/debian/changelog b/debian/changelog index 2d5a0b51..1326e8ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ screen-profiles (1.47) unreleased; urgency=low - * UNRELEASED + * screen-profiles-status: stop grepping after one match, subtle perf + improvement - -- Dustin Kirkland Fri, 17 Apr 2009 15:47:15 -0500 + -- Dustin Kirkland Fri, 17 Apr 2009 16:33:53 -0500 screen-profiles (1.46-0ubuntu1) jaunty; urgency=low diff --git a/screen-profiles-status b/screen-profiles-status index fa3d1f37..2b6ee906 100755 --- a/screen-profiles-status +++ b/screen-profiles-status @@ -39,11 +39,11 @@ P="$1" case "$P" in # 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) - 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 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