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 */ /* tagging */
static const char *tags[] = { "", "", "", "", "", "", "", "", "" }; 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 Rule rules[] = { static const Rule rules[] = {
/* xprop(1): /* xprop(1):

View File

@ -34,15 +34,7 @@ static char *colors[][3] = {
}; };
/* tagging */ /* tagging */
static const char *tags[] = { "", "", "", "", "", "", "", "", "" }; 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 Rule rules[] = { static const Rule rules[] = {
/* xprop(1): /* 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; int monitor;
} Rule; } Rule;
typedef struct {
const char** command;
const char* name;
} Launcher;
/* function declarations */ /* function declarations */
static void applyrules(Client *c); static void applyrules(Client *c);
static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact); 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)) { if (i < LENGTH(tags)) {
click = ClkTagBar; click = ClkTagBar;
arg.ui = 1 << i; arg.ui = 1 << i;
goto execute_handler;
} else if (ev->x < x + TEXTW(selmon->ltsymbol)) { } else if (ev->x < x + TEXTW(selmon->ltsymbol)) {
click = ClkLtSymbol; click = ClkLtSymbol;
goto execute_handler; } else if (ev->x > selmon->ww - TEXTW(selmon->ltsymbol)) {
click = ClkStatusText;
} }
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;
}
}
click = ClkStatusText;
} else if ((c = wintoclient(ev->window))) { } else if ((c = wintoclient(ev->window))) {
focus(c); focus(c);
restack(selmon); restack(selmon);
XAllowEvents(dpy, ReplayPointer, CurrentTime); XAllowEvents(dpy, ReplayPointer, CurrentTime);
click = ClkClientWin; click = ClkClientWin;
} }
execute_handler:
for (i = 0; i < LENGTH(buttons); i++) for (i = 0; i < LENGTH(buttons); i++)
if (click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button if (click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
&& CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state)) && CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state))
@ -1014,13 +991,6 @@ drawbar(Monitor *m)
drw_setscheme(drw, scheme[SchemeNorm]); drw_setscheme(drw, scheme[SchemeNorm]);
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0); 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) { if ((w = m->ww - tw - x) > bh) {
drw_setscheme(drw, scheme[SchemeNorm]); drw_setscheme(drw, scheme[SchemeNorm]);
drw_rect(drw, x, 0, w - 2 * hpb, bh, 1, 1); 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.