plugins/battery: Correct grep regex when upower is used

This commit is contained in:
DaarkMoon
2021-03-28 17:37:37 +02:00
committed by Koichi Murase
parent 7d8a848d2c
commit 062a128cb6

View File

@@ -6,7 +6,7 @@ if ! command -v "command_exists" >/dev/null; then command_exists() { command -v
ac_adapter_connected(){
if command_exists upower;
then
upower -i $(upower -e | grep BAT) | grep 'state' | grep -q 'charging\|fully-charged'
upower -i $(upower -e | grep BAT) | grep 'state' | grep -q '[^(dis)]charging\|fully-charged'
return $?
elif command_exists acpi;
then