aboutsummaryrefslogtreecommitdiff
path: root/desktop/dwm/sbo-patches/replace-dmenu-rofi.patch
blob: 18c7905c1b952c48cc0021435b492c66bcceab6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
diff -Naur dwm-6.2/config.def.h b/config.def.h
--- dwm-6.2/config.def.h	2019-02-02 12:55:28.000000000 +0000
+++ b/config.def.h	2019-04-13 21:19:41.455638523 +0100
@@ -6,7 +6,6 @@
 static const int showbar            = 1;        /* 0 means no bar */
 static const int topbar             = 1;        /* 0 means bottom bar */
 static const char *fonts[]          = { "monospace:size=10" };
-static const char dmenufont[]       = "monospace:size=10";
 static const char col_gray1[]       = "#222222";
 static const char col_gray2[]       = "#444444";
 static const char col_gray3[]       = "#bbbbbb";
@@ -55,13 +54,12 @@
 #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
 
 /* commands */
-static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
-static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
+static const char *roficmd[] = { "rofi", "-sort", "-show", "run", "-theme", "dwm", NULL };
 static const char *termcmd[]  = { "st", NULL };
 
 static Key keys[] = {
 	/* modifier                     key        function        argument */
-	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
+	{ MODKEY,                       XK_p,      spawn,          {.v = roficmd } },
 	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
 	{ MODKEY,                       XK_b,      togglebar,      {0} },
 	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
diff -Naur dwm-6.2/dwm.1 b/dwm.1
--- dwm-6.2/dwm.1	2019-02-02 12:55:28.000000000 +0000
+++ b/dwm.1	2019-04-13 21:12:25.685674235 +0100
@@ -62,7 +62,7 @@
 .TP
 .B Mod1\-p
 Spawn
-.BR dmenu(1)
+.BR rofi(1)
 for launching other programs.
 .TP
 .B Mod1\-,
@@ -156,7 +156,7 @@
 dwm is customized by creating a custom config.h and (re)compiling the source
 code. This keeps it fast, secure and simple.
 .SH SEE ALSO
-.BR dmenu (1),
+.BR rofi (1),
 .BR st (1)
 .SH ISSUES
 Java applications which use the XToolkit/XAWT backend may draw grey windows
diff -Naur dwm-6.2/dwm.c b/dwm.c
--- dwm-6.2/dwm.c	2019-02-02 12:55:28.000000000 +0000
+++ b/dwm.c	2019-04-13 21:12:10.143211844 +0100
@@ -1639,8 +1639,6 @@
 void
 spawn(const Arg *arg)
 {
-	if (arg->v == dmenucmd)
-		dmenumon[0] = '0' + selmon->num;
 	if (fork() == 0) {
 		if (dpy)
 			close(ConnectionNumber(dpy));