remove launcher patch

This commit is contained in:
BitHeaven 2023-08-06 13:38:12 +05:00
parent 0beada4a73
commit 11d1d68226
7 changed files with 4 additions and 50 deletions

View File

@ -34,15 +34,7 @@ static char *colors[][3] = {
};
/* tagging */
static const char *tags[] = { "", "", "", "", "", "", "", "", "" };
/* launcher commands (They must be NULL terminated) */
static const char* bhev[] = { "firefox", "bhev.ru", NULL };
static const Launcher launchers[] = {
/* command name to display */
{ bhev, "" },
};
static const char *tags[] = { "", "", "", "", "", "", "", "", "", "?" };
static const Rule rules[] = {
/* xprop(1):

View File

@ -34,15 +34,7 @@ static char *colors[][3] = {
};
/* tagging */
static const char *tags[] = { "", "", "", "", "", "", "", "", "" };
/* launcher commands (They must be NULL terminated) */
static const char* bhev[] = { "firefox", "bhev.ru", NULL };
static const Launcher launchers[] = {
/* command name to display */
{ bhev, "" },
};
static const char *tags[] = { "", "", "", "", "", "", "", "", "", "?" };
static const Rule rules[] = {
/* xprop(1):

BIN
drw.o

Binary file not shown.

BIN
dwm

Binary file not shown.

34
dwm.c
View File

@ -162,11 +162,6 @@ typedef struct {
int monitor;
} Rule;
typedef struct {
const char** command;
const char* name;
} Launcher;
/* function declarations */
static void applyrules(Client *c);
static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact);
@ -475,35 +470,17 @@ buttonpress(XEvent *e)
if (i < LENGTH(tags)) {
click = ClkTagBar;
arg.ui = 1 << i;
goto execute_handler;
} else if (ev->x < x + TEXTW(selmon->ltsymbol)) {
click = ClkLtSymbol;
goto execute_handler;
}
x += TEXTW(selmon->ltsymbol);
for(i = 0; i < LENGTH(launchers); i++) {
x += TEXTW(launchers[i].name);
if (ev->x < x) {
Arg a;
a.v = launchers[i].command;
spawn(&a);
return;
}
}
} else if (ev->x > selmon->ww - TEXTW(selmon->ltsymbol)) {
click = ClkStatusText;
}
} else if ((c = wintoclient(ev->window))) {
focus(c);
restack(selmon);
XAllowEvents(dpy, ReplayPointer, CurrentTime);
click = ClkClientWin;
}
execute_handler:
for (i = 0; i < LENGTH(buttons); i++)
if (click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
&& CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state))
@ -1014,13 +991,6 @@ drawbar(Monitor *m)
drw_setscheme(drw, scheme[SchemeNorm]);
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
for (i = 0; i < LENGTH(launchers); i++)
{
w = TEXTW(launchers[i].name);
drw_text(drw, x, 0, w, bh, lrpad / 2, launchers[i].name, urg & 1 << i);
x += w;
}
if ((w = m->ww - tw - x) > bh) {
drw_setscheme(drw, scheme[SchemeNorm]);
drw_rect(drw, x, 0, w - 2 * hpb, bh, 1, 1);

BIN
dwm.o

Binary file not shown.

BIN
util.o

Binary file not shown.