diff options
| -rwxr-xr-x | dotfiles/system/.local/bin/battery_monitor | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dotfiles/system/.local/bin/battery_monitor b/dotfiles/system/.local/bin/battery_monitor index 7c6e013..dc8d5ea 100755 --- a/dotfiles/system/.local/bin/battery_monitor +++ b/dotfiles/system/.local/bin/battery_monitor @@ -27,7 +27,7 @@ while true; do # When below 10%, suspend within 10 seconds if not charging if [ "$battery_percentage" -lt 11 ] && ! acpi -a | grep -q "on-line" ; then # Send a notification of sleeping in 10 seconds - notify-send "Critical Battery" "Battery is at $battery_percentage%. System entering sleep in 30 seconds." + notify-send -u critical "Critical Battery" "Battery is at $battery_percentage%. System entering sleep in 30 seconds." # sleep for 10 seconds, then abort if charging sleep 30 @@ -36,7 +36,7 @@ while true; do if acpi -a | grep -q "on-line"; then notify-send "Charging" "The system is now charging. No action taken." else - notify-send "Critical Battery" "Putting the system to sleep." + notify-send -u critical "Critical Battery" "Putting the system to sleep." sudo systemctl suspend fi fi @@ -44,7 +44,7 @@ while true; do # When below 15%, warn user if [ "$battery_percentage" -lt 15 ] && ! acpi -a | grep -q "on-line" ; then # Send a notification using notify-send and dunst - notify-send "Low Battery" "Battery is at $battery_percentage%. System will automatically sleep at 10%." + notify-send -u critical "Low Battery" "Battery is at $battery_percentage%. System will automatically sleep at 10%." fi # Sleep for 5 minutes before checking again |
