Wrap hyprlock

This commit is contained in:
SebastianStork 2024-05-10 15:42:28 +02:00
parent 08dae72f8d
commit e7fbcb4a49
5 changed files with 28 additions and 105 deletions

View file

@ -1,33 +1,19 @@
{
inputs,
config,
lib,
wrappers,
...
}: {
imports = [inputs.hyprlock.homeManagerModules.hyprlock];
options.myConfig.de.hypridlelock.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.de.hypridlelock.enable {
programs.hyprlock = {
enable = true;
backgrounds = [
{
path = "screenshot";
blur_passes = 1;
blur_size = 4;
}
];
};
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = let
hyprlockExe = "${lib.getExe config.programs.hyprlock.package}";
hyprlockExe = "${lib.getExe wrappers.hyprlock}";
in "pidof ${hyprlockExe} || ${hyprlockExe}";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";