Configure swayidle for hyprland

This commit is contained in:
Erwin Boskma 2022-11-30 19:24:01 +01:00
parent 0c88aa8667
commit 5f49b35662
Signed by: erwin
SSH key fingerprint: SHA256:CyeNoWXd3kjX2Nwu6pDxxdS7OqmPVOy0NavA/KU/ntU

View file

@ -106,7 +106,7 @@ in
bind = $mod_SHIFT,Minus,movetoworkspacesilent,special
bind = $mod,Minus,togglespecialworkspace
bind = $mod_SHIFT,C,exec,hyprctl reload
bind = $mod_SHIFT,C,exec,${config.wayland.windowManager.hyprland.package}/bin/hyprctl reload
bind = $mod_SHIFT,F,exec,${powerMenu}
bind = $mod,L,exec,${swaylockcmd}
@ -143,5 +143,21 @@ in
'' +
(lib.optionalString config.eboskma.programs.emacs.enable "bind = $mod,C,exec,${config.eboskma.programs.emacs.package}/bin/emacsclient -c");
};
systemd.user.services.hypridle = {
Unit = {
Description = "Idle manager for Wayland (Hyprland)";
Documentation = "man:swayidle(1)";
PartOf = "graphical-session.target";
};
Service = {
ExecStart = "${pkgs.swayidle}/bin/swayidle -w timeout 900 '${swaylockcmd}' timeout 1200 '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms off' resume '${config.wayland.windowManager.hyprland.package}/bin/hyprctl dispatch dpms on'";
};
Install = {
WantedBy = [ "hyprland-session.target" ];
};
};
};
}