diff options
| author | Craig Jennings <c@cjennings.net> | 2025-05-26 08:53:04 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-05-26 08:53:04 -0500 |
| commit | 3c34ae68d9d28750c2a3137e5439f7142c652256 (patch) | |
| tree | becc16735080cf68170c90ca21131848a637f39e /dotfiles/system | |
| parent | ed1dea68e059ed3df15c9d32b6de38813eb5407b (diff) | |
highlighting critical messages
Diffstat (limited to 'dotfiles/system')
| -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 |
