diff --git a/home-manager/sajenim/features/desktop/picom/default.nix b/home-manager/sajenim/features/desktop/picom/default.nix index 17176e5..18c4c36 100644 --- a/home-manager/sajenim/features/desktop/picom/default.nix +++ b/home-manager/sajenim/features/desktop/picom/default.nix @@ -2,6 +2,9 @@ services.picom = { enable = true; shadow = true; + shadowExclude = [ + "class_g = 'dmenu'" + ]; backend = "xrender"; }; } diff --git a/overlays/default.nix b/overlays/default.nix index 7bfcb4c..fce11f2 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -7,9 +7,12 @@ # You can change versions, add patches, set compilation flags, anything really. # https://nixos.wiki/wiki/Overlays modifications = final: prev: { - # example = prev.example.overrideAttrs (oldAttrs: rec { - # ... - # }); + dmenu = prev.dmenu.overrideAttrs (oldAttrs: { + patches = [ + ./patches/dmenu-bar-height-5.2.diff + ./patches/dmenu-gruvbox-20210329-9ae8ea5.diff + ]; + }); }; # When applied, the unstable nixpkgs set (declared in the flake inputs) will diff --git a/overlays/patches/dmenu-bar-height-5.2.diff b/overlays/patches/dmenu-bar-height-5.2.diff new file mode 100644 index 0000000..60e9a66 --- /dev/null +++ b/overlays/patches/dmenu-bar-height-5.2.diff @@ -0,0 +1,27 @@ +diff --git a/config.def.h b/config.def.h +index 1edb647..5c79628 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -3,6 +3,8 @@ + + static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ + /* -fn option overrides fonts[0]; default X11 font or font set */ ++static const int user_bh = 7; /* add an defined amount of pixels to the bar height */ ++ + static const char *fonts[] = { + "monospace:size=10" + }; +diff --git a/dmenu.c b/dmenu.c +index 27b7a30..7be0dc3 100644 +--- a/dmenu.c ++++ b/dmenu.c +@@ -629,7 +629,8 @@ setup(void) + utf8 = XInternAtom(dpy, "UTF8_STRING", False); + + /* calculate menu geometry */ +- bh = drw->fonts->h + 2; ++ bh = drw->fonts->h; ++ bh = user_bh ? bh + user_bh : bh + 2; + lines = MAX(lines, 0); + mh = (lines + 1) * bh; + #ifdef XINERAMA diff --git a/overlays/patches/dmenu-gruvbox-20210329-9ae8ea5.diff b/overlays/patches/dmenu-gruvbox-20210329-9ae8ea5.diff new file mode 100644 index 0000000..a004187 --- /dev/null +++ b/overlays/patches/dmenu-gruvbox-20210329-9ae8ea5.diff @@ -0,0 +1,28 @@ +From 9ae8ea55988973aa19f1e069ee24ba7af5a669e0 Mon Sep 17 00:00:00 2001 +From: Miles Glapa-Grossklag +Date: Mon, 29 Mar 2021 18:57:52 -0700 +Subject: [PATCH] Add gruvbox dark colorscheme + +--- + config.def.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config.def.h b/config.def.h +index 1edb647..36105e5 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -9,9 +9,9 @@ static const char *fonts[] = { + static const char *prompt = NULL; /* -p option; prompt to the left of input field */ + static const char *colors[SchemeLast][2] = { + /* fg bg */ +- [SchemeNorm] = { "#bbbbbb", "#222222" }, +- [SchemeSel] = { "#eeeeee", "#005577" }, +- [SchemeOut] = { "#000000", "#00ffff" }, ++ [SchemeNorm] = { "#a89984", "#282828" }, ++ [SchemeSel] = { "#32302f", "#a9b665" }, ++ [SchemeOut] = { "#a89984", "#89b482" }, + }; + /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ + static unsigned int lines = 0; +-- +2.25.1