feat(swayidle): set up idle behaviour
This commit is contained in:
parent
aa22664231
commit
eeac4793c2
20
home/swayidle/home.nix
Normal file
20
home/swayidle/home.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs
|
||||||
|
, lib
|
||||||
|
, config
|
||||||
|
, ... }: with lib; mkIf config.passthrough.gui {
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
systemdTarget = "sway-session.target";
|
||||||
|
timeouts = [
|
||||||
|
{ timeout = 600; command = "swaymsg 'output * dpms off'"; resumeCommand = "swaymsg 'output * dpms on'"; }
|
||||||
|
];
|
||||||
|
events = [
|
||||||
|
{ event = "before-sleep"; command = "${pkgs.swaylock-effects}/bin/swaylock -f --grace 0"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# fullscreen as simple idle inhibitor shortcut
|
||||||
|
wayland.windowManager.sway.config.window.commands = [
|
||||||
|
{ criteria.shell = ".*"; command = "inhibit_idle fullscreen"; }
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in a new issue