commit e3ed6d8
hovercats
·
2025-01-13 10:02:37 +0000 UTC
parent dc9ec6c
dmenu: allow to select exacly what you write. very usefull in surf, where you wanna omit something from your current url, but you cant, because dmenu will automatically select w/e matches
7 files changed,
+61,
-13
1@@ -1,4 +1,5 @@
2 17ac5095774b227168a2236cd2ce6a7dcaa2258adce5aaebbb58825731a6223287
3-9ff7bed464c09fa747121bd53a0b9e2d172995a0ff343d27241405dccacde83137
4-a4b98d67e802e4ce5efd801d8744cfd1aa77832278b203f5792e09adc15fac497e
5-1abc1b4279dbfc4fc302e6f89a8410e3223a9a7762ed7f22aaccc36fc99d9bfa5d
6+9f1b26e6a8ecfd0dbb44db7adddcd280e26c169661340b2920946e0e991c59d6d6
7+26774e52b039d061b836cee0a6646e2d464fb06f8e92b302061640af8c061a06ad
8+373308df35abd142a944bcb360d417f57b5fe6cd6acca1b1c8433e141be8b87452
9+6e5ae9350f0d4fb647bf1a35164e095ce0e75769eeeb15d658d5319350a8f7098c
1@@ -1,7 +1,7 @@
2-From b32856b94eeafb320a7b6715663d1b3dd638a811 Mon Sep 17 00:00:00 2001
3+From 1e2704e190bf70321a8d5bbf179b3f86cca3a449 Mon Sep 17 00:00:00 2001
4 From: hovercats <hovercatswithlasereyes@protonmail.com>
5 Date: Wed, 29 Mar 2023 19:48:06 +0200
6-Subject: [PATCH 1/3] apply center patch
7+Subject: [PATCH] apply center patch
8
9 ---
10 README | 4 ++++
11@@ -130,5 +130,5 @@ index 40f93e0..b6cfd65 100644
12 fstrncmp = strncasecmp;
13 fstrstr = cistrstr;
14 --
15-2.44.0
16+2.45.1
17
1@@ -1,7 +1,7 @@
2-From c534a81cff5ebd7b97dcb9dd6b3f7920ebb08d9d Mon Sep 17 00:00:00 2001
3+From 274868fccc3d3b5bb043b2bb65b5b99b00738e94 Mon Sep 17 00:00:00 2001
4 From: hovercats <hovercatswithlasereyes@protonmail.com>
5 Date: Wed, 29 Mar 2023 20:18:05 +0200
6-Subject: [PATCH 2/3] add border patch
7+Subject: [PATCH] add border patch
8
9 ---
10 config.def.h | 3 +++
11@@ -46,5 +46,5 @@ index b6cfd65..1fae794 100644
12 usage();
13
14 --
15-2.44.0
16+2.45.1
17
1@@ -1,7 +1,7 @@
2-From 2a965a8e4faafaec25e49527f997b952d4cb4260 Mon Sep 17 00:00:00 2001
3+From c87bb56eb3a2b12044306f6a1d79dfc2affcd7b4 Mon Sep 17 00:00:00 2001
4 From: hovercats <hovercatswithlasereyes@protonmail.com>
5 Date: Sat, 1 Apr 2023 05:38:34 +0200
6-Subject: [PATCH 3/3] change colorscheme
7+Subject: [PATCH] change colorscheme
8
9 ---
10 config.def.h | 6 +++---
11@@ -25,5 +25,5 @@ index 5c87304..898948d 100644
12 /* -l option; if nonzero, dmenu uses vertical list with given number of lines */
13 static unsigned int lines = 0;
14 --
15-2.44.0
16+2.45.1
17
1@@ -0,0 +1,46 @@
2+From 627b14b0d91653fc4b5552424448cd0904ec4887 Mon Sep 17 00:00:00 2001
3+From: "Franc[e]sco" <lolisamurai@tfwno.gf>
4+Date: Fri, 12 Jun 2020 15:26:37 +0200
5+Subject: [PATCH] always allow selecting whatever was typed in unchanged
6+
7+---
8+ dmenu.c | 9 ++++++++-
9+ 2 files changed, 14 insertions(+), 1 deletion(-)
10+
11+diff --git a/dmenu.c b/dmenu.c
12+index 1fae794..56dda7a 100644
13+--- a/dmenu.c
14++++ b/dmenu.c
15+@@ -44,6 +44,8 @@ static struct item *matches, *matchend;
16+ static struct item *prev, *curr, *next, *sel;
17+ static int mon = -1, screen;
18+
19++static struct item noneitem;
20++
21+ static Atom clip, utf8;
22+ static Display *dpy;
23+ static Window root, parentwin, win;
24+@@ -254,6 +256,8 @@ match(void)
25+ len = tokc ? strlen(tokv[0]) : 0;
26+
27+ matches = lprefix = lsubstr = matchend = prefixend = substrend = NULL;
28++ noneitem.text = text;
29++ appenditem(&noneitem, &matches, &matchend);
30+ textsize = strlen(text) + 1;
31+ for (item = items; item && item->text; item++) {
32+ for (i = 0; i < tokc; i++)
33+@@ -285,7 +289,10 @@ match(void)
34+ matches = lsubstr;
35+ matchend = substrend;
36+ }
37+- curr = sel = matches;
38++ /* first item is the option to just take what you typed which should not
39++ * be selected by default */
40++ curr = matches;
41++ sel = matches->right ? matches->right : matches;
42+ calcoffsets();
43+ }
44+
45+--
46+2.45.1
47+
1@@ -2,3 +2,4 @@ https://dl.suckless.org/tools/dmenu-5.3.tar.gz
2 patches/0001-apply-center-patch.patch
3 patches/0002-add-border-patch.patch
4 patches/0003-change-colorscheme.patch
5+patches/0004-always-allow-selecting-whatever-was-typed-in-unchang.patch
1@@ -1 +1 @@
2-5.3 2
3+5.3 3