config.phundrak.com/.config/i3/battery.sh

7 lines
200 B
Bash
Raw Normal View History

2019-07-21 01:27:31 +00:00
#!/bin/bash
BATTINFO=`acpi -b`
if [[ `echo $BATTINFO | grep Discharging` && `echo $BATTINFO | cut -f 5 -d " "` < 00:15:00 ]] ; then
DISPLAY=:0.0 /usr/bin/notify-send "low battery" "$BATTINFO"
fi