diff options
Diffstat (limited to 'config/herbstluftwm/notify.sh')
| -rwxr-xr-x | config/herbstluftwm/notify.sh | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/config/herbstluftwm/notify.sh b/config/herbstluftwm/notify.sh deleted file mode 100755 index 40c5330..0000000 --- a/config/herbstluftwm/notify.sh +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | while true; do | ||
| 4 | |||
| 5 | bat_lvl=$(cat /sys/class/power_supply/BAT1/capacity) | ||
| 6 | bat_stat=$(cat /sys/class/power_supply/BAT1/status) | ||
| 7 | |||
| 8 | if [[ $bat_lvl -le 5 && $bat_stat == "Discharging" ]]; then | ||
| 9 | $1 -m "Battery level critical: $bat_lvl%%" -u "high" | ||
| 10 | elif [[ $bat_lvl -eq 10 && $bat_stat == "Discharging" ]]; then | ||
| 11 | $1 -m "Battery level low: $bat_lvl%%" | ||
| 12 | elif [[ $bat_lvl -eq 50 && $bat_stat == "Discharging" ]]; then | ||
| 13 | $1 -m "Battery level at $bat_lvl%%" | ||
| 14 | elif [[ $bat_lvl -eq 100 && $bat_stat == "Charging" ]]; then | ||
| 15 | $1 -m "Battery fully charged" | ||
| 16 | fi | ||
| 17 | |||
| 18 | sleep 60; | ||
| 19 | done | ||
