desktop/wm: refactor locker

This commit is contained in:
Infinidoge 2024-03-06 19:35:17 -05:00
parent 6847b617a6
commit 4d7f565ba4
Signed by: Infinidoge
SSH key fingerprint: SHA256:oAMyvotlNFraMmZmr+p6AxnNfW/GioTs1pOn3V4tQ7A
3 changed files with 12 additions and 2 deletions

View file

@ -17,6 +17,10 @@ in
monitors = mkDefault 1;
};
common.wm = {
locker = pkgs.xsecurelock;
};
# Compositor to prevent screen tearing
services.picom = {
enable = true;
@ -24,6 +28,11 @@ in
vSync = true;
};
programs.xss-lock = {
enable = true;
lockerCommand = lib.getExe config.common.wm.locker;
};
# Automatically attach/detatch connected/disconnected monitors
services.autorandr = {
enable = config.info.graphical && !config.info.stationary;
@ -53,7 +62,7 @@ in
xprop
])
xsecurelock
config.common.wm.locker
blugon
];
}

View file

@ -39,6 +39,7 @@ with lib;
};
wallpaper_mode = "fill";
firefox = config.programs.firefox.package.meta.mainProgram;
locker = main.common.wm.locker.meta.mainProgram;
};
"blugon".source = ./blugon;

View file

@ -283,7 +283,7 @@ keys = [
# ),
Key(
[Keys.SUPER, Keys.CONTROL], "l",
lazy.spawn("xsecurelock"),
lazy.spawn("@locker@"),
desc="Lock Screen",
),