mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-14 21:29:12 +02:00
wip: migrate client modules
This commit is contained in:
parent
f6d2ff1544
commit
7ce27d5d2f
245 changed files with 20254 additions and 188 deletions
37
modules-clone/home/common/swayidle.nix
Normal file
37
modules-clone/home/common/swayidle.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
moduleName = "swayidle";
|
||||
in
|
||||
{
|
||||
options.swarselmodules.${moduleName} = lib.mkEnableOption "enable ${moduleName} and settings";
|
||||
config = lib.mkIf config.swarselmodules.${moduleName} {
|
||||
services.${moduleName} =
|
||||
let
|
||||
brightnessctl = "${lib.getExe pkgs.brightnessctl}";
|
||||
swaylock = "${lib.getExe pkgs.swaylock-effects}";
|
||||
suspend = "${pkgs.systemd}/bin/systemctl suspend";
|
||||
noctalia = "/etc/profiles/per-user/${config.swarselsystems.mainUser}/bin/noctalia-shell ipc call";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
# systemdTarget = "sway-session.target";
|
||||
extraArgs = [ "-w" ];
|
||||
timeouts = [
|
||||
{ timeout = 60; command = "${brightnessctl} -s; ${brightnessctl} set 80%-"; resumeCommand = "${brightnessctl} -r"; }
|
||||
# { timeout = 300; command = "${lib.getExe pkgs.swaylock-effects} -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2"; }
|
||||
# { timeout = 300; command = "${swaylock} -f"; }
|
||||
{ timeout = 300; command = "${noctalia} lockScreen lock || ${swaylock} -f"; }
|
||||
# { timeout = 600; command = ''${pkgs.sway}/bin/swaymsg "output * dpms off"; resumeCommand = "${pkgs.sway}/bin/swaymsg output * dpms on''; }
|
||||
# { timeout = 600; command = "${noctalia} sessionMenu lockAndSuspend || ${suspend}"; }
|
||||
{ timeout = 600; command = "${suspend}"; }
|
||||
];
|
||||
events = {
|
||||
# { event = "before-sleep"; command = "${noctalia} lockScreen lock || ${lib.getExe pkgs.swaylock-effects} -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2"; }
|
||||
# { event = "after-resume"; command = "${swaylock} -f "; }
|
||||
before-sleep = "${noctalia} lockScreen lock || ${swaylock} -f ";
|
||||
# lock = "${swaylock} -f ";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue