scripts

shell scripts
git clone git://git.bitsmanent.org/scripts
Log | Files | Refs | README

commit 515663cc012f9473d1522af78d1a46c00469d210
parent 5ca71c8803c7db9463fdc06a0a8cf51b44c43116
Author: clamiax <smoppy@gmail.com>
Date:   Sat, 25 Jan 2014 22:43:33 +0100

Critic or warning, not both.

Diffstat:
Macpi | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/acpi b/acpi @@ -28,8 +28,11 @@ main() { [ $ACPLUGGED -eq 1 ] && exit t=$(getbattery) - [ $t -le $BATTCRITIC ] && suspend - [ $t -le $BATTWARNING ] && warning $t + if [ $t -le $BATTCRITIC ]; then + suspend + elif [ $t -le $BATTWARNING ]; then + warning $t + fi } main "$@"