config.phundrak.com/.config/i3/battery.sh
2019-07-21 03:27:31 +02:00

7 lines
200 B
Bash
Executable File

#!/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