diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2025-05-08 23:59:30 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2025-05-08 23:59:42 +0100 |
commit | 536e1b3a68e153ffd39f55d2f3346c354f168167 (patch) | |
tree | 430634089150035fa5293c9101cc6f5e1d320803 | |
parent | f3c219badc79abda03956e98e750dc726bb96c07 (diff) | |
download | dotfiles-536e1b3a68e153ffd39f55d2f3346c354f168167.tar.gz dotfiles-536e1b3a68e153ffd39f55d2f3346c354f168167.tar.bz2 dotfiles-536e1b3a68e153ffd39f55d2f3346c354f168167.zip |
Add hibernate to battery script at less than 5%
-rwxr-xr-x | Scripts/.local/scripts/status/battery | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Scripts/.local/scripts/status/battery b/Scripts/.local/scripts/status/battery index 133a153..5cd1480 100755 --- a/Scripts/.local/scripts/status/battery +++ b/Scripts/.local/scripts/status/battery @@ -22,8 +22,13 @@ else elif [[ $capacity -ge 10 ]] then status="" + elif [[ $capacity -gt 5 ]] + then + notify-send -u critical "Charge now! (will hibernate at 5%)" + status="" else - notify-send -u critical "Charge now!" + notify-send -u critical "Hibernating..." + systemctl hibernate status="" fi echo "$status $capacity% $time_left" |