summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2022-03-26 14:32:02 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2022-03-26 14:32:02 -0400
commita7c4a56c09641eec1765c9664d95f79cb58d4c86 (patch)
tree33044c5e10f646c090c97c222987053bf5479ec9
parentfd1db046d58bb54c880d0299d701c25e940b88e5 (diff)
debloat: spawn and dmenu are handled with dwmc
-rw-r--r--config.def.h9
-rw-r--r--dwm.c18
2 files changed, 1 insertions, 26 deletions
diff --git a/config.def.h b/config.def.h
index 4f4b1b8..80b283e 100644
--- a/config.def.h
+++ b/config.def.h
@@ -8,7 +8,7 @@ static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const int user_bh = 0; /* 0 means that dwm will calculate bar height, >= 1 means dwm will user_bh as bar height */
static const char *fonts[] = { "monospace:size=10" };
-static const char dmenufont[] = "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";
@@ -76,15 +76,8 @@ static const Layout layouts[] = {
#define STATUSBAR "dwmblocks"
-/* 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 *termcmd[] = { "st", NULL };
-
static Key keys[] = {
/* modifier key function argument */
- { MODKEY, XK_p, spawn, {.v = dmenucmd } },
- { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY|ShiftMask, XK_b, focusmaster, {0} },
{ MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } },
diff --git a/dwm.c b/dwm.c
index 3666dc9..e7ed885 100644
--- a/dwm.c
+++ b/dwm.c
@@ -225,7 +225,6 @@ static void seturgent(Client *c, int urg);
static void showhide(Client *c);
static void sigchld(int unused);
static void sigstatusbar(const Arg *arg);
-static void spawn(const Arg *arg);
static void tag(const Arg *arg);
static void tagmon(const Arg *arg);
static void tile(Monitor *);
@@ -318,7 +317,6 @@ applydefaultlayouts()
if (i < LENGTH(lpm)) {
m->lt[0] = &layouts[lpm[i]];
m->lt[1] = &layouts[(lpm[i] + 1)/ LENGTH(layouts)];
- /* m->lt[1] = &layouts[(lpm[i] + 1)/ % LENGTH(layouts)]; */
strncpy(m->ltsymbol, layouts[i].symbol, sizeof m->ltsymbol);
}
i++;
@@ -1977,22 +1975,6 @@ sigstatusbar(const Arg *arg)
}
void
-spawn(const Arg *arg)
-{
- if (arg->v == dmenucmd)
- dmenumon[0] = '0' + selmon->num;
- if (fork() == 0) {
- if (dpy)
- close(ConnectionNumber(dpy));
- setsid();
- execvp(((char **)arg->v)[0], (char **)arg->v);
- fprintf(stderr, "dwm: execvp %s", ((char **)arg->v)[0]);
- perror(" failed");
- exit(EXIT_SUCCESS);
- }
-}
-
-void
tag(const Arg *arg)
{
if (selmon->sel && arg->ui & TAGMASK) {