home: wm: screen-lock: add corner delay setting
This commit is contained in:
parent
5973841ff5
commit
e5b5e73294
|
@ -47,11 +47,20 @@ in
|
||||||
description = "Locker command to run";
|
description = "Locker command to run";
|
||||||
};
|
};
|
||||||
|
|
||||||
cornerLock = my.mkDisableOption ''
|
cornerLock = {
|
||||||
|
enable = my.mkDisableOption ''
|
||||||
Move mouse to upper-left corner to lock instantly, lower-right corner to
|
Move mouse to upper-left corner to lock instantly, lower-right corner to
|
||||||
disable auto-lock.
|
disable auto-lock.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
delay = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 5;
|
||||||
|
example = 15;
|
||||||
|
description = "How many seconds before locking this way";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
notify = my.mkDisableOption "Notify when about to lock the screen";
|
notify = my.mkDisableOption "Notify when about to lock the screen";
|
||||||
|
|
||||||
timeout = mkOption {
|
timeout = mkOption {
|
||||||
|
|
|
@ -11,12 +11,12 @@ in
|
||||||
|
|
||||||
lockCmd = cfg.command;
|
lockCmd = cfg.command;
|
||||||
|
|
||||||
xautolockExtraOptions = lib.optionals cfg.cornerLock [
|
xautolockExtraOptions = lib.optionals cfg.cornerLock.enable [
|
||||||
# Mouse corners: instant lock on upper-left, never lock on lower-right
|
# Mouse corners: instant lock on upper-left, never lock on lower-right
|
||||||
"-cornerdelay"
|
"-cornerdelay"
|
||||||
"5"
|
"${toString cfg.cornerLock.delay}"
|
||||||
"-cornerredelay"
|
"-cornerredelay"
|
||||||
"5"
|
"${toString cfg.cornerLock.delay}"
|
||||||
"-corners"
|
"-corners"
|
||||||
"+00-"
|
"+00-"
|
||||||
] ++ lib.optionals cfg.notify [
|
] ++ lib.optionals cfg.notify [
|
||||||
|
|
Loading…
Reference in a new issue