From c3d19551ee4e4cc404c5cf9b39b626d6955540e3 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 24 Jul 2026 15:26:59 +0700 Subject: [PATCH] lowbat brightness adjust --- modules/hardware/misc/battery-power.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hardware/misc/battery-power.nix b/modules/hardware/misc/battery-power.nix index 8c529e1..1727fe4 100644 --- a/modules/hardware/misc/battery-power.nix +++ b/modules/hardware/misc/battery-power.nix @@ -19,7 +19,7 @@ echo "`date` battery status:$BAT_STA percentage:$BAT_PCT" export DISPLAY=:0 export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus - test $BAT_PCT -le 30 && test $BAT_PCT -gt 15 && test $BAT_STA = "Discharging" && ${pkgs.libnotify}/bin/notify-send "Low Battery" "Battery remaining: $BAT_PCT%." + test $BAT_PCT -le 30 && test $BAT_PCT -gt 15 && test $BAT_STA = "Discharging" && ${pkgs.libnotify}/bin/notify-send "Low Battery" "Battery remaining: $BAT_PCT%." && brightnessctl s 30% test $BAT_PCT -le 15 && test $BAT_STA = "Discharging" && ${pkgs.libnotify}/bin/notify-send -u critical "Low Battery" "Shutdown at 10%." ''} > /tmp/cron.batt.log 2>&1" ];