mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-28 21:21:02 +01:00
i3/sway: allow empty criterias using a value of 'true' (#2277)
Co-authored-by: Sumner Evans <me@sumnerevans.com>
This commit is contained in:
parent
4367119ca3
commit
c5b3069145
2 changed files with 20 additions and 7 deletions
|
|
@ -4,9 +4,13 @@ with lib;
|
|||
|
||||
rec {
|
||||
criteriaStr = criteria:
|
||||
"[${
|
||||
concatStringsSep " " (mapAttrsToList (k: v: ''${k}="${v}"'') criteria)
|
||||
}]";
|
||||
let
|
||||
toCriteria = k: v:
|
||||
if builtins.isBool v then
|
||||
(if v then "${k}" else "")
|
||||
else
|
||||
''${k}="${v}"'';
|
||||
in "[${concatStringsSep " " (mapAttrsToList toCriteria criteria)}]";
|
||||
|
||||
keybindingDefaultWorkspace = filterAttrs (n: v:
|
||||
cfg.config.defaultWorkspace != null && v == cfg.config.defaultWorkspace)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue