mirror of
https://github.com/GRFreire/scripts.git
synced 2026-03-06 03:09:41 +00:00
check_battery: disable notification when charging
This commit is contained in:
parent
3d66555b9b
commit
2ff33939d2
@ -6,6 +6,10 @@ time="$(upower -i $DEVICE | grep time | cut -d':' -f2 | tr -s ' ' | cut -c2-)"
|
||||
perc="$(upower -i $DEVICE | grep percentage | awk '{print $2}' | tr -d '%')"
|
||||
stat="$(upower -i $DEVICE | grep state | awk '{print $2}')"
|
||||
|
||||
if [ "$stat" = "charging" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$perc" -le "20" ]; then
|
||||
urgency="normal"
|
||||
if [ "$perc" -le "10" ]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user