diff options
| author | czjstmax <jstmaxlol@disroot.org> | 2026-05-13 14:26:40 +0200 |
|---|---|---|
| committer | czjstmax <jstmaxlol@disroot.org> | 2026-05-13 14:26:40 +0200 |
| commit | 73c5a2c25ad314f8db837bb260946cde13040488 (patch) | |
| tree | 9f1b3d4b729e22769b3ed6eb3cc350b318cf8cba /cfg/i3 | |
| parent | 1bd736a0607e1d40cb6207852451707cbca39dbe (diff) | |
update custom i3bar script (better battery status)
Signed-off-by: czjstmax <jstmaxlol@disroot.org>
Diffstat (limited to 'cfg/i3')
| -rw-r--r-- | cfg/i3/kurobar.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cfg/i3/kurobar.sh b/cfg/i3/kurobar.sh index aadcab3..4a3e9be 100644 --- a/cfg/i3/kurobar.sh +++ b/cfg/i3/kurobar.sh @@ -10,18 +10,19 @@ while true; do else bat="N/A" fi - # --- battery charge status --- silly --- status=$(cat /sys/class/power_supply/BAT*/status) - if [[ "$status" == "Charging" && "$bat" -lt 70 ]]; then + if [[ "$status" == "Not charging" ]]; then + charge_status="it's inside me.. but it's too much~~!" + elif [[ "$status" == "Charging" ]]; then charge_status="++ing~!" - elif [[ "$status" == "Charging" && "$bat" -ge 70 ]]; then - charge_status="++ing but.. i'm full~~" elif [[ "$status" == "Discharging" && "$bat" -lt 40 ]]; then - charge_status="++ me~~!" - else + charge_status="++ me! low battery!" + elif [[ "$status" == "Discharging" ]]; then charge_status="--ing" + else + charge_status="unknown status -> $status.." fi |