From ec1456607f4db1f9263ba4103d48abe135d35ae1 Mon Sep 17 00:00:00 2001 From: ~noodlez1232 Date: Wed, 15 Nov 2023 00:08:48 -0800 Subject: [PATCH] Add bemenu extraOpts option Before, the bemenu options were just simply being overwritten. Now, the user can set their own config for it. --- modules/bemenu/hm.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/bemenu/hm.nix b/modules/bemenu/hm.nix index f69e74915..b5081644a 100644 --- a/modules/bemenu/hm.nix +++ b/modules/bemenu/hm.nix @@ -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}'" @@ -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); }; }