diff options
Diffstat (limited to 'batterylow')
| -rwxr-xr-x | batterylow | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -5,18 +5,18 @@ battery=$(upower -e | grep BAT | head -n 1) percentage=$(upower -i "$battery" | - awk '/percentage/ {gsub(/%/, "", $2); print $2}') + awk '/percentage/ {gsub(/%/, "", $2); print $2}') state=$(upower -i "$battery" | - awk '/state/ {print $2}') + awk '/state/ {print $2}') # Only notify if the battery is discharging if [ "$state" != "discharging" ]; then - exit 0 + exit 0 fi if [ "$percentage" -le 5 ]; then - notify-send "Battery very low." + notify-send "Battery very low." elif [ "$percentage" -le 15 ]; then - notify-send "Battery low." + notify-send "Battery low." fi |
