All Sway config is now a module
This commit is contained in:
parent
559a477e05
commit
8c62cc41d1
22 changed files with 685 additions and 662 deletions
30
modules/home-manager/desktop/sway/includes/swayidle.nix
Normal file
30
modules/home-manager/desktop/sway/includes/swayidle.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
{
|
||||
config = mkIf config.modules.desktop.sway.enable {
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 300;
|
||||
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
command = ''${pkgs.sway}/bin/swaymsg "output * power off"'';
|
||||
resumeCommand = ''${pkgs.sway}/bin/swaymsg "output * power on"'';
|
||||
}
|
||||
];
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue