Permalink
Browse files

First commit

  • Loading branch information...
1 parent 78b8edf commit 2fc52093c73300580a984651ecd865a7647034d8 liquid@git.com committed Jul 3, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 battery.sh
  2. BIN full.wav
  3. BIN low.wav
View
@@ -0,0 +1,17 @@
+a=`ibam --percentbattery | head --lines 1`
+set $a
+flag=0
+
+if [ $3 -eq 100 -a $flag -eq 0 ]
+then
+notify-send "Battery is full" " Remove the charger and save electricity!"
+flag=1
+aplay -q full.wav
+
+elif [ $3 -le 10 -a $flag -eq 0 ]
+then
+notify-send "Battery Low" "Please charge"
+flag=1
+aplay -q low.wav
+
+fi
View
BIN full.wav
Binary file not shown.
View
BIN low.wav
Binary file not shown.

0 comments on commit 2fc5209

Please sign in to comment.