#!/bin/bash
BATTERY=$(upower -e | grep 'BAT')
while [ 1 ] do BATTERY_PERCENTAGE=$(upower -i $BATTERY|grep percentage|awk '{ print $2 }'|sed s/'%'/''/g)
if [[ "$BATTERY_PERCENTAGE" -lt "11" ]]; then
notify-send --urgency=critical "WARNING: Battery is about to die" "Plug in the power cable" play /usr/share/sounds/KDE-Sys-Warning.ogg &> /dev/null fi
sleep 10
done
#!/bin/bash
BATTERY=$(upower -e | grep 'BAT')
while [ 1 ] PERCENTAGE= $(upower -i $BATTERY|grep percentage|awk '{ print $2 }'|sed s/'%'/''/g)
do
BATTERY_
if [[ "$BATTERY_ PERCENTAGE" -lt "11" ]]; then
notify-send --urgency=critical "WARNING: Battery is about to die" "Plug in the power cable" sounds/ KDE-Sys- Warning. ogg &> /dev/null
play /usr/share/
fi
sleep 10
done