Openbox: monitor laptop battery via CLI and notify-send

while (true);do acpi -b | perl -n -e 's/.*?(\d+)%.*/$1/;chomp;print "$_...";if ($_ <= 15) {`notify-send batalert:$_`};';sleep 180;done

Would like a beep, but can't get one, no PC speaker on MacBook Air and mplayer buffers.


Popular posts from this blog

Debugging pfsense firewall rules clearly and easily

Direct ssh to a server via proxy using putty/plink on Windows

telnet vs netcat