Add swayidle daemon
Move default swaylock-effects command into script "swaylockfx" to reuse for swayidle
This commit is contained in:
parent
dc8e3340bd
commit
1cccd418b5
|
@ -11,6 +11,7 @@
|
||||||
./avizo/default.nix
|
./avizo/default.nix
|
||||||
./rofi/default.nix
|
./rofi/default.nix
|
||||||
./swaylock/default.nix
|
./swaylock/default.nix
|
||||||
|
./swayidle/default.nix
|
||||||
./swaync/default.nix
|
./swaync/default.nix
|
||||||
./waybar/default.nix
|
./waybar/default.nix
|
||||||
./wlogout/default.nix
|
./wlogout/default.nix
|
||||||
|
@ -157,7 +158,7 @@
|
||||||
"XF86MonBrightnessDown" = "exec ${services.avizo.package}/bin/lightctl - 5";
|
"XF86MonBrightnessDown" = "exec ${services.avizo.package}/bin/lightctl - 5";
|
||||||
|
|
||||||
# System utilities
|
# 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}+p" = "exec ${programs.wlogout.package}/bin/wlogout";
|
||||||
"${modifier}+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
|
"${modifier}+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
|
||||||
"${modifier}+Shift+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw";
|
"${modifier}+Shift+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw";
|
||||||
|
|
12
programs/sway/swayidle/default.nix
Normal file
12
programs/sway/swayidle/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [../swaylock/default.nix];
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
timeouts = [
|
||||||
|
{
|
||||||
|
timeout = 60 * 15; # 15 minutes
|
||||||
|
command = "swaylockfx";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,6 +4,10 @@
|
||||||
accentColour ? "base07",
|
accentColour ? "base07",
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
(writeShellScriptBin "swaylockfx"
|
||||||
|
"${config.programs.swaylock.package}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse")
|
||||||
|
];
|
||||||
programs.swaylock = {
|
programs.swaylock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.swaylock-effects;
|
package = pkgs.swaylock-effects;
|
||||||
|
|
Reference in a new issue