Created
November 30, 2012 00:17
-
-
Save dmouse/4172850 to your computer and use it in GitHub Desktop.
Notify my Android | battery charged | NMA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
acpi -b |\ | |
grep Battery |\ | |
awk '{ | |
if ( int($4) >= 98 ) { | |
system("/usr/local/bin/nma Battery Charged \"Desconecta el pinche cargador\" 0 > /dev/null") | |
} | |
if ( int($4) < 10 ) { | |
system("/usr/local/bin/nma Battery Charged \"Conecta el pinche cargador\" 0 > /dev/null") | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment