Skip to content

Commit

Permalink
refactor(modules/homeManager/programs/rofi): properly customize theme
Browse files Browse the repository at this point in the history
Addresses: danth/stylix#230
Closes: ef68137
  • Loading branch information
trueNAHO committed Jan 31, 2024
1 parent 9fdcef7 commit 2fe4fc6
Showing 1 changed file with 19 additions and 22 deletions.
41 changes: 19 additions & 22 deletions modules/homeManager/programs/rofi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,6 @@
cfg = config.modules.homeManager.programs.rofi;
in
lib.mkIf (cfg.enable || cfg.pass.enable) {
# TODO: Patch upstream to configure the theme with an option:
# https://github.com/danth/stylix/issues/176.
home.file."${config.programs.rofi.configPath}".text = let
largePadding = toString 10;
smallPadding = toString 5;
in ''
element {
padding: ${smallPadding}px;
spacing: ${smallPadding}px;
}
inputbar {
children: [ prompt, entry ];
padding: ${largePadding}px ${largePadding}px;
spacing: ${largePadding}px;
}
window {
width: 25%;
}
'';

modules.homeManager.programs.password-store.enable = true;

programs.rofi = {
Expand All @@ -47,6 +25,25 @@
enable = cfg.pass.enable;
package = pkgs.rofi-pass-wayland;
};

theme = {
element = let
padding = "5px";
in {
inherit padding;
spacing = padding;
};

inputbar = let
padding = "10px";
in {
children = ["prompt" "entry"];
padding = "${padding} ${padding}";
spacing = padding;
};

window.width = "25%";
};
};
};
}

0 comments on commit 2fe4fc6

Please sign in to comment.