diff --git a/.config/noctalia/90-machine.toml##class.arch_laptop b/.config/noctalia/90-machine.toml##class.arch_laptop index 522fc06..802a381 100644 --- a/.config/noctalia/90-machine.toml##class.arch_laptop +++ b/.config/noctalia/90-machine.toml##class.arch_laptop @@ -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"