From e903d0723e3d126c41e8ac4381214363e2c1f6e7 Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Thu, 3 Feb 2022 22:15:57 +0300 Subject: [PATCH] Fix battery script --- profiles/workspace/i3blocks/scripts/battery.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/profiles/workspace/i3blocks/scripts/battery.nix b/profiles/workspace/i3blocks/scripts/battery.nix index 8067e7b..fc62bf5 100644 --- a/profiles/workspace/i3blocks/scripts/battery.nix +++ b/profiles/workspace/i3blocks/scripts/battery.nix @@ -13,12 +13,12 @@ STATE="$(echo "$INFO" | grep 'state:' | tr -s ' ' | cut -d' ' -f3)" if [[ "x$STATE" == "xfully-charged" ]] || [[ "x$STATE" == "xcharging" ]]; then case $PERCENTAGE in - [2-3]*) icon=;; - [4-5]*) icon=;; - [6-7]*) icon=;; - [8-9]*) icon=;; + [0-9]|1[0-9]) icon=;; + [2-3][0-9]) icon=;; + [4-5][0-9]) icon=;; + [6-7][0-9]) icon=;; + [8-9][0-9]) icon=;; 100) icon=;; - *) icon=;; esac else if [[ "$PERCENTAGE" -lt ${toString low_threshold} ]]; then