From 062a128cb6f57ce3a8076caaf93feebec6ae823a Mon Sep 17 00:00:00 2001 From: DaarkMoon Date: Sun, 28 Mar 2021 17:37:37 +0200 Subject: [PATCH] plugins/battery: Correct grep regex when upower is used --- plugins/battery/battery.plugin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/battery/battery.plugin.sh b/plugins/battery/battery.plugin.sh index 37210d4..acf4c0a 100644 --- a/plugins/battery/battery.plugin.sh +++ b/plugins/battery/battery.plugin.sh @@ -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