Don't nag when cable is plugged in
This commit is contained in:
parent
c90ac8fe4a
commit
b3f9f3c05d
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ icon=""
|
||||||
percent="$(upower -d | grep 'percentage' | awk '{print $2}' | head -n 1)"
|
percent="$(upower -d | grep 'percentage' | awk '{print $2}' | head -n 1)"
|
||||||
remaining="$(upower -d | grep 'time to empty' | awk -F: '{print $2}' | awk '{print $1,$2}' | head -n 1)"
|
remaining="$(upower -d | grep 'time to empty' | awk -F: '{print $2}' | awk '{print $1,$2}' | head -n 1)"
|
||||||
|
|
||||||
if [ "$(echo "$percent" | awk -F% '{print $1}')" -lt 5 ]; then
|
if [ -n "$remaining" ] && [ "$(echo "$percent" | awk -F% '{print $1}')" -lt 5 ]; then
|
||||||
notify-send "CHARGE YOUR BATTERY"
|
notify-send "CHARGE YOUR BATTERY"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue