fixup gtklock layout, fade to black before suspend

This commit is contained in:
Henry Hiles 2026-11-17 12:00:32 -05:00
commit 554fdffd6a
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -38,6 +38,11 @@ let
before_sleep_cmd = loginctl lock-session
}
'';
suspend = pkgs.writeShellScript "suspend" ''
${lib.getExe pkgs.niri} msg action power-off-monitors
exec ${config.systemd.package}/bin/systemctl suspend
'';
in
{
nixpkgs.overlays = [
@ -54,6 +59,8 @@ in
input {
touch { edge-swipe-size 24; }
// The power key is bound below instead.
disable-power-key-handling
}
layout {
@ -115,6 +122,7 @@ in
spawn-at-startup "${lib.getExe pkgs.hypridle}" "--config" "${hypridleConfig}"
binds {
XF86PowerOff allow-when-locked=true { spawn "${suspend}"; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "${swayosd-client}" "--output-volume" "raise"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "${swayosd-client}" "--output-volume" "lower"; }
}