diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2020-03-27 13:01:23 -0400 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2020-03-27 13:01:23 -0400 |
| commit | 6283e390b38513c970093697294f7ba8b68830d6 (patch) | |
| tree | ef3871ede8f8e0c7b765c1e123e29e9142965c57 /.local | |
| parent | 39bde791426deefa31860d106a8b280e0292d287 (diff) | |
| download | eibhear-6283e390b38513c970093697294f7ba8b68830d6.tar.gz eibhear-6283e390b38513c970093697294f7ba8b68830d6.tar.zst eibhear-6283e390b38513c970093697294f7ba8b68830d6.zip | |
actually, let's do this a non-retarded way
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/statusbar/battery | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/.local/bin/statusbar/battery b/.local/bin/statusbar/battery index c05a351..69da3f5 100755 --- a/.local/bin/statusbar/battery +++ b/.local/bin/statusbar/battery @@ -19,8 +19,8 @@ do capacity=$(cat "$battery"/capacity) || exit status=$(cat "$battery"/status) - # If it is discharging and 20% or less, we will add a ❗ as a warning. - [ "$status" = "Discharging" ] && echo "$capacity" | grep -q "^[12][0-9]$" && warn="❗" + # If it is discharging and 25% or less, we will add a ❗ as a warning. + [ "$status" = "Discharging" ] && [ "$capacity" -le 25 ] && warn="❗" # Print the battery status (replaced by a cooresponding emoji with # sed), the percentage left and the warning if there is one. |
