home: wm: screen-lock: add xautolock options

This commit is contained in:
Bruno BELANYI 2021-04-06 17:54:26 +00:00
parent 9f6c614c9f
commit cdc29efafc
2 changed files with 23 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.wm.screen-lock;
in
@ -10,6 +10,21 @@ in
inactiveInterval = cfg.timeout;
lockCmd = cfg.command;
xautolockExtraOptions = lib.optionals cfg.cornerLock [
# Mouse corners: instant lock on upper-left, never lock on lower-right
"-cornerdelay"
"5"
"-cornerredelay"
"5"
"-corners"
"+00-"
] ++ lib.optionals cfg.notify [
"-notify"
"5"
"-notifier"
''"${pkgs.libnotify}/bin/notify-send -u critical -t 5000 -- 'Locking in 5 seconds'"''
];
};
};
}