rofi: allow extending themes (#2571)

Move @import and @theme directives to the top of custom theme
definitions so as to allow extending other themes.
This commit is contained in:
Naïm Favier 2022-01-09 23:15:24 +01:00 committed by GitHub
parent a90ddcd627
commit 05d655146b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -40,7 +40,12 @@ let
end = "";
} name value) + "\n";
toRasi = attrs: concatStringsSep "\n" (mapAttrsToList mkRasiSection attrs);
toRasi = attrs:
concatStringsSep "\n" (concatMap (mapAttrsToList mkRasiSection) [
(filterAttrs (n: _: n == "@theme") attrs)
(filterAttrs (n: _: n == "@import") attrs)
(removeAttrs attrs [ "@theme" "@import" ])
]);
locationsMap = {
center = 0;