All Sway config is now a module

This commit is contained in:
Yorick Barbanneau 2023-12-26 02:48:49 +01:00
parent 559a477e05
commit 8c62cc41d1
22 changed files with 685 additions and 662 deletions

View 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";
}
];
};
};
}