X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=i3%2Fbar;h=30e24cea6e1de79e1edb606a1f0f554165578b15;hb=b78a9f27b37eca6b75ec1f2fc993c1e5b717609d;hp=5ae1bace5e707f12402d74c40394498e1aed6391;hpb=159915cd7d8d22af8f27c7bc735079c4347877b2;p=dotfiles.git diff --git a/i3/bar b/i3/bar index 5ae1bac..30e24ce 100755 --- a/i3/bar +++ b/i3/bar @@ -5,10 +5,10 @@ item(){ battery(){ path=/sys/class/power_supply - now=$(($(cat "$path/BAT0/charge_now")*100/$(cat "$path/BAT0/charge_full")))% + now=$(($(cat "$path/BAT0/charge_now")*100/$(cat "$path/BAT0/charge_full"))) [ "$(cat "$path/ADP1/online")" -eq "1" ] && charge="(C)" - [ "$now" = "100%" ] && now="FULL" - echo -n "$now$charge" + [ "$now" -ge "100" ] && now="FULL" + echo -n "$now%$charge" } volume(){