mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 19:49:45 +01:00
rofi: fix theme definition in configuration for 1.7.0+ (#2513)
Since Rofi 1.7.1 (specifically davatorium/rofi@0e70d8a), the deprecated `theme` option in the `configuration` section no longer works. For 1.7.0 and up, `@theme "name"` is supposed to be used *after* the `configuration` block.
This commit is contained in:
parent
a28cf79a78
commit
3ec7f6fb43
3 changed files with 6 additions and 6 deletions
|
@ -35,10 +35,10 @@ let
|
||||||
${configStr}}
|
${configStr}}
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
mkKeyValue {
|
(mkKeyValue {
|
||||||
sep = " ";
|
sep = " ";
|
||||||
end = "";
|
end = "";
|
||||||
} name value;
|
} name value) + "\n";
|
||||||
|
|
||||||
toRasi = attrs: concatStringsSep "\n" (mapAttrsToList mkRasiSection attrs);
|
toRasi = attrs: concatStringsSep "\n" (mapAttrsToList mkRasiSection attrs);
|
||||||
|
|
||||||
|
@ -266,9 +266,9 @@ in {
|
||||||
location = (getAttr cfg.location locationsMap);
|
location = (getAttr cfg.location locationsMap);
|
||||||
xoffset = cfg.xoffset;
|
xoffset = cfg.xoffset;
|
||||||
yoffset = cfg.yoffset;
|
yoffset = cfg.yoffset;
|
||||||
theme = themeName;
|
|
||||||
} // cfg.extraConfig);
|
} // cfg.extraConfig);
|
||||||
};
|
# @theme must go after configuration but attrs are output in alphabetical order ('@' first)
|
||||||
|
} + (optionalString (themeName != null) (toRasi { "@theme" = themeName; }));
|
||||||
|
|
||||||
xdg.dataFile = mkIf (themePath != null) (if themePath == "custom" then {
|
xdg.dataFile = mkIf (themePath != null) (if themePath == "custom" then {
|
||||||
"rofi/themes/${themeName}.rasi".text = toRasi cfg.theme;
|
"rofi/themes/${themeName}.rasi".text = toRasi cfg.theme;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
configuration {
|
configuration {
|
||||||
location: 0;
|
location: 0;
|
||||||
theme: "custom";
|
|
||||||
xoffset: 0;
|
xoffset: 0;
|
||||||
yoffset: 0;
|
yoffset: 0;
|
||||||
}
|
}
|
||||||
|
@theme "custom"
|
||||||
|
|
Loading…
Reference in a new issue