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 34f7a5c8cd952a9bb52619a0c4cf1e26a50cd05b
parent 65ce17fc724d7aade4099667acd00d66bcb72fa8
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 19 Feb 2019 16:52:31 +0100

Hide power usage when charging

Diffstat:
Mlinks/.config/i3/i3scripts/i3battery | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/links/.config/i3/i3scripts/i3battery b/links/.config/i3/i3scripts/i3battery @@ -32,9 +32,12 @@ else warn="!" fi -[ "$status" = "Charging" ] && color="#FFF" +if [[ "$status" = "Charging" ]] || [[ "$powerdraw" = " 0W" ]]; then + color="#FFF" + powerdraw="" +fi printf "<span color='%s'>%s%s%s</span>%s" "$color" \ "$(echo "$status" | \ - sed -e "s/,//g;s/Discharging/BAT/;s/Charging/PWR/;s/Unknown//;s/Full//;s/ 0*/ /g;s/ :/ /g")" \ + sed -e "s/,//g;s/Discharging/BAT /;s/Charging/PWR /;s/Unknown//;s/Full//;s/ 0*/ /g;s/ :/ /g")" \ "$warn" "$(echo "$capacity" | sed -e 's/$/%/')" "$time$powerdraw"