diff options
author | mhsn <mail@mhsn.net> | 2025-09-20 19:42:03 +0100 |
---|---|---|
committer | mhsn <mail@mhsn.net> | 2025-09-20 19:42:03 +0100 |
commit | 16608db91ff274b13d248ff43b3ca5cdba648f28 (patch) | |
tree | f55de9eed915086b6f5ca252fb9b9863d79f617a | |
parent | 7f454eb4bd5b1b6ce7ab75942d0ec304ae70adae (diff) | |
download | adelie-16608db91ff274b13d248ff43b3ca5cdba648f28.tar.gz adelie-16608db91ff274b13d248ff43b3ca5cdba648f28.zip |
add many dmenu patches
-rw-r--r-- | x11-misc/dmenu/dmenu-9999.ebuild | 4 | ||||
-rw-r--r-- | x11-misc/dmenu/files/01_center.diff | 121 | ||||
-rw-r--r-- | x11-misc/dmenu/files/02_noinputlines.diff | 158 | ||||
-rw-r--r-- | x11-misc/dmenu/files/03_border.diff | 37 | ||||
-rw-r--r-- | x11-misc/dmenu/files/04_vi-mode.diff | 302 | ||||
-rw-r--r-- | x11-misc/dmenu/files/51_theme.diff | 15 | ||||
-rw-r--r-- | x11-misc/dmenu/files/dmenu-5.2-gentoo.patch | 9 |
7 files changed, 634 insertions, 12 deletions
diff --git a/x11-misc/dmenu/dmenu-9999.ebuild b/x11-misc/dmenu/dmenu-9999.ebuild index b5e4ec7..66f0a63 100644 --- a/x11-misc/dmenu/dmenu-9999.ebuild +++ b/x11-misc/dmenu/dmenu-9999.ebuild @@ -25,6 +25,10 @@ DEPEND="${RDEPEND} BDEPEND="virtual/pkgconfig" PATCHES=( + $FILESDIR/01_center.diff + $FILESDIR/02_noinputlines.diff + $FILESDIR/03_border.diff + $FILESDIR/04_vi-mode.diff "${FILESDIR}"/${PN}-5.2-gentoo.patch "${FILESDIR}/51_theme.diff" ) diff --git a/x11-misc/dmenu/files/01_center.diff b/x11-misc/dmenu/files/01_center.diff new file mode 100644 index 0000000..10ab2e8 --- /dev/null +++ b/x11-misc/dmenu/files/01_center.diff @@ -0,0 +1,121 @@ +diff --git a/config.def.h b/config.def.h +index 1edb647789..be1b4cad2c 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -2,6 +2,9 @@ + /* Default settings; can be overriden by command line. */ + + static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ ++static int centered = 0; /* -c option; centers dmenu on screen */ ++static int min_width = 500; /* minimum width when centered */ ++static const float menu_height_ratio = 4.0f; /* This is the ratio used in the original calculation */ + /* -fn option overrides fonts[0]; default X11 font or font set */ + static const char *fonts[] = { + "monospace:size=10" +diff --git a/dmenu.1 b/dmenu.1 +index 323f93cf88..c036baa6d0 100644 +--- a/dmenu.1 ++++ b/dmenu.1 +@@ -40,6 +40,9 @@ + .B \-b + dmenu appears at the bottom of the screen. + .TP ++.B \-c ++dmenu appears centered on the screen. ++.TP + .B \-f + dmenu grabs the keyboard before reading stdin if not reading from a tty. This + is faster, but will lock up X until stdin reaches end\-of\-file. +diff --git a/dmenu.c b/dmenu.c +index fd49549caf..ceb52c70ca 100644 +--- a/dmenu.c ++++ b/dmenu.c +@@ -29,6 +29,7 @@ + + struct item { + char *text; ++ unsigned int width; + struct item *left, *right; + int out; + }; +@@ -95,6 +96,15 @@ + break; + } + ++static int ++max_textw(void) ++{ ++ int len = 0; ++ for (struct item *item = items; item && item->text; item++) ++ len = MAX(item->width, len); ++ return len; ++} ++ + static void + cleanup(void) + { +@@ -563,6 +573,7 @@ + line[len - 1] = '\0'; + if (!(items[i].text = strdup(line))) + die("strdup:"); ++ items[i].width = TEXTW(line); + + items[i].out = 0; + } +@@ -636,6 +647,7 @@ + bh = drw->fonts->h + 2; + lines = MAX(lines, 0); + mh = (lines + 1) * bh; ++ promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0; + #ifdef XINERAMA + i = 0; + if (parentwin == root && (info = XineramaQueryScreens(dpy, &n))) { +@@ -662,9 +674,16 @@ + if (INTERSECT(x, y, 1, 1, info[i]) != 0) + break; + +- x = info[i].x_org; +- y = info[i].y_org + (topbar ? 0 : info[i].height - mh); +- mw = info[i].width; ++ if (centered) { ++ mw = MIN(MAX(max_textw() + promptw, min_width), info[i].width); ++ x = info[i].x_org + ((info[i].width - mw) / 2); ++ y = info[i].y_org + ((info[i].height - mh) / menu_height_ratio); ++ } else { ++ x = info[i].x_org; ++ y = info[i].y_org + (topbar ? 0 : info[i].height - mh); ++ mw = info[i].width; ++ } ++ + XFree(info); + } else + #endif +@@ -672,9 +691,16 @@ + if (!XGetWindowAttributes(dpy, parentwin, &wa)) + die("could not get embedding window attributes: 0x%lx", + parentwin); +- x = 0; +- y = topbar ? 0 : wa.height - mh; +- mw = wa.width; ++ ++ if (centered) { ++ mw = MIN(MAX(max_textw() + promptw, min_width), wa.width); ++ x = (wa.width - mw) / 2; ++ y = (wa.height - mh) / 2; ++ } else { ++ x = 0; ++ y = topbar ? 0 : wa.height - mh; ++ mw = wa.width; ++ } + } + promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0; + inputw = mw / 3; /* input width: ~33% of monitor width */ +@@ -733,6 +759,8 @@ + topbar = 0; + else if (!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */ + fast = 1; ++ else if (!strcmp(argv[i], "-c")) /* centers dmenu on screen */ ++ centered = 1; + else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */ + fstrncmp = strncasecmp; + fstrstr = cistrstr; diff --git a/x11-misc/dmenu/files/02_noinputlines.diff b/x11-misc/dmenu/files/02_noinputlines.diff new file mode 100644 index 0000000..f955439 --- /dev/null +++ b/x11-misc/dmenu/files/02_noinputlines.diff @@ -0,0 +1,158 @@ +diff --git a/config.def.h b/config.def.h +index be1b4cad2c..6b0a32704d 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -5,6 +5,7 @@ + static int centered = 0; /* -c option; centers dmenu on screen */ + static int min_width = 500; /* minimum width when centered */ + static const float menu_height_ratio = 4.0f; /* This is the ratio used in the original calculation */ ++static int draw_input = 1; /* -noi option; if 0, the input will not be drawn by default */ + /* -fn option overrides fonts[0]; default X11 font or font set */ + static const char *fonts[] = { + "monospace:size=10" +diff --git a/dmenu.c b/dmenu.c +index ceb52c70ca..bafda5af1f 100644 +--- a/dmenu.c ++++ b/dmenu.c +@@ -157,30 +157,32 @@ + { + unsigned int curpos; + struct item *item; +- int x = 0, y = 0, w; ++ int x = 0, y = 0, w = 0; + + drw_setscheme(drw, scheme[SchemeNorm]); + drw_rect(drw, 0, 0, mw, mh, 1, 1); + + if (prompt && *prompt) { + drw_setscheme(drw, scheme[SchemeSel]); +- x = drw_text(drw, x, 0, promptw, bh, lrpad / 2, prompt, 0); ++ x = drw_text(drw, x, 0, !draw_input ? mw : promptw, bh, lrpad / 2, prompt, 0); + } +- /* draw input field */ +- w = (lines > 0 || !matches) ? mw - x : inputw; +- drw_setscheme(drw, scheme[SchemeNorm]); +- drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0); + +- curpos = TEXTW(text) - TEXTW(&text[cursor]); +- if ((curpos += lrpad / 2 - 1) < w) { ++ if (draw_input) { ++ w = (lines > 0 || !matches) ? mw - x : inputw; + drw_setscheme(drw, scheme[SchemeNorm]); +- drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0); ++ drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0); ++ ++ curpos = TEXTW(text) - TEXTW(&text[cursor]); ++ if ((curpos += lrpad / 2 - 1) < w) { ++ drw_setscheme(drw, scheme[SchemeNorm]); ++ drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0); ++ } + } + + if (lines > 0) { + /* draw vertical list */ + for (item = curr; item != next; item = item->right) +- drawitem(item, x, y += bh, mw - x); ++ drawitem(item, (!draw_input && prompt && *prompt) ? x - mw : x - promptw, y += bh, mw); + } else if (matches) { + /* draw horizontal list */ + x += inputw; +@@ -188,8 +190,8 @@ + if (curr->left) { + drw_setscheme(drw, scheme[SchemeNorm]); + drw_text(drw, x, 0, w, bh, lrpad / 2, "<", 0); ++ x += w; + } +- x += w; + for (item = curr; item != next; item = item->right) + x = drawitem(item, x, 0, textw_clamp(item->text, mw - x - TEXTW(">"))); + if (next) { +@@ -368,16 +370,19 @@ + case XK_p: ksym = XK_Up; break; + + case XK_k: /* delete right */ +- text[cursor] = '\0'; +- match(); ++ if (draw_input) { ++ text[cursor] = '\0'; ++ match(); ++ } + break; + case XK_u: /* delete left */ +- insert(NULL, 0 - cursor); ++ if (draw_input) ++ insert(NULL, 0 - cursor); + break; + case XK_w: /* delete word */ +- while (cursor > 0 && strchr(worddelimiters, text[nextrune(-1)])) ++ while (cursor > 0 && strchr(worddelimiters, text[nextrune(-1)]) && draw_input) + insert(NULL, nextrune(-1) - cursor); +- while (cursor > 0 && !strchr(worddelimiters, text[nextrune(-1)])) ++ while (cursor > 0 && !strchr(worddelimiters, text[nextrune(-1)]) && draw_input) + insert(NULL, nextrune(-1) - cursor); + break; + case XK_y: /* paste selection */ +@@ -424,23 +429,23 @@ + switch(ksym) { + default: + insert: +- if (!iscntrl((unsigned char)*buf)) ++ if (!iscntrl((unsigned char)*buf) && draw_input) + insert(buf, len); + break; + case XK_Delete: + case XK_KP_Delete: +- if (text[cursor] == '\0') ++ if (text[cursor] == '\0' || !draw_input) + return; + cursor = nextrune(+1); + /* fallthrough */ + case XK_BackSpace: +- if (cursor == 0) ++ if (cursor == 0 || !draw_input) + return; + insert(NULL, nextrune(-1) - cursor); + break; + case XK_End: + case XK_KP_End: +- if (text[cursor] != '\0') { ++ if (text[cursor] != '\0' && draw_input) { + cursor = strlen(text); + break; + } +@@ -524,7 +529,7 @@ + } + break; + case XK_Tab: +- if (!sel) ++ if (!sel || !draw_input) + return; + cursor = strnlen(sel->text, sizeof text - 1); + memcpy(text, sel->text, cursor); +@@ -703,7 +708,7 @@ + } + } + promptw = (prompt && *prompt) ? TEXTW(prompt) - lrpad / 4 : 0; +- inputw = mw / 3; /* input width: ~33% of monitor width */ ++ inputw = !draw_input ? 0 : mw / 3; /* input width: ~33% of monitor width */ + match(); + + /* create menu window */ +@@ -740,7 +745,7 @@ + static void + usage(void) + { +- die("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n" ++ die("usage: dmenu [-bfiv] [-noi] [-l lines] [-p prompt] [-fn font] [-m monitor]\n" + " [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]"); + } + +@@ -761,6 +766,8 @@ + fast = 1; + else if (!strcmp(argv[i], "-c")) /* centers dmenu on screen */ + centered = 1; ++ else if (!strcmp(argv[i], "-noi")) /* no input field. intended to be used with a prompt */ ++ draw_input = 0; + else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */ + fstrncmp = strncasecmp; + fstrstr = cistrstr; diff --git a/x11-misc/dmenu/files/03_border.diff b/x11-misc/dmenu/files/03_border.diff new file mode 100644 index 0000000..fb988f1 --- /dev/null +++ b/x11-misc/dmenu/files/03_border.diff @@ -0,0 +1,37 @@ +diff --git a/config.def.h b/config.def.h +index 6b0a32704d..a7bf4863b3 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -25,3 +25,6 @@ + * for example: " /?\"&[]" + */ + static const char worddelimiters[] = " "; ++ ++/* Size of the window border */ ++static unsigned int border_width = 0; +diff --git a/dmenu.c b/dmenu.c +index bafda5af1f..9f9dfb6e27 100644 +--- a/dmenu.c ++++ b/dmenu.c +@@ -715,9 +715,11 @@ + swa.override_redirect = True; + swa.background_pixel = scheme[SchemeNorm][ColBg].pixel; + swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask; +- win = XCreateWindow(dpy, root, x, y, mw, mh, 0, ++ win = XCreateWindow(dpy, root, x, y, mw, mh, border_width, + CopyFromParent, CopyFromParent, CopyFromParent, + CWOverrideRedirect | CWBackPixel | CWEventMask, &swa); ++ if (border_width) ++ XSetWindowBorder(dpy, win, scheme[SchemeSel][ColBg].pixel); + XSetClassHint(dpy, win, &ch); + + /* input methods */ +@@ -792,6 +794,8 @@ + colors[SchemeSel][ColFg] = argv[++i]; + else if (!strcmp(argv[i], "-w")) /* embedding window id */ + embed = argv[++i]; ++ else if (!strcmp(argv[i], "-bw")) ++ border_width = atoi(argv[++i]); /* border width */ + else + usage(); + diff --git a/x11-misc/dmenu/files/04_vi-mode.diff b/x11-misc/dmenu/files/04_vi-mode.diff new file mode 100644 index 0000000..9fda39e --- /dev/null +++ b/x11-misc/dmenu/files/04_vi-mode.diff @@ -0,0 +1,302 @@ +diff --git a/config.def.h b/config.def.h +index a7bf4863b3..5ed8497550 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -16,6 +16,7 @@ + [SchemeNorm] = { "#bbbbbb", "#222222" }, + [SchemeSel] = { "#eeeeee", "#005577" }, + [SchemeOut] = { "#000000", "#00ffff" }, ++ [SchemeCursor] = { "#222222", "#bbbbbb"}, + }; + /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ + static unsigned int lines = 0; +@@ -25,6 +26,16 @@ + * for example: " /?\"&[]" + */ + static const char worddelimiters[] = " "; +- + /* Size of the window border */ + static unsigned int border_width = 0; ++/* ++ * -vi option; if nonzero, vi mode is always enabled and can be ++ * accessed with the global_esc keysym + mod mask ++ */ ++static unsigned int vi_mode = 1; ++static unsigned int start_mode = 1; /* mode to use when -vi is passed. 0 = insert mode, 1 = normal mode */ ++static Key global_esc = { XK_n, Mod1Mask }; /* escape key when vi mode is not enabled explicitly */ ++static Key quit_keys[] = { ++ /* keysym modifier */ ++ { XK_q, 0 } ++}; +diff --git a/dmenu.c b/dmenu.c +index 9f9dfb6e27..948f0b08df 100644 +--- a/dmenu.c ++++ b/dmenu.c +@@ -25,7 +25,7 @@ + #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) + + /* enums */ +-enum { SchemeNorm, SchemeSel, SchemeOut, SchemeLast }; /* color schemes */ ++enum { SchemeNorm, SchemeSel, SchemeOut, SchemeCursor, SchemeLast }; /* color schemes */ + + struct item { + char *text; +@@ -34,6 +34,11 @@ + int out; + }; + ++typedef struct { ++ KeySym ksym; ++ unsigned int state; ++} Key; ++ + static char text[BUFSIZ] = ""; + static char *embed; + static int bh, mw, mh; +@@ -44,6 +49,7 @@ + static struct item *matches, *matchend; + static struct item *prev, *curr, *next, *sel; + static int mon = -1, screen; ++static unsigned int using_vi_mode = 0; + + static Atom clip, utf8; + static Display *dpy; +@@ -173,7 +179,15 @@ + drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0); + + curpos = TEXTW(text) - TEXTW(&text[cursor]); +- if ((curpos += lrpad / 2 - 1) < w) { ++ curpos += lrpad / 2 - 1; ++ if (using_vi_mode && text[0] != '\0') { ++ drw_setscheme(drw, scheme[SchemeCursor]); ++ char vi_char[] = {text[cursor], '\0'}; ++ drw_text(drw, x + curpos, 0, TEXTW(vi_char) - lrpad, bh, 0, vi_char, 0); ++ } else if (using_vi_mode) { ++ drw_setscheme(drw, scheme[SchemeNorm]); ++ drw_rect(drw, x + curpos, 2, lrpad / 2, bh - 4, 1, 0); ++ } else if (curpos < w) { + drw_setscheme(drw, scheme[SchemeNorm]); + drw_rect(drw, x + curpos, 2, 2, bh - 4, 1, 0); + } +@@ -333,6 +347,181 @@ + } + + static void ++vi_keypress(KeySym ksym, const XKeyEvent *ev) ++{ ++ static const size_t quit_len = LENGTH(quit_keys); ++ if (ev->state & ControlMask) { ++ switch(ksym) { ++ /* movement */ ++ case XK_d: /* fallthrough */ ++ if (next) { ++ sel = curr = next; ++ calcoffsets(); ++ goto draw; ++ } else ++ ksym = XK_G; ++ break; ++ case XK_u: ++ if (prev) { ++ sel = curr = prev; ++ calcoffsets(); ++ goto draw; ++ } else ++ ksym = XK_g; ++ break; ++ case XK_p: /* fallthrough */ ++ case XK_P: break; ++ case XK_c: ++ cleanup(); ++ exit(1); ++ case XK_Return: /* fallthrough */ ++ case XK_KP_Enter: break; ++ default: return; ++ } ++ } ++ ++ switch(ksym) { ++ /* movement */ ++ case XK_0: ++ cursor = 0; ++ break; ++ case XK_dollar: ++ if (text[cursor + 1] != '\0') { ++ cursor = strlen(text) - 1; ++ break; ++ } ++ break; ++ case XK_b: ++ movewordedge(-1); ++ break; ++ case XK_e: ++ cursor = nextrune(+1); ++ movewordedge(+1); ++ if (text[cursor] == '\0') ++ --cursor; ++ else ++ cursor = nextrune(-1); ++ break; ++ case XK_g: ++ if (sel == matches) { ++ break; ++ } ++ sel = curr = matches; ++ calcoffsets(); ++ break; ++ case XK_G: ++ if (next) { ++ /* jump to end of list and position items in reverse */ ++ curr = matchend; ++ calcoffsets(); ++ curr = prev; ++ calcoffsets(); ++ while (next && (curr = curr->right)) ++ calcoffsets(); ++ } ++ sel = matchend; ++ break; ++ case XK_h: ++ if (cursor) ++ cursor = nextrune(-1); ++ break; ++ case XK_j: ++ if (sel && sel->right && (sel = sel->right) == next) { ++ curr = next; ++ calcoffsets(); ++ } ++ break; ++ case XK_k: ++ if (sel && sel->left && (sel = sel->left)->right == curr) { ++ curr = prev; ++ calcoffsets(); ++ } ++ break; ++ case XK_l: ++ if (text[cursor] != '\0' && text[cursor + 1] != '\0') ++ cursor = nextrune(+1); ++ else if (text[cursor] == '\0' && cursor) ++ --cursor; ++ break; ++ case XK_w: ++ movewordedge(+1); ++ if (text[cursor] != '\0' && text[cursor + 1] != '\0') ++ cursor = nextrune(+1); ++ else if (cursor) ++ --cursor; ++ break; ++ /* insertion */ ++ case XK_a: ++ cursor = nextrune(+1); ++ /* fallthrough */ ++ case XK_i: ++ using_vi_mode = 0; ++ break; ++ case XK_A: ++ if (text[cursor] != '\0') ++ cursor = strlen(text); ++ using_vi_mode = 0; ++ break; ++ case XK_I: ++ cursor = using_vi_mode = 0; ++ break; ++ case XK_p: ++ if (text[cursor] != '\0') ++ cursor = nextrune(+1); ++ XConvertSelection(dpy, (ev->state & ControlMask) ? clip : XA_PRIMARY, ++ utf8, utf8, win, CurrentTime); ++ return; ++ case XK_P: ++ XConvertSelection(dpy, (ev->state & ControlMask) ? clip : XA_PRIMARY, ++ utf8, utf8, win, CurrentTime); ++ return; ++ /* deletion */ ++ case XK_D: ++ text[cursor] = '\0'; ++ if (cursor) ++ cursor = nextrune(-1); ++ match(); ++ break; ++ case XK_x: ++ cursor = nextrune(+1); ++ insert(NULL, nextrune(-1) - cursor); ++ if (text[cursor] == '\0' && text[0] != '\0') ++ --cursor; ++ match(); ++ break; ++ /* misc. */ ++ case XK_Return: ++ case XK_KP_Enter: ++ puts((sel && !(ev->state & ShiftMask)) ? sel->text : text); ++ if (!(ev->state & ControlMask)) { ++ cleanup(); ++ exit(0); ++ } ++ if (sel) ++ sel->out = 1; ++ break; ++ case XK_Tab: ++ if (!sel) ++ return; ++ strncpy(text, sel->text, sizeof text - 1); ++ text[sizeof text - 1] = '\0'; ++ cursor = strlen(text) - 1; ++ match(); ++ break; ++ default: ++ for (size_t i = 0; i < quit_len; ++i) ++ if (quit_keys[i].ksym == ksym && ++ (quit_keys[i].state & ev->state) == quit_keys[i].state) { ++ cleanup(); ++ exit(1); ++ } ++ } ++ ++draw: ++ drawmenu(); ++} ++ ++static void + keypress(XKeyEvent *ev) + { + char buf[64]; +@@ -351,6 +540,18 @@ + break; + } + ++ if (using_vi_mode) { ++ vi_keypress(ksym, ev); ++ return; ++ } else if (vi_mode && ++ (ksym == global_esc.ksym && ++ (ev->state & global_esc.state) == global_esc.state)) { ++ using_vi_mode = 1; ++ if (cursor) ++ cursor = nextrune(-1); ++ goto draw; ++ } ++ + if (ev->state & ControlMask) { + switch(ksym) { + case XK_a: ksym = XK_Home; break; +@@ -557,6 +758,8 @@ + insert(p, (q = strchr(p, '\n')) ? q - p : (ssize_t)strlen(p)); + XFree(p); + } ++ if (using_vi_mode && text[cursor] == '\0') ++ --cursor; + drawmenu(); + } + +@@ -773,6 +976,11 @@ + else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */ + fstrncmp = strncasecmp; + fstrstr = cistrstr; ++ } else if (!strcmp(argv[i], "-vi")) { ++ vi_mode = 1; ++ using_vi_mode = start_mode; ++ global_esc.ksym = XK_Escape; ++ global_esc.state = 0; + } else if (i + 1 == argc) + usage(); + /* these options take one argument */ diff --git a/x11-misc/dmenu/files/51_theme.diff b/x11-misc/dmenu/files/51_theme.diff index de83860..28e5c23 100644 --- a/x11-misc/dmenu/files/51_theme.diff +++ b/x11-misc/dmenu/files/51_theme.diff @@ -1,9 +1,9 @@ -diff --git i/config.def.h w/config.def.h -index 1edb647..ee33692 100644 ---- i/config.def.h -+++ w/config.def.h -@@ -4,13 +4,13 @@ - static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ +diff --git a/config.def.h b/config.def.h +index 5ed8497550..35b3436117 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -8,15 +8,15 @@ + static int draw_input = 1; /* -noi option; if 0, the input will not be drawn by default */ /* -fn option overrides fonts[0]; default X11 font or font set */ static const char *fonts[] = { - "monospace:size=10" @@ -17,5 +17,8 @@ index 1edb647..ee33692 100644 + [SchemeNorm] = { "#c0b1c2", "#152126" }, + [SchemeSel] = { "#e1e1e6", "#db498b" }, [SchemeOut] = { "#000000", "#00ffff" }, +- [SchemeCursor] = { "#222222", "#bbbbbb"}, ++ [SchemeCursor] = { "#152126", "#c0b1c2" }, }; /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ + static unsigned int lines = 0; diff --git a/x11-misc/dmenu/files/dmenu-5.2-gentoo.patch b/x11-misc/dmenu/files/dmenu-5.2-gentoo.patch index 91ee6f3..2afbf57 100644 --- a/x11-misc/dmenu/files/dmenu-5.2-gentoo.patch +++ b/x11-misc/dmenu/files/dmenu-5.2-gentoo.patch @@ -1,11 +1,8 @@ -From 3c494e2289c93ab6262409f9498866bdfd57bcf4 Mon Sep 17 00:00:00 2001 -From: Georgy Yakovlev <gyakovlev@gentoo.org> -Date: Fri, 7 Oct 2022 11:29:04 -0700 -Subject: [PATCH] gentoo patch - +diff --git a/config.mk b/config.mk +index dcc5bb3dc3..7747771cb2 100644 --- a/config.mk +++ b/config.mk -@@ -20,13 +20,13 @@ FREETYPEINC = /usr/include/freetype2 +@@ -20,13 +20,13 @@ #MANPREFIX = ${PREFIX}/man # includes and libs |