dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 9790f728674a88e1197d7f0c199c202a0d53e2f2
parent bfb1e3a19f6767d5876029481b8ebee7109830c5
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 17 Feb 2020 09:58:07 +0100

Small improvement to battery status parsing

Diffstat:
M.local/bin/sysstatus | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.local/bin/sysstatus b/.local/bin/sysstatus @@ -44,8 +44,8 @@ printf " $separator" # battery if type apm >/dev/null 2>&1; then - printf " %s" "$(apm | grep -o -E "[0-9]*%")" - printf "%s" "$(apm | grep -o -E " [0-9]* min")" + printf " %s" "$(apm | grep -o -E "[0-9]+%")" + printf "%s" "$(apm | grep -o -E " [0-9]+ min")" printf " $separator" elif [ -d "/sys/class/power_supply/BAT0" ]; then batstatus=$(sed -n 's/Charging/+/;s/Discharging/-/' \