diff --git a/profiles/desktop/battery-low-timer.nix b/profiles/desktop/battery-low-timer.nix index c4110280..d3fc1eec 100644 --- a/profiles/desktop/battery-low-timer.nix +++ b/profiles/desktop/battery-low-timer.nix @@ -9,15 +9,15 @@ startAt = "*08:00:00"; script = '' #!/usr/bin/env bash - if [ `acpi -b | grep "Battery 2" | awk ' { print ($3)}'` == "Discharging," ] ; then + if [ `acpi -b | grep "Battery 0" | awk ' { print ($3)}'` == "Discharging," ] ; then # Discharging # Monitor for low battery - if [ `acpi -b | grep "Battery 2" | awk ' { print ($4)-0}'` -le "15" ] ; then - notify-send "Battery Low"; + if [ `acpi -b | grep "Battery 0" | awk ' { print ($4)-0}'` -le "15" ] ; then + notify-send -u critical "Battery Low"; fi else # Charging - if [ `acpi -b | grep "Battery 2" | awk ' { print ($4)-0}'` -ge "98" ] ; then + if [ `acpi -b | grep "Battery 0" | awk ' { print ($4)-0}'` -ge "94" ] ; then # Fully charged notify-send "Battery Full" fi