|
|
@ -60,7 +60,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
/* enums */ |
|
|
|
/* enums */ |
|
|
|
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ |
|
|
|
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ |
|
|
|
enum { SchemeNorm, SchemeSel, SchemeStatus, SchemeTagsSel, SchemeTagsNorm, SchemeInfoSel, SchemeInfoNorm }; /* color schemes */ |
|
|
|
enum { SchemeNorm, SchemeSel, SchemeStatus, SchemeTagsSel, SchemeTagsNorm, SchemeInfoSel, SchemeInfoNorm, SchemeMenu }; /* color schemes */ |
|
|
|
enum { NetSupported, NetWMName, NetWMState, NetWMCheck, |
|
|
|
enum { NetSupported, NetWMName, NetWMState, NetWMCheck, |
|
|
|
NetWMFullscreen, NetActiveWindow, NetWMWindowType, |
|
|
|
NetWMFullscreen, NetActiveWindow, NetWMWindowType, |
|
|
|
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ |
|
|
|
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ |
|
|
@ -142,6 +142,11 @@ 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); |
|
|
@ -439,9 +444,23 @@ buttonpress(XEvent *e) |
|
|
|
if (i < LENGTH(tags)) { |
|
|
|
if (i < LENGTH(tags)) { |
|
|
|
click = ClkTagBar; |
|
|
|
click = ClkTagBar; |
|
|
|
arg.ui = 1 << i; |
|
|
|
arg.ui = 1 << i; |
|
|
|
} else if (ev->x < x + blw) |
|
|
|
goto execute_handler; |
|
|
|
|
|
|
|
} else if (ev->x < x + blw) { |
|
|
|
click = ClkLtSymbol; |
|
|
|
click = ClkLtSymbol; |
|
|
|
else if (ev->x > selmon->ww - TEXTW(stext)) |
|
|
|
goto execute_handler; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
x += blw; |
|
|
|
|
|
|
|
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; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ev->x > selmon->ww - TEXTW(stext)) |
|
|
|
click = ClkStatusText; |
|
|
|
click = ClkStatusText; |
|
|
|
else |
|
|
|
else |
|
|
|
click = ClkWinTitle; |
|
|
|
click = ClkWinTitle; |
|
|
@ -451,6 +470,9 @@ buttonpress(XEvent *e) |
|
|
|
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)) |
|
|
@ -732,6 +754,14 @@ drawbar(Monitor *m) |
|
|
|
drw_setscheme(drw, scheme[SchemeTagsNorm]); |
|
|
|
drw_setscheme(drw, scheme[SchemeTagsNorm]); |
|
|
|
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); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Draw launchers */ |
|
|
|
|
|
|
|
for (i = 0; i < LENGTH(launchers); i++) { |
|
|
|
|
|
|
|
w = TEXTW(launchers[i].name); |
|
|
|
|
|
|
|
drw_setscheme(drw, scheme[SchemeMenu]); |
|
|
|
|
|
|
|
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) { |
|
|
|
if (n > 0) { |
|
|
|
if (n > 0) { |
|
|
|
tw = TEXTW(m->sel->name) + lrpad; |
|
|
|
tw = TEXTW(m->sel->name) + lrpad; |
|
|
|