From 6407769fe06b1193ef73e423722aebee53b18b0d Mon Sep 17 00:00:00 2001 From: Amand Tihon Date: Sat, 10 Apr 2010 11:53:02 +0200 Subject: [PATCH] Hide potential errors from calls to acpi --- S70_battery | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/S70_battery b/S70_battery index c361442..023f004 100644 --- a/S70_battery +++ b/S70_battery @@ -9,10 +9,10 @@ battery_level() local online remaining bstatus gauge gcolor online=0 - acpi -a | grep -q "on-line" && online=1 + acpi -a 2> /dev/null | grep -q "on-line" && online=1 - bstatus="$(acpi -b)" + bstatus="$(acpi -b 2> /dev/null)" remaining="$(echo ${bstatus[(w)4]} | sed -r 's/(^[0-9]+)%.*/\1/')" if [[ -z "$remaining" ]]; then -- 2.39.2