From: Amand Tihon Date: Sat, 10 Apr 2010 09:53:02 +0000 (+0200) Subject: Hide potential errors from calls to acpi X-Git-Url: https://git.alrj.org/?a=commitdiff_plain;h=6407769fe06b1193ef73e423722aebee53b18b0d;p=zsh.d.git Hide potential errors from calls to acpi --- 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