patch dmenu, no shadow

This commit is contained in:
♥ Minnie ♥ 2025-05-18 21:50:15 +08:00
parent 4091fd9db7
commit 8437dbc212
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
4 changed files with 64 additions and 3 deletions

View file

@ -2,6 +2,9 @@
services.picom = { services.picom = {
enable = true; enable = true;
shadow = true; shadow = true;
shadowExclude = [
"class_g = 'dmenu'"
];
backend = "xrender"; backend = "xrender";
}; };
} }

View file

@ -7,9 +7,12 @@
# You can change versions, add patches, set compilation flags, anything really. # You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays # https://nixos.wiki/wiki/Overlays
modifications = final: prev: { 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 # When applied, the unstable nixpkgs set (declared in the flake inputs) will

View file

@ -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

View file

@ -0,0 +1,28 @@
From 9ae8ea55988973aa19f1e069ee24ba7af5a669e0 Mon Sep 17 00:00:00 2001
From: Miles Glapa-Grossklag <m.glapa.grossklag@gmail.com>
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