diff options
| author | 2015-03-30 10:25:12 +0200 | |
|---|---|---|
| committer | 2015-03-30 10:25:12 +0200 | |
| commit | 8eee1c45bef74aa6094f463f9888ac653958b3dc (patch) | |
| tree | 0e2a066fd4da4afcf08f0bef348511b5c9ac48f7 /config/herbstluftwm/notify.sh | |
| parent | c7ebce541a9914d4e5a3b52e838e2ac66dd139a0 (diff) | |
| download | dotfiles-8eee1c45bef74aa6094f463f9888ac653958b3dc.tar.gz dotfiles-8eee1c45bef74aa6094f463f9888ac653958b3dc.tar.bz2 dotfiles-8eee1c45bef74aa6094f463f9888ac653958b3dc.zip | |
Moving back to stow for management
reasons: dotfiles.sh misbehaving on freebsd
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 | ||
