Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/programs/rofi.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ let
${configStr}}
''
else
mkKeyValue {
(mkKeyValue {
sep = " ";
end = "";
} name value;
} name value) + "\n";

toRasi = attrs: concatStringsSep "\n" (mapAttrsToList mkRasiSection attrs);

Expand Down Expand Up @@ -266,9 +266,9 @@ in {
location = (getAttr cfg.location locationsMap);
xoffset = cfg.xoffset;
yoffset = cfg.yoffset;
theme = themeName;
} // 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 {
"rofi/themes/${themeName}.rasi".text = toRasi cfg.theme;
Expand Down
2 changes: 1 addition & 1 deletion tests/modules/programs/rofi/custom-theme-config.rasi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
configuration {
location: 0;
theme: "custom";
xoffset: 0;
yoffset: 0;
}
@theme "custom"
2 changes: 1 addition & 1 deletion tests/modules/programs/rofi/custom-theme.rasi
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ foreground-color: rgba ( 250, 251, 252, 100 % );
width: 512;
}

@import "~/.cache/wal/colors-rofi-dark"
@import "~/.cache/wal/colors-rofi-dark"