Skip to content

Commit

Permalink
Add bemenu extraOpts option
Browse files Browse the repository at this point in the history
Before, the bemenu options were just simply being overwritten. Now, the
user can set their own config for it.
  • Loading branch information
Noodlez1232 committed Dec 5, 2023
1 parent 17a452c commit ec14566
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions modules/bemenu/hm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@ in {
type = lib.types.bool;
default = false;
};

extraOpts = lib.mkOption {
description = lib.mdDoc ''
Extra options that can be used with bemenu
'';
type = with lib.types; listOf str;
default = [ ];
};
};

config = lib.mkIf config.stylix.targets.bemenu.enable {
home.sessionVariables.BEMENU_OPTS = with config.stylix.targets.bemenu; builtins.concatStringsSep " " [
home.sessionVariables.BEMENU_OPTS = with config.stylix.targets.bemenu; builtins.concatStringsSep " " ([
# Inspired from https://git.sr.ht/~h4n1/base16-bemenu_opts
"--tb '${base01}${bemenuOpacity}'"
"--nb '${base01}${bemenuOpacity}'"
Expand All @@ -43,6 +51,6 @@ in {
"--ab '${if alternate then base00 else base01}'"
"--af '${if alternate then base04 else base05}'"
"--fn '${sansSerif.name} ${lib.optionalString (fontSize != null) (builtins.toString fontSize)}'"
];
] ++ extraOpts);
};
}

0 comments on commit ec14566

Please sign in to comment.