Add swayidle daemon

Move default swaylock-effects command into script "swaylockfx" to
reuse for swayidle
This commit is contained in:
Evie Litherland-Smith 2024-05-20 09:28:00 +01:00
parent dc8e3340bd
commit 1cccd418b5
3 changed files with 18 additions and 1 deletions

View file

@ -11,6 +11,7 @@
./avizo/default.nix
./rofi/default.nix
./swaylock/default.nix
./swayidle/default.nix
./swaync/default.nix
./waybar/default.nix
./wlogout/default.nix
@ -157,7 +158,7 @@
"XF86MonBrightnessDown" = "exec ${services.avizo.package}/bin/lightctl - 5";
# System utilities
"${modifier}+F1" = "exec ${programs.swaylock.package}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse";
"${modifier}+F1" = "exec swaylockfx";
"${modifier}+p" = "exec ${programs.wlogout.package}/bin/wlogout";
"${modifier}+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
"${modifier}+Shift+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw";

View file

@ -0,0 +1,12 @@
{...}: {
imports = [../swaylock/default.nix];
services.swayidle = {
enable = true;
timeouts = [
{
timeout = 60 * 15; # 15 minutes
command = "swaylockfx";
}
];
};
}

View file

@ -4,6 +4,10 @@
accentColour ? "base07",
...
}: {
home.packages = with pkgs; [
(writeShellScriptBin "swaylockfx"
"${config.programs.swaylock.package}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse")
];
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;