fix(noctalia): suspend laptops only on battery
Require UPower to confirm battery operation before the idle timeout locks and suspends the laptop.
This commit is contained in:
@@ -77,6 +77,11 @@ type = "alex/system-status:battery-rate"
|
||||
[widget.gpu-mode]
|
||||
type = "alex/system-status:gpu-mode"
|
||||
|
||||
# Only suspend-then-hibernate after 30 minutes when UPower confirms battery power.
|
||||
# The command fails closed on AC or when UPower is unavailable.
|
||||
[idle.behavior.suspend-then-hibernate]
|
||||
command = "busctl get-property org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower OnBattery 2>/dev/null | grep -qx 'b true' && loginctl lock-session && systemctl suspend-then-hibernate"
|
||||
|
||||
[control_center]
|
||||
sidebar = "full"
|
||||
sidebar_section = "full"
|
||||
|
||||
Reference in New Issue
Block a user