From d7d8102393b2477bb3b93c8cf3862eb55736f722 Mon Sep 17 00:00:00 2001 From: Malte Tammena Date: Wed, 19 Apr 2023 01:21:24 +0200 Subject: [PATCH] fix(bemenu-configured): Make buildable without special overlays --- pkgs/bemenu-configured.nix | 58 ++++++++++++++++++++++---------------- users/malte/hypr.nix | 2 +- users/malte/pass.nix | 2 +- 3 files changed, 35 insertions(+), 27 deletions(-) diff --git a/pkgs/bemenu-configured.nix b/pkgs/bemenu-configured.nix index cf15751..8604447 100644 --- a/pkgs/bemenu-configured.nix +++ b/pkgs/bemenu-configured.nix @@ -1,28 +1,36 @@ { - pkgs, - config, + writeShellApplication, + bemenu, + hack-font, + hackNerdLigatures ? hack-font, + # Color config + color ? { + base00 = "000000"; + base05 = "ff0000"; + base08 = "00ff00"; + base0D = "0000ff"; + }, + # Command name, cmd ? "bemenu-run", ... -}: let - colDark = config.colorsDark.colors; -in - pkgs.writeShellApplication { - name = "bemenu-run-configured"; - runtimeInputs = [ - pkgs.bemenu - pkgs.hackNerdLigatures - ]; - text = '' - exec ${cmd} -inl80 \ - --fn 'Hack NF FC Ligatured 11' \ - --tb=#${colDark.base08} \ - --tf=#${colDark.base00} \ - --fb=#${colDark.base00} \ - --ff=#${colDark.base05} \ - --nb=#${colDark.base00} \ - --nf=#${colDark.base05} \ - --hb=#${colDark.base0D} \ - --hf=#${colDark.base00} \ - "$@" - ''; - } +}: +writeShellApplication { + name = "bemenu-run-configured"; + runtimeInputs = [ + bemenu + hackNerdLigatures + ]; + text = '' + exec ${cmd} -inl80 \ + --fn 'Hack NF FC Ligatured 11' \ + --tb=#${color.base08} \ + --tf=#${color.base00} \ + --fb=#${color.base00} \ + --ff=#${color.base05} \ + --nb=#${color.base00} \ + --nf=#${color.base05} \ + --hb=#${color.base0D} \ + --hf=#${color.base00} \ + "$@" + ''; +} diff --git a/users/malte/hypr.nix b/users/malte/hypr.nix index 93328bb..6c69d35 100644 --- a/users/malte/hypr.nix +++ b/users/malte/hypr.nix @@ -7,7 +7,7 @@ }: let cfg = config.settings.hyprland; - bemenu = pkgs.callPackage ../../pkgs/bemenu-configured.nix {inherit config;}; + bemenu = pkgs.callPackage ../../pkgs/bemenu-configured.nix {color = config.colorsDark.colors;}; doNotDisturb = pkgs.callPackage ../../pkgs/do-not-disturb.nix {}; hyprpaperConfig = '' diff --git a/users/malte/pass.nix b/users/malte/pass.nix index a526b2c..a6a5575 100644 --- a/users/malte/pass.nix +++ b/users/malte/pass.nix @@ -4,7 +4,7 @@ ... }: let bemenuConfigured = pkgs.callPackage ../../pkgs/bemenu-configured.nix { - inherit config; + color = config.colorsDark.colors; cmd = "bemenu"; };