home: wm: screen-lock: remove 'cornerLock'
I never use it...
This commit is contained in:
parent
5381aa79de
commit
8233f8e3d9
2 changed files with 2 additions and 42 deletions
|
|
@ -77,20 +77,6 @@ in
|
||||||
description = "Locker command to run";
|
description = "Locker command to run";
|
||||||
};
|
};
|
||||||
|
|
||||||
cornerLock = {
|
|
||||||
enable = my.mkDisableOption ''
|
|
||||||
Move mouse to upper-left corner to lock instantly, lower-right corner to
|
|
||||||
disable auto-lock.
|
|
||||||
'';
|
|
||||||
|
|
||||||
delay = mkOption {
|
|
||||||
type = types.int;
|
|
||||||
default = 5;
|
|
||||||
example = 15;
|
|
||||||
description = "How many seconds before locking this way";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
notify = {
|
notify = {
|
||||||
enable = my.mkDisableOption "Notify when about to lock the screen";
|
enable = my.mkDisableOption "Notify when about to lock the screen";
|
||||||
|
|
||||||
|
|
@ -100,14 +86,12 @@ in
|
||||||
example = 15;
|
example = 15;
|
||||||
description = ''
|
description = ''
|
||||||
How many seconds in advance should there be a notification.
|
How many seconds in advance should there be a notification.
|
||||||
This value must be at lesser than or equal to `cornerLock.delay`
|
|
||||||
when both options are enabled.
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
timeout = mkOption {
|
timeout = mkOption {
|
||||||
type = types.ints.between 1 60;
|
type = types.int;
|
||||||
default = 15;
|
default = 15;
|
||||||
example = 1;
|
example = 1;
|
||||||
description = "Inactive time interval to lock the screen automatically";
|
description = "Inactive time interval to lock the screen automatically";
|
||||||
|
|
|
||||||
|
|
@ -12,22 +12,6 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
assertions = [
|
|
||||||
{
|
|
||||||
assertion =
|
|
||||||
let
|
|
||||||
inherit (cfg) cornerLock notify;
|
|
||||||
bothEnabled = cornerLock.enable && notify.enable;
|
|
||||||
cornerLockHigherThanNotify = cornerLock.delay >= notify.delay;
|
|
||||||
in
|
|
||||||
bothEnabled -> cornerLockHigherThanNotify;
|
|
||||||
message = ''
|
|
||||||
`config.my.home.wm.notify.delay` cannot have a value higher than
|
|
||||||
`config.my.home.wm.cornerLock.delay`.
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
services.screen-locker = {
|
services.screen-locker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
@ -36,15 +20,7 @@ in
|
||||||
lockCmd = cfg.command;
|
lockCmd = cfg.command;
|
||||||
|
|
||||||
xautolock = {
|
xautolock = {
|
||||||
extraOptions = lib.optionals cfg.cornerLock.enable [
|
extraOptions = lib.optionals cfg.notify.enable [
|
||||||
# Mouse corners: instant lock on upper-left, never lock on lower-right
|
|
||||||
"-cornerdelay"
|
|
||||||
"${toString cfg.cornerLock.delay}"
|
|
||||||
"-cornerredelay"
|
|
||||||
"${toString cfg.cornerLock.delay}"
|
|
||||||
"-corners"
|
|
||||||
"+00-"
|
|
||||||
] ++ lib.optionals cfg.notify.enable [
|
|
||||||
"-notify"
|
"-notify"
|
||||||
"${toString cfg.notify.delay}"
|
"${toString cfg.notify.delay}"
|
||||||
"-notifier"
|
"-notifier"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue