Skip to content

Commit

Permalink
sway: add swayidle
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNixon committed Mar 5, 2024
1 parent 1b14be3 commit 13b5b4b
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion modules/home-manager/desktop_environment/components/sway.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
modifier = config.wayland.windowManager.sway.config.modifier;
d_px = "100";
in {
"${modifier}+g" = "exec swaylock --color 002030";
"${modifier}+g" = "exec ${pkgs.swaylock}/bin/swaylock";
"${modifier}+shift+g" = "exit";

"${modifier}+shift+q" = "kill";
Expand Down Expand Up @@ -284,4 +284,27 @@
icons = "awesome4";
};
};

programs.swaylock = {
enable = true;
settings = {
color = "${config.scheme.withHashtag.base00}";
indicator-idle-visible = true;
};
};

services.swayidle = {
enable = true;
timeouts = [
{
timeout = 55;
command = "${pkgs.swaylock}/bin/swaylock -fF";
}
{
timeout = 60;
command = "${pkgs.sway}/bin/swaymsg \"output * dpms off\"";
resumeCommand = "${pkgs.sway}/bin/swaymsg \"output * dpms on\"";
}
];
};
}

0 comments on commit 13b5b4b

Please sign in to comment.