1 Commits

Author SHA1 Message Date
Fabian Schmidt
3d02d1e10a Remove dmenu 2020-06-01 19:40:00 +02:00
2 changed files with 2 additions and 13 deletions

View File

@@ -5,7 +5,6 @@ static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *distrosymbol = "";
static const char *fonts[] = { "monospace:size=10" };
static const char dmenufont[] = "monospace:size=10";
static const char col_gray1[] = "#222222";
@@ -56,13 +55,11 @@ static const Layout layouts[] = {
#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 *termcmd[] = { "st", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY, XK_p, spawn, SHCMD("j4-dmenu-desktop --dmenu=\"dmenu -i\"") },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },

10
dwm.c
View File

@@ -113,7 +113,6 @@ typedef struct {
struct Monitor {
char ltsymbol[16];
char distrosymbol[16];
float mfact;
int nmaster;
int num;
@@ -432,8 +431,7 @@ buttonpress(XEvent *e)
focus(NULL);
}
if (ev->window == selmon->barwin) {
x = TEXTW(m->distrosymbol);
i = 0;
i = x = 0;
do
x += TEXTW(tags[i]);
while (ev->x >= x && ++i < LENGTH(tags));
@@ -644,7 +642,6 @@ createmon(void)
m->lt[0] = &layouts[0];
m->lt[1] = &layouts[1 % LENGTH(layouts)];
strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
strncpy(m->distrosymbol, distrosymbol, sizeof m->distrosymbol);
return m;
}
@@ -718,9 +715,6 @@ drawbar(Monitor *m)
urg |= c->tags;
}
x = 0;
w = blw = TEXTW(m->distrosymbol);
drw_setscheme(drw, scheme[SchemeNorm]);
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->distrosymbol, 0);
for (i = 0; i < LENGTH(tags); i++) {
w = TEXTW(tags[i]);
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
@@ -1646,8 +1640,6 @@ sigchld(int unused)
void
spawn(const Arg *arg)
{
if (arg->v == dmenucmd)
dmenumon[0] = '0' + selmon->num;
if (fork() == 0) {
if (dpy)
close(ConnectionNumber(dpy));