From b07199fac143b06b88ddfd89733c4664270bb285 Mon Sep 17 00:00:00 2001 From: DaarkMoon Date: Tue, 4 Jan 2022 16:42:59 +0100 Subject: [PATCH] Update regular expression to be POSIX compatible --- 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 3b506bf..401845c 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 '[: \t]charging\|fully-charged' + upower -i $(upower -e | grep BAT) | grep 'state' | grep -q '[:[:blank:]]charging\|fully-charged' return $? elif command_exists acpi; then