summaryrefslogtreecommitdiff
path: root/batterylow
diff options
context:
space:
mode:
Diffstat (limited to 'batterylow')
-rwxr-xr-xbatterylow10
1 files changed, 5 insertions, 5 deletions
diff --git a/batterylow b/batterylow
index 0f2ebd4..85cdf5d 100755
--- a/batterylow
+++ b/batterylow
@@ -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