diff options
| author | Andrew <saintruler@gmail.com> | 2021-06-16 20:05:29 +0400 |
|---|---|---|
| committer | Andrew <saintruler@gmail.com> | 2021-06-16 20:05:29 +0400 |
| commit | 331b5145d70da7d0e748330f5ae6b6e7af3e9866 (patch) | |
| tree | befe7581515ef20585e2ad5aa153cbb42cd4c7c6 /.local/bin | |
| parent | 03c38c671eb6e8960fde871f12f69aeea5079978 (diff) | |
Fixed dwm-battery script when there is no battery in computer
Diffstat (limited to '.local/bin')
| -rwxr-xr-x | .local/bin/dwmbar/dwm-battery | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/.local/bin/dwmbar/dwm-battery b/.local/bin/dwmbar/dwm-battery index c2e66a3..11ad5c3 100755 --- a/.local/bin/dwmbar/dwm-battery +++ b/.local/bin/dwmbar/dwm-battery @@ -1,4 +1,6 @@ #!/bin/sh + +[ -z "$(ls /sys/class/power_supply/)" ] && echo "none" && exit 0 for battery in /sys/class/power_supply/BAT? do capacity=$(cat "$battery"/capacity) || break |