refactor(registry): use xor for focus targets
This commit is contained in:
@@ -12,13 +12,9 @@
|
|||||||
entry:
|
entry:
|
||||||
let
|
let
|
||||||
action = entry.value.action;
|
action = entry.value.action;
|
||||||
focusTargets = lib.filter (target: target != null) [
|
|
||||||
action.direction
|
|
||||||
action.workspace
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
(action.kind == "exec" && action.command != null)
|
(action.kind == "exec" && action.command != null)
|
||||||
|| (action.kind == "focus" && builtins.length focusTargets == 1)
|
|| (action.kind == "focus" && lib.xor (action.direction != null) (action.workspace != null))
|
||||||
) entries;
|
) entries;
|
||||||
message = "Desktop keybind actions must set the fields their kind requires.";
|
message = "Desktop keybind actions must set the fields their kind requires.";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user