Skip to content

Commit

Permalink
Refactor tiling layout type (#354)
Browse files Browse the repository at this point in the history
- Move conversion to JSON to apply function of tiles
- Made options of tiling layout not optional
- Added example for `layout.id`
  • Loading branch information
HeitorAugustoLN authored Sep 7, 2024
1 parent 8868692 commit d909dcd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/kwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,12 @@ let
tilingLayoutType = types.submodule {
options = {
id = mkOption {
type = with types; nullOr str;
default = null;
type = types.str;
description = "The id of the layout.";
example = "cf5c25c2-4217-4193-add6-b5971cb543f2";
};
tiles = mkOption {
type = with types; nullOr (attrsOf anything);
default = null;
type = with types; attrsOf anything;
example = {
layoutDirection = "horizontal";
tiles = [
Expand All @@ -109,6 +108,7 @@ let
}
];
};
apply = builtins.toJSON;
};
};
};
Expand Down Expand Up @@ -678,7 +678,7 @@ in
"Tiling/${cfg.kwin.tiling.layout.id}" = {
tiles = {
escapeValue = false;
value = builtins.toJSON cfg.kwin.tiling.layout.tiles;
value = cfg.kwin.tiling.layout.tiles;
};
};
})
Expand Down

0 comments on commit d909dcd

Please sign in to comment.