diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-07-03 00:05:47 +0200 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-07-03 00:05:47 +0200 |
commit | 150e174f3293490c44e4bd96f79a05ae451c90c6 (patch) | |
tree | f67052d62b2437e4bfe602578fbdcf9e4c54b705 | |
parent | Formatting (diff) | |
download | dwm-150e174f3293490c44e4bd96f79a05ae451c90c6.tar.gz dwm-150e174f3293490c44e4bd96f79a05ae451c90c6.tar.bz2 dwm-150e174f3293490c44e4bd96f79a05ae451c90c6.zip |
Improved battery icon logic
-rwxr-xr-x | scripts/dwm-status | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/dwm-status b/scripts/dwm-status index 0cf2498..b1671fa 100755 --- a/scripts/dwm-status +++ b/scripts/dwm-status @@ -169,8 +169,16 @@ status() { \ 8[0-9]|7[0-9]) echo " $(cat $x)%" ;; 6[0-9]|5[0-9]) echo " $(cat $x)%" ;; 4[0-9]|3[0-9]) echo " $(cat $x)%" ;; - 2[0-9]|1[0-9]) echo " $(cat $x)%" ;; - [0-9]) echo " $(cat $x)%" ;; + 2[0-9]|1[0-9]) if [ "$ac_adapter" == "on" ]; then + echo " $(cat $x)%" + else + echo " $(cat $x)%" + fi ;; + [0-9]) if [ "$ac_adapter" == "on" ]; then + echo " $(cat $x)%" + else + echo " $(cat $x)%" + fi ;; esac done && echo "$delim" |