Just some minor changes adding bar border patch ref. #41

This commit is contained in:
bakkeby 2020-09-09 17:24:02 +02:00
parent b3e6e3531b
commit ff9811f73d
49 changed files with 342 additions and 306 deletions

View File

@ -15,6 +15,8 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog: ### Changelog:
2020-09-09 - Added the bar border patch
2020-09-08 - Added ipc v1.5.5 patch 2020-09-08 - Added ipc v1.5.5 patch
2020-09-07 - Scratchpads improvement (multi-monitor support) 2020-09-07 - Scratchpads improvement (multi-monitor support)
@ -202,6 +204,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
- [awesomebar](https://dwm.suckless.org/patches/awesomebar/) - [awesomebar](https://dwm.suckless.org/patches/awesomebar/)
- enhanced taskbar that allows focus / hiding / unhiding of windows by clicking on the status bar - enhanced taskbar that allows focus / hiding / unhiding of windows by clicking on the status bar
- [bar_border](https://codemadness.org/paste/dwm-border-bar.patch)
- adds a border around the bar similarly to how client windows have borders
- [bar_height](https://dwm.suckless.org/patches/bar_height/) - [bar_height](https://dwm.suckless.org/patches/bar_height/)
- allows the bar height to be explicitly set rather than being derived from font - allows the bar height to be explicitly set rather than being derived from font

View File

@ -60,8 +60,10 @@ static const int quit_empty_window_count = 2; /* only allow dwm to quit if no
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
static const char statussep = ';'; /* separator between status bars */ static const char statussep = ';'; /* separator between status bars */
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
#if BAR_TABGROUPS_PATCH #if BAR_TABGROUPS_PATCH && MONOCLE_LAYOUT
static void (*bartabmonfns[])(Monitor *) = { monocle /* , customlayoutfn */ }; static void (*bartabmonfns[])(Monitor *) = { monocle /* , customlayoutfn */ };
#else
static void (*bartabmonfns[])(Monitor *) = { NULL /* , customlayoutfn */ };
#endif // BAR_TABGROUPS_PATCH #endif // BAR_TABGROUPS_PATCH
#if BAR_PANGO_PATCH #if BAR_PANGO_PATCH
static const char font[] = "monospace 10"; static const char font[] = "monospace 10";

87
dwm.c
View File

@ -254,34 +254,27 @@ struct Bar {
int idx; int idx;
int showbar; int showbar;
int topbar; int topbar;
int borderpx;
int borderscheme;
int bx, by, bw, bh; /* bar geometry */ int bx, by, bw, bh; /* bar geometry */
int w[BARRULES]; // width, array length == barrules, then use r index for lookup purposes int w[BARRULES]; // width, array length == barrules, then use r index for lookup purposes
int x[BARRULES]; // x position, array length == ^ int x[BARRULES]; // x position, array length == ^
}; };
typedef struct {
int max_width;
} BarWidthArg;
typedef struct { typedef struct {
int x; int x;
int y;
int h;
int w; int w;
} BarDrawArg; } BarArg;
typedef struct {
int rel_x;
int rel_y;
int rel_w;
int rel_h;
} BarClickArg;
typedef struct { typedef struct {
int monitor; int monitor;
int bar; int bar;
int alignment; // see bar alignment enum int alignment; // see bar alignment enum
int (*widthfunc)(Bar *bar, BarWidthArg *a); int (*widthfunc)(Bar *bar, BarArg *a);
int (*drawfunc)(Bar *bar, BarDrawArg *a); int (*drawfunc)(Bar *bar, BarArg *a);
int (*clickfunc)(Bar *bar, Arg *arg, BarClickArg *a); int (*clickfunc)(Bar *bar, Arg *arg, BarArg *a);
char *name; // for debugging char *name; // for debugging
int x, w; // position, width for internal use int x, w; // position, width for internal use
} BarRule; } BarRule;
@ -958,7 +951,7 @@ buttonpress(XEvent *e)
Bar *bar; Bar *bar;
XButtonPressedEvent *ev = &e->xbutton; XButtonPressedEvent *ev = &e->xbutton;
const BarRule *br; const BarRule *br;
BarClickArg carg = { 0, 0, 0, 0 }; BarArg carg = { 0, 0, 0, 0 };
click = ClkRootWin; click = ClkRootWin;
/* focus monitor if necessary */ /* focus monitor if necessary */
if ((m = wintomon(ev->window)) && m != selmon if ((m = wintomon(ev->window)) && m != selmon
@ -980,10 +973,10 @@ buttonpress(XEvent *e)
if (br->monitor != 'A' && br->monitor != -1 && br->monitor != bar->mon->index) if (br->monitor != 'A' && br->monitor != -1 && br->monitor != bar->mon->index)
continue; continue;
if (bar->x[r] <= ev->x && ev->x <= bar->x[r] + bar->w[r]) { if (bar->x[r] <= ev->x && ev->x <= bar->x[r] + bar->w[r]) {
carg.rel_x = ev->x - bar->x[r]; carg.x = ev->x - bar->x[r];
carg.rel_y = ev->y; carg.y = ev->y - bar->borderpx;
carg.rel_w = bar->w[r]; carg.w = bar->w[r];
carg.rel_h = bar->bh; carg.h = bar->bh - 2 * bar->borderpx;
click = br->clickfunc(bar, &arg, &carg); click = br->clickfunc(bar, &arg, &carg);
if (click < 0) if (click < 0)
return; return;
@ -1407,6 +1400,12 @@ createmon(void)
m->bar = bar; m->bar = bar;
istopbar = !istopbar; istopbar = !istopbar;
bar->showbar = 1; bar->showbar = 1;
#if BAR_BORDER_PATCH
bar->borderpx = borderpx;
#else
bar->borderpx = 0;
#endif // BAR_BORDER_PATCH
bar->borderscheme = SchemeNorm;
} }
#if FLEXTILE_DELUXE_LAYOUT #if FLEXTILE_DELUXE_LAYOUT
@ -1571,24 +1570,32 @@ drawbarwin(Bar *bar)
int r, w, total_drawn = 0; int r, w, total_drawn = 0;
int rx, lx, rw, lw; // bar size, split between left and right if a center module is added int rx, lx, rw, lw; // bar size, split between left and right if a center module is added
const BarRule *br; const BarRule *br;
BarWidthArg warg = { 0 };
BarDrawArg darg = { 0, 0 };
rw = lw = bar->bw; if (bar->borderpx) {
rx = lx = 0; XSetForeground(drw->dpy, drw->gc, scheme[bar->borderscheme][ColBorder].pixel);
XFillRectangle(drw->dpy, drw->drawable, drw->gc, 0, 0, bar->bw, bar->bh);
}
BarArg warg = { 0 };
BarArg darg = { 0 };
warg.h = bar->bh - 2 * bar->borderpx;
rw = lw = bar->bw - 2 * bar->borderpx;
rx = lx = bar->borderpx;
drw_setscheme(drw, scheme[SchemeNorm]); drw_setscheme(drw, scheme[SchemeNorm]);
drw_rect(drw, lx, 0, lw, bh, 1, 1); drw_rect(drw, lx, bar->borderpx, lw, bar->bh - 2 * bar->borderpx, 1, 1);
for (r = 0; r < LENGTH(barrules); r++) { for (r = 0; r < LENGTH(barrules); r++) {
br = &barrules[r]; br = &barrules[r];
if (br->bar != bar->idx || br->drawfunc == NULL || (br->monitor == 'A' && bar->mon != selmon)) if (br->bar != bar->idx || (br->monitor == 'A' && bar->mon != selmon))
continue; continue;
if (br->monitor != 'A' && br->monitor != -1 && br->monitor != bar->mon->index) if (br->monitor != 'A' && br->monitor != -1 && br->monitor != bar->mon->index)
continue; continue;
drw_setscheme(drw, scheme[SchemeNorm]); drw_setscheme(drw, scheme[SchemeNorm]);
warg.max_width = (br->alignment < BAR_ALIGN_RIGHT_LEFT ? lw : rw); warg.w = (br->alignment < BAR_ALIGN_RIGHT_LEFT ? lw : rw);
w = br->widthfunc(bar, &warg); w = br->widthfunc(bar, &warg);
w = MIN(warg.max_width, w); w = MIN(warg.w, w);
if (lw <= 0) { // if left is exhausted then switch to right side, and vice versa if (lw <= 0) { // if left is exhausted then switch to right side, and vice versa
lw = rw; lw = rw;
@ -1653,9 +1660,13 @@ drawbarwin(Bar *bar)
} }
bar->w[r] = w; bar->w[r] = w;
darg.x = bar->x[r]; darg.x = bar->x[r];
darg.y = bar->borderpx;
darg.h = bar->bh - 2 * bar->borderpx;
darg.w = bar->w[r]; darg.w = bar->w[r];
if (br->drawfunc)
total_drawn += br->drawfunc(bar, &darg); total_drawn += br->drawfunc(bar, &darg);
} }
if (total_drawn == 0 && bar->showbar) { if (total_drawn == 0 && bar->showbar) {
bar->showbar = 0; bar->showbar = 0;
updatebarpos(bar->mon); updatebarpos(bar->mon);
@ -2899,12 +2910,12 @@ setfullscreen(Client *c, int fullscreen)
PropModeReplace, (unsigned char*)&netatom[NetWMFullscreen], 1); PropModeReplace, (unsigned char*)&netatom[NetWMFullscreen], 1);
c->isfullscreen = 1; c->isfullscreen = 1;
#if !FAKEFULLSCREEN_PATCH #if !FAKEFULLSCREEN_PATCH
c->oldbw = c->bw;
#if FAKEFULLSCREEN_CLIENT_PATCH #if FAKEFULLSCREEN_CLIENT_PATCH
if (c->fakefullscreen == 1) if (c->fakefullscreen == 1)
return; return;
#endif // FAKEFULLSCREEN_CLIENT_PATCH #endif // FAKEFULLSCREEN_CLIENT_PATCH
c->oldstate = c->isfloating; c->oldstate = c->isfloating;
c->oldbw = c->bw;
c->bw = 0; c->bw = 0;
c->isfloating = 1; c->isfloating = 1;
resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh); resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh);
@ -2915,6 +2926,7 @@ setfullscreen(Client *c, int fullscreen)
PropModeReplace, (unsigned char*)0, 0); PropModeReplace, (unsigned char*)0, 0);
c->isfullscreen = 0; c->isfullscreen = 0;
#if !FAKEFULLSCREEN_PATCH #if !FAKEFULLSCREEN_PATCH
c->bw = c->oldbw;
#if FAKEFULLSCREEN_CLIENT_PATCH #if FAKEFULLSCREEN_CLIENT_PATCH
if (c->fakefullscreen == 1) if (c->fakefullscreen == 1)
return; return;
@ -2922,7 +2934,6 @@ setfullscreen(Client *c, int fullscreen)
c->fakefullscreen = 1; c->fakefullscreen = 1;
#endif // FAKEFULLSCREEN_CLIENT_PATCH #endif // FAKEFULLSCREEN_CLIENT_PATCH
c->isfloating = c->oldstate; c->isfloating = c->oldstate;
c->bw = c->oldbw;
c->x = c->oldx; c->x = c->oldx;
c->y = c->oldy; c->y = c->oldy;
c->w = c->oldw; c->w = c->oldw;
@ -3197,7 +3208,7 @@ showhide(Client *c)
if (!c) if (!c)
return; return;
if (ISVISIBLE(c)) { if (ISVISIBLE(c)) {
#if SCRATCHPADS_KEEP_POSITION_AND_SIZE_PATCH #if SCRATCHPADS_PATCH && SCRATCHPADS_KEEP_POSITION_AND_SIZE_PATCH
if ( if (
(c->tags & SPTAGMASK) && (c->tags & SPTAGMASK) &&
c->isfloating && c->isfloating &&
@ -3733,7 +3744,6 @@ updatebarpos(Monitor *m)
m->wy = m->my; m->wy = m->my;
m->ww = m->mw; m->ww = m->mw;
m->wh = m->mh; m->wh = m->mh;
int num_bars;
Bar *bar; Bar *bar;
#if BAR_PADDING_PATCH #if BAR_PADDING_PATCH
int y_pad = vertpad; int y_pad = vertpad;
@ -3755,24 +3765,23 @@ updatebarpos(Monitor *m)
for (bar = m->bar; bar; bar = bar->next) { for (bar = m->bar; bar; bar = bar->next) {
bar->bx = m->wx + x_pad; bar->bx = m->wx + x_pad;
bar->bw = m->ww - 2 * x_pad; bar->bw = m->ww - 2 * x_pad;
bar->bh = bh; bar->bh = bh + bar->borderpx * 2;
} }
for (bar = m->bar; bar; bar = bar->next) for (bar = m->bar; bar; bar = bar->next)
if (!m->showbar || !bar->showbar) if (!m->showbar || !bar->showbar)
bar->by = -bh - y_pad; bar->by = -bh - bar->borderpx * 2 - y_pad;
if (!m->showbar) if (!m->showbar)
return; return;
for (num_bars = 0, bar = m->bar; bar; bar = bar->next) { for (bar = m->bar; bar; bar = bar->next) {
if (!bar->showbar) if (!bar->showbar)
continue; continue;
if (bar->topbar) if (bar->topbar)
m->wy = m->wy + bh + y_pad; m->wy = m->wy + bh + bar->borderpx * 2 + y_pad;
num_bars++; m->wh -= y_pad + bh + bar->borderpx * 2;
} }
m->wh = m->wh - y_pad * num_bars - bh * num_bars;
for (bar = m->bar; bar; bar = bar->next) for (bar = m->bar; bar; bar = bar->next)
bar->by = (bar->topbar ? m->wy - bh : m->wy + m->wh); bar->by = (bar->topbar ? m->wy - bh - bar->borderpx * 2 : m->wy + m->wh);
} }
void void

View File

@ -1,11 +1,11 @@
int int
width_awesomebar(Bar *bar, BarWidthArg *a) width_awesomebar(Bar *bar, BarArg *a)
{ {
return a->max_width; return a->w;
} }
int int
draw_awesomebar(Bar *bar, BarDrawArg *a) draw_awesomebar(Bar *bar, BarArg *a)
{ {
int n = 0, scm, remainder = 0, tabw, pad; int n = 0, scm, remainder = 0, tabw, pad;
unsigned int i; unsigned int i;
@ -44,9 +44,9 @@ draw_awesomebar(Bar *bar, BarDrawArg *a)
#endif // BAR_CENTEREDWINDOWNAME_PATCH #endif // BAR_CENTEREDWINDOWNAME_PATCH
drw_setscheme(drw, scheme[scm]); drw_setscheme(drw, scheme[scm]);
drw_text(drw, x, 0, tabw + (i < remainder ? 1 : 0), bh, pad, c->name, 0, False); drw_text(drw, x, a->y, tabw + (i < remainder ? 1 : 0), a->h, pad, c->name, 0, False);
if (c->isfloating) if (c->isfloating)
drawindicator(c->mon, c, 1, x, w, 0, 0, c->isfixed, floatindicatortype); drawindicator(c->mon, c, 1, x, a->y, w, a->h, 0, 0, c->isfixed, floatindicatortype);
x += tabw + (i < remainder ? 1 : 0); x += tabw + (i < remainder ? 1 : 0);
} }
} }
@ -54,7 +54,7 @@ draw_awesomebar(Bar *bar, BarDrawArg *a)
} }
int int
click_awesomebar(Bar *bar, Arg *arg, BarClickArg *a) click_awesomebar(Bar *bar, Arg *arg, BarArg *a)
{ {
int x = 0, n = 0; int x = 0, n = 0;
Client *c; Client *c;
@ -69,8 +69,8 @@ click_awesomebar(Bar *bar, Arg *arg, BarClickArg *a)
if (!c || !ISVISIBLE(c)) if (!c || !ISVISIBLE(c))
continue; continue;
else else
x += (1.0 / (double)n) * a->rel_w; x += (1.0 / (double)n) * a->w;
} while (c && a->rel_x > x && (c = c->next)); } while (c && a->x > x && (c = c->next));
if (c) { if (c) {
arg->v = c; arg->v = c;

View File

@ -1,3 +1,3 @@
static int width_awesomebar(Bar *bar, BarWidthArg *a); static int width_awesomebar(Bar *bar, BarArg *a);
static int draw_awesomebar(Bar *bar, BarDrawArg *a); static int draw_awesomebar(Bar *bar, BarArg *a);
static int click_awesomebar(Bar *bar, Arg *arg, BarClickArg *a); static int click_awesomebar(Bar *bar, Arg *arg, BarArg *a);

View File

@ -1,11 +1,11 @@
int int
width_fancybar(Bar *bar, BarWidthArg *a) width_fancybar(Bar *bar, BarArg *a)
{ {
return a->max_width; return a->w;
} }
int int
draw_fancybar(Bar *bar, BarDrawArg *a) draw_fancybar(Bar *bar, BarArg *a)
{ {
int ftw, mw, ew = 0, n = 0; int ftw, mw, ew = 0, n = 0;
unsigned int i; unsigned int i;
@ -52,9 +52,9 @@ draw_fancybar(Bar *bar, BarDrawArg *a)
ftw = MIN(m->sel == c ? w : mw, TEXTW(c->name)); ftw = MIN(m->sel == c ? w : mw, TEXTW(c->name));
drw_setscheme(drw, scheme[m->sel == c ? SchemeTitleSel : SchemeTitleNorm]); drw_setscheme(drw, scheme[m->sel == c ? SchemeTitleSel : SchemeTitleNorm]);
if (ftw > 0) /* trap special handling of 0 in drw_text */ if (ftw > 0) /* trap special handling of 0 in drw_text */
drw_text(drw, x, 0, ftw, bh, lrpad / 2, c->name, 0, False); drw_text(drw, x, a->y, ftw, a->h, lrpad / 2, c->name, 0, False);
if (c->isfloating) if (c->isfloating)
drawindicator(c->mon, c, 1, x, w, 0, 0, c->isfixed, floatindicatortype); drawindicator(c->mon, c, 1, x, a->y, w, a->h, 0, 0, c->isfixed, floatindicatortype);
x += ftw; x += ftw;
w -= ftw; w -= ftw;
} }
@ -63,7 +63,7 @@ draw_fancybar(Bar *bar, BarDrawArg *a)
} }
int int
click_fancybar(Bar *bar, Arg *arg, BarClickArg *a) click_fancybar(Bar *bar, Arg *arg, BarArg *a)
{ {
return ClkWinTitle; return ClkWinTitle;
} }

View File

@ -1,3 +1,3 @@
static int width_fancybar(Bar *bar, BarWidthArg *a); static int width_fancybar(Bar *bar, BarArg *a);
static int draw_fancybar(Bar *bar, BarDrawArg *a); static int draw_fancybar(Bar *bar, BarArg *a);
static int click_fancybar(Bar *bar, Arg *arg, BarClickArg *a); static int click_fancybar(Bar *bar, Arg *arg, BarArg *a);

View File

@ -23,28 +23,28 @@
enum { GRP_NOSELECTION, GRP_MASTER, GRP_STACK1, GRP_STACK2, GRP_FLOAT, GRP_HIDDEN }; enum { GRP_NOSELECTION, GRP_MASTER, GRP_STACK1, GRP_STACK2, GRP_FLOAT, GRP_HIDDEN };
int int
width_flexwintitle(Bar *bar, BarWidthArg *a) width_flexwintitle(Bar *bar, BarArg *a)
{ {
return a->max_width; return a->w;
} }
int int
draw_flexwintitle(Bar *bar, BarDrawArg *a) draw_flexwintitle(Bar *bar, BarArg *a)
{ {
drw_rect(drw, a->x, 0, a->w, bh, 1, 1); drw_rect(drw, a->x, a->y, a->w, a->h, 1, 1);
return flextitlecalculate(bar->mon, a->x, a->w, -1, flextitledraw, NULL); return flextitlecalculate(bar->mon, a->x, a->w, -1, flextitledraw, NULL, a);
} }
int int
click_flexwintitle(Bar *bar, Arg *arg, BarClickArg *a) click_flexwintitle(Bar *bar, Arg *arg, BarArg *a)
{ {
flextitlecalculate(bar->mon, 0, a->rel_w, a->rel_x, flextitleclick, arg); flextitlecalculate(bar->mon, 0, a->w, a->x, flextitleclick, arg, a);
return ClkWinTitle; return ClkWinTitle;
} }
Client * Client *
flextitledrawarea(Monitor *m, Client *c, int x, int r, int w, int max_clients, int scheme, int draw_tiled, int draw_hidden, int draw_floating, flextitledrawarea(Monitor *m, Client *c, int x, int r, int w, int max_clients, int scheme, int draw_tiled, int draw_hidden, int draw_floating,
int passx, void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg), Arg *arg) int passx, void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg), Arg *arg, BarArg *barg)
{ {
int i; int i;
for (i = 0; c && i < max_clients; c = c->next) { for (i = 0; c && i < max_clients; c = c->next) {
@ -56,7 +56,7 @@ flextitledrawarea(Monitor *m, Client *c, int x, int r, int w, int max_clients, i
(draw_hidden && HIDDEN(c)) (draw_hidden && HIDDEN(c))
) )
) { ) {
tabfn(m, c, passx, x, w + (i < r ? 1 : 0), scheme, arg); tabfn(m, c, passx, x, w + (i < r ? 1 : 0), scheme, arg, barg);
x += w + (i < r ? 1 : 0); x += w + (i < r ? 1 : 0);
i++; i++;
} }
@ -166,7 +166,7 @@ getselschemefor(int scheme)
} }
void void
flextitledraw(Monitor *m, Client *c, int unused, int x, int w, int tabscheme, Arg *arg) flextitledraw(Monitor *m, Client *c, int unused, int x, int w, int tabscheme, Arg *arg, BarArg *barg)
{ {
if (!c) if (!c)
return; return;
@ -189,14 +189,14 @@ flextitledraw(Monitor *m, Client *c, int unused, int x, int w, int tabscheme, Ar
pad = (w - TEXTW(c->name) + lrpad) / 2; pad = (w - TEXTW(c->name) + lrpad) / 2;
#endif // BAR_CENTEREDWINDOWNAME_PATCH #endif // BAR_CENTEREDWINDOWNAME_PATCH
drw_text(drw, x, 0, w, bh, pad, c->name, 0, False); drw_text(drw, x, barg->y, w, barg->h, pad, c->name, 0, False);
if (c->isfloating) if (c->isfloating)
drawindicator(m, c, 1, x + 2, w, 0, 0, 0, floatindicatortype); drawindicator(m, c, 1, x + 2, barg->y, w, barg->h, 0, 0, 0, floatindicatortype);
if (FLEXWINTITLE_BORDERS) { if (FLEXWINTITLE_BORDERS) {
XSetForeground(drw->dpy, drw->gc, scheme[SchemeSel][ColBorder].pixel); XSetForeground(drw->dpy, drw->gc, scheme[SchemeSel][ColBorder].pixel);
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, 0, 1, bh); XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, barg->y, 1, barg->h);
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x + w, 0, 1, bh); XFillRectangle(drw->dpy, drw->drawable, drw->gc, x + w - (x + w >= barg->w ? 1 : 0), barg->y, 1, barg->h);
} }
/* Optional tags icons */ /* Optional tags icons */
for (i = 0; i < NUMTAGS; i++) { for (i = 0; i < NUMTAGS; i++) {
@ -207,7 +207,7 @@ flextitledraw(Monitor *m, Client *c, int unused, int x, int w, int tabscheme, Ar
} }
if (TAGSINDICATOR == 2 || nclienttags > 1 || nviewtags > 1) if (TAGSINDICATOR == 2 || nclienttags > 1 || nviewtags > 1)
drawindicator(m, c, 1, x, w, 0, 0, 0, INDICATOR_RIGHT_TAGS); drawindicator(m, c, 1, x, barg->y, w, barg->h, 0, 0, 0, INDICATOR_RIGHT_TAGS);
} }
#ifndef HIDDEN #ifndef HIDDEN
@ -215,7 +215,7 @@ flextitledraw(Monitor *m, Client *c, int unused, int x, int w, int tabscheme, Ar
#endif #endif
void void
flextitleclick(Monitor *m, Client *c, int passx, int x, int w, int unused, Arg *arg) flextitleclick(Monitor *m, Client *c, int passx, int x, int w, int unused, Arg *arg, BarArg *barg)
{ {
if (passx >= x && passx <= x + w) if (passx >= x && passx <= x + w)
arg->v = c; arg->v = c;
@ -224,7 +224,8 @@ flextitleclick(Monitor *m, Client *c, int passx, int x, int w, int unused, Arg *
int int
flextitlecalculate( flextitlecalculate(
Monitor *m, int offx, int tabw, int passx, Monitor *m, int offx, int tabw, int passx,
void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg), Arg *arg void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg),
Arg *arg, BarArg *barg
) { ) {
Client *c; Client *c;
int n, center = 0, mirror = 0, fixed = 0; // layout configuration int n, center = 0, mirror = 0, fixed = 0; // layout configuration
@ -355,13 +356,13 @@ flextitlecalculate(
den = clientsnmaster + clientsnstack + clientsnstack2 + clientsnfloating + clientsnhidden; den = clientsnmaster + clientsnstack + clientsnstack2 + clientsnfloating + clientsnhidden;
w = num / den; w = num / den;
r = num % den; // rest r = num % den; // rest
c = flextitledrawarea(m, c, mas_x, r, w, den, !m->lt[m->sellt]->arrange ? SchemeFlexActFloat : SCHEMEFOR(GRP_MASTER), 1, FLEXWINTITLE_HIDDENWEIGHT, FLEXWINTITLE_FLOATWEIGHT, passx, tabfn, arg); // floating c = flextitledrawarea(m, c, mas_x, r, w, den, !m->lt[m->sellt]->arrange ? SchemeFlexActFloat : SCHEMEFOR(GRP_MASTER), 1, FLEXWINTITLE_HIDDENWEIGHT, FLEXWINTITLE_FLOATWEIGHT, passx, tabfn, arg, barg); // floating
/* no master and stack mode, e.g. monocole, grid layouts, fibonacci */ /* no master and stack mode, e.g. monocole, grid layouts, fibonacci */
} else if (fulllayout) { } else if (fulllayout) {
den = clientsnmaster + clientsnstack + clientsnstack2 + clientsnhidden; den = clientsnmaster + clientsnstack + clientsnstack2 + clientsnhidden;
w = num / den; w = num / den;
r = num % den; // rest r = num % den; // rest
c = flextitledrawarea(m, c, mas_x, r, w, den, SCHEMEFOR(GRP_MASTER), 1, FLEXWINTITLE_HIDDENWEIGHT, 0, passx, tabfn, arg); // full c = flextitledrawarea(m, c, mas_x, r, w, den, SCHEMEFOR(GRP_MASTER), 1, FLEXWINTITLE_HIDDENWEIGHT, 0, passx, tabfn, arg, barg); // full
/* tiled mode */ /* tiled mode */
} else { } else {
den = clientsnmaster * FLEXWINTITLE_MASTERWEIGHT + (clientsnstack + clientsnstack2) * FLEXWINTITLE_STACKWEIGHT + clientsnfloating * FLEXWINTITLE_FLOATWEIGHT + clientsnhidden * FLEXWINTITLE_HIDDENWEIGHT; den = clientsnmaster * FLEXWINTITLE_MASTERWEIGHT + (clientsnstack + clientsnstack2) * FLEXWINTITLE_STACKWEIGHT + clientsnfloating * FLEXWINTITLE_FLOATWEIGHT + clientsnhidden * FLEXWINTITLE_HIDDENWEIGHT;
@ -420,17 +421,17 @@ flextitlecalculate(
} }
flt_x = hid_x + hid_w; flt_x = hid_x + hid_w;
c = flextitledrawarea(m, c, mas_x, rr, w * FLEXWINTITLE_MASTERWEIGHT + rw, clientsnmaster, SCHEMEFOR(GRP_MASTER), 1, 0, 0, passx, tabfn, arg); // master c = flextitledrawarea(m, c, mas_x, rr, w * FLEXWINTITLE_MASTERWEIGHT + rw, clientsnmaster, SCHEMEFOR(GRP_MASTER), 1, 0, 0, passx, tabfn, arg, barg); // master
rr -= clientsnmaster; rr -= clientsnmaster;
c = flextitledrawarea(m, c, st1_x, rr, w * FLEXWINTITLE_STACKWEIGHT + rw, clientsnstack, SCHEMEFOR(GRP_STACK1), 1, 0, 0, passx, tabfn, arg); // stack1 c = flextitledrawarea(m, c, st1_x, rr, w * FLEXWINTITLE_STACKWEIGHT + rw, clientsnstack, SCHEMEFOR(GRP_STACK1), 1, 0, 0, passx, tabfn, arg, barg); // stack1
rr -= clientsnstack; rr -= clientsnstack;
if (clientsnstack2) { if (clientsnstack2) {
c = flextitledrawarea(m, c, st2_x, rr, w * FLEXWINTITLE_STACKWEIGHT + rw, clientsnstack2, SCHEMEFOR(GRP_STACK2), 1, 0, 0, passx, tabfn, arg); // stack2 c = flextitledrawarea(m, c, st2_x, rr, w * FLEXWINTITLE_STACKWEIGHT + rw, clientsnstack2, SCHEMEFOR(GRP_STACK2), 1, 0, 0, passx, tabfn, arg, barg); // stack2
rr -= clientsnstack2; rr -= clientsnstack2;
} }
c = flextitledrawarea(m, m->clients, hid_x, rr, w * FLEXWINTITLE_HIDDENWEIGHT + rw, clientsnhidden, SCHEMEFOR(GRP_HIDDEN), 0, 1, 0, passx, tabfn, arg); // hidden c = flextitledrawarea(m, m->clients, hid_x, rr, w * FLEXWINTITLE_HIDDENWEIGHT + rw, clientsnhidden, SCHEMEFOR(GRP_HIDDEN), 0, 1, 0, passx, tabfn, arg, barg); // hidden
rr -= clientsnhidden; rr -= clientsnhidden;
c = flextitledrawarea(m, m->clients, flt_x, rr, w * FLEXWINTITLE_FLOATWEIGHT + rw, clientsnfloating, SCHEMEFOR(GRP_FLOAT), 0, 0, 1, passx, tabfn, arg); // floating c = flextitledrawarea(m, m->clients, flt_x, rr, w * FLEXWINTITLE_FLOATWEIGHT + rw, clientsnfloating, SCHEMEFOR(GRP_FLOAT), 0, 0, 1, passx, tabfn, arg, barg); // floating
} }
return 1; return 1;
} }

View File

@ -1,10 +1,10 @@
static int width_flexwintitle(Bar *bar, BarWidthArg *a); static int width_flexwintitle(Bar *bar, BarArg *a);
static int draw_flexwintitle(Bar *bar, BarDrawArg *a); static int draw_flexwintitle(Bar *bar, BarArg *a);
static int click_flexwintitle(Bar *bar, Arg *arg, BarClickArg *a); static int click_flexwintitle(Bar *bar, Arg *arg, BarArg *a);
static void flextitledraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg *arg); static void flextitledraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg *arg, BarArg *barg);
static void flextitleclick(Monitor *m, Client *c, int passx, int x, int w, int unused, Arg *arg); static void flextitleclick(Monitor *m, Client *c, int passx, int x, int w, int unused, Arg *arg, BarArg *barg);
static int flextitlecalculate(Monitor *m, int offx, int w, int passx, void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg), Arg *arg); static int flextitlecalculate(Monitor *m, int offx, int w, int passx, void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg), Arg *arg, BarArg *barg);
static int getschemefor(Monitor *m, int group, int activegroup); static int getschemefor(Monitor *m, int group, int activegroup);
static int getselschemefor(int scheme); static int getselschemefor(int scheme);
static Client *flextitledrawarea(Monitor *m, Client *c, int x, int r, int w, int max_clients, int tabscheme, int draw_tiled, int draw_hidden, int draw_floating, int passx, void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg), Arg *arg); static Client *flextitledrawarea(Monitor *m, Client *c, int x, int r, int w, int max_clients, int tabscheme, int draw_tiled, int draw_hidden, int draw_floating, int passx, void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg), Arg *arg, BarArg *barg);

View File

@ -10,7 +10,7 @@
#endif #endif
void void
drawindicator(Monitor *m, Client *c, unsigned int occ, int x, int w, unsigned int tag, int filled, int invert, int type) drawindicator(Monitor *m, Client *c, unsigned int occ, int x, int y, int w, int h, unsigned int tag, int filled, int invert, int type)
{ {
int i, boxw, boxs, indn = 0; int i, boxw, boxs, indn = 0;
if (!(occ & 1 << tag) || type == INDICATOR_NONE) if (!(occ & 1 << tag) || type == INDICATOR_NONE)
@ -24,31 +24,31 @@ drawindicator(Monitor *m, Client *c, unsigned int occ, int x, int w, unsigned in
switch (type) { switch (type) {
default: default:
case INDICATOR_TOP_LEFT_SQUARE: case INDICATOR_TOP_LEFT_SQUARE:
drw_rect(drw, x + boxs, boxs, boxw, boxw, filled, invert); drw_rect(drw, x + boxs, y + boxs, boxw, boxw, filled, invert);
break; break;
case INDICATOR_TOP_LEFT_LARGER_SQUARE: case INDICATOR_TOP_LEFT_LARGER_SQUARE:
drw_rect(drw, x + boxs + 2, boxs+1, boxw+1, boxw+1, filled, invert); drw_rect(drw, x + boxs + 2, y + boxs+1, boxw+1, boxw+1, filled, invert);
break; break;
case INDICATOR_TOP_BAR: case INDICATOR_TOP_BAR:
drw_rect(drw, x + boxw, 0, w - ( 2 * boxw + 1), boxw/2, filled, invert); drw_rect(drw, x + boxw, y, w - ( 2 * boxw + 1), boxw/2, filled, invert);
break; break;
case INDICATOR_TOP_BAR_SLIM: case INDICATOR_TOP_BAR_SLIM:
drw_rect(drw, x + boxw, 0, w - ( 2 * boxw + 1), 1, 0, invert); drw_rect(drw, x + boxw, y, w - ( 2 * boxw + 1), 1, 0, invert);
break; break;
case INDICATOR_BOTTOM_BAR: case INDICATOR_BOTTOM_BAR:
drw_rect(drw, x + boxw, bh - boxw/2, w - ( 2 * boxw + 1), boxw/2, filled, invert); drw_rect(drw, x + boxw, y + h - boxw/2, w - ( 2 * boxw + 1), boxw/2, filled, invert);
break; break;
case INDICATOR_BOTTOM_BAR_SLIM: case INDICATOR_BOTTOM_BAR_SLIM:
drw_rect(drw, x + boxw, bh - 1, w - ( 2 * boxw + 1), 1, 0, invert); drw_rect(drw, x + boxw, y + h - 1, w - ( 2 * boxw + 1), 1, 0, invert);
break; break;
case INDICATOR_BOX: case INDICATOR_BOX:
drw_rect(drw, x + boxw, 0, w - 2 * boxw, bh, 0, invert); drw_rect(drw, x + boxw, y, w - 2 * boxw, h, 0, invert);
break; break;
case INDICATOR_BOX_WIDER: case INDICATOR_BOX_WIDER:
drw_rect(drw, x + boxw/2, 0, w - boxw, bh, 0, invert); drw_rect(drw, x + boxw/2, y, w - boxw, h, 0, invert);
break; break;
case INDICATOR_BOX_FULL: case INDICATOR_BOX_FULL:
drw_rect(drw, x, 0, w - 2, bh, 0, invert); drw_rect(drw, x, y, w - 2, h, 0, invert);
break; break;
case INDICATOR_CLIENT_DOTS: case INDICATOR_CLIENT_DOTS:
for (c = m->clients; c; c = c->next) { for (c = m->clients; c; c = c->next) {
@ -56,7 +56,7 @@ drawindicator(Monitor *m, Client *c, unsigned int occ, int x, int w, unsigned in
drw_rect(drw, x, 1 + (indn * 2), m->sel == c ? 6 : 1, 1, 1, invert); drw_rect(drw, x, 1 + (indn * 2), m->sel == c ? 6 : 1, 1, 1, invert);
indn++; indn++;
} }
if (bh <= 1 + (indn * 2)) { if (h <= 1 + (indn * 2)) {
indn = 0; indn = 0;
x += 2; x += 2;
} }

View File

@ -13,4 +13,4 @@ enum {
INDICATOR_RIGHT_TAGS INDICATOR_RIGHT_TAGS
}; };
static void drawindicator(Monitor *m, Client *c, unsigned int occ, int x, int w, unsigned int tag, int filled, int invert, int type); static void drawindicator(Monitor *m, Client *c, unsigned int occ, int x, int y, int w, int h, unsigned int tag, int filled, int invert, int type);

View File

@ -1,17 +1,17 @@
int int
width_ltsymbol(Bar *bar, BarWidthArg *a) width_ltsymbol(Bar *bar, BarArg *a)
{ {
return TEXTW(bar->mon->ltsymbol); return TEXTW(bar->mon->ltsymbol);
} }
int int
draw_ltsymbol(Bar *bar, BarDrawArg *a) draw_ltsymbol(Bar *bar, BarArg *a)
{ {
return drw_text(drw, a->x, 0, a->w, bh, lrpad / 2, bar->mon->ltsymbol, 0, False); return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, bar->mon->ltsymbol, 0, False);
} }
int int
click_ltsymbol(Bar *bar, Arg *arg, BarClickArg *a) click_ltsymbol(Bar *bar, Arg *arg, BarArg *a)
{ {
return ClkLtSymbol; return ClkLtSymbol;
} }

View File

@ -1,3 +1,3 @@
static int width_ltsymbol(Bar *bar, BarWidthArg *a); static int width_ltsymbol(Bar *bar, BarArg *a);
static int draw_ltsymbol(Bar *bar, BarDrawArg *a); static int draw_ltsymbol(Bar *bar, BarArg *a);
static int click_ltsymbol(Bar *bar, Arg *arg, BarClickArg *a); static int click_ltsymbol(Bar *bar, Arg *arg, BarArg *a);

View File

@ -1,7 +1,7 @@
static Clr **statusscheme; static Clr **statusscheme;
int int
width_pwrl_status(Bar *bar, BarWidthArg *a) width_pwrl_status(Bar *bar, BarArg *a)
{ {
#if BAR_STATUSCMD_PATCH #if BAR_STATUSCMD_PATCH
return widthpowerlinestatus(rawstext); return widthpowerlinestatus(rawstext);
@ -12,7 +12,7 @@ width_pwrl_status(Bar *bar, BarWidthArg *a)
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
int int
width_pwrl_status_es(Bar *bar, BarWidthArg *a) width_pwrl_status_es(Bar *bar, BarArg *a)
{ {
#if BAR_STATUSCMD_PATCH #if BAR_STATUSCMD_PATCH
return widthpowerlinestatus(rawestext); return widthpowerlinestatus(rawestext);
@ -23,29 +23,29 @@ width_pwrl_status_es(Bar *bar, BarWidthArg *a)
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
int int
draw_pwrl_status(Bar *bar, BarDrawArg *a) draw_pwrl_status(Bar *bar, BarArg *a)
{ {
#if BAR_STATUSCMD_PATCH #if BAR_STATUSCMD_PATCH
return drawpowerlinestatus(a->x + a->w, rawstext); return drawpowerlinestatus(a->x + a->w, rawstext, a);
#else #else
return drawpowerlinestatus(a->x + a->w, stext); return drawpowerlinestatus(a->x + a->w, stext, a);
#endif // BAR_STATUSCMD_PATCH #endif // BAR_STATUSCMD_PATCH
} }
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
int int
draw_pwrl_status_es(Bar *bar, BarDrawArg *a) draw_pwrl_status_es(Bar *bar, BarArg *a)
{ {
#if BAR_STATUSCMD_PATCH #if BAR_STATUSCMD_PATCH
return drawpowerlinestatus(a->x + a->w, rawestext); return drawpowerlinestatus(a->x + a->w, rawestext, a);
#else #else
return drawpowerlinestatus(a->x + a->w, estext); return drawpowerlinestatus(a->x + a->w, estext, a);
#endif // BAR_STATUSCMD_PATCH #endif // BAR_STATUSCMD_PATCH
} }
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
int int
click_pwrl_status(Bar *bar, Arg *arg, BarClickArg *a) click_pwrl_status(Bar *bar, Arg *arg, BarArg *a)
{ {
return ClkStatusText; return ClkStatusText;
} }
@ -75,7 +75,7 @@ widthpowerlinestatus(char *stext)
} }
int int
drawpowerlinestatus(int xpos, char *stext) drawpowerlinestatus(int xpos, char *stext, BarArg *barg)
{ {
char status[512]; char status[512];
int i, n = strlen(stext), cn = 0; int i, n = strlen(stext), cn = 0;
@ -96,13 +96,13 @@ drawpowerlinestatus(int xpos, char *stext)
} }
if (bp != '|') { if (bp != '|') {
drw_arrow(drw, x - plw, 0, plw, bh, bp == '\\' || bp == '>' ? 1 : 0, bp == '<' ? 0 : 1); drw_arrow(drw, x - plw, barg->y, plw, barg->h, bp == '\\' || bp == '>' ? 1 : 0, bp == '<' ? 0 : 1);
x -= plw; x -= plw;
} }
drw_setscheme(drw, nxtscheme); drw_setscheme(drw, nxtscheme);
w = TEXTW(bs+2); w = TEXTW(bs+2);
drw_text(drw, x - w, 0, w, bh, lrpad / 2, bs+2, 0, False); drw_text(drw, x - w, barg->y, w, barg->h, lrpad / 2, bs+2, 0, False);
x -= w; x -= w;
bp = *bs; bp = *bs;
@ -112,8 +112,8 @@ drawpowerlinestatus(int xpos, char *stext)
} }
if (bp != '|') { if (bp != '|') {
drw_settrans(drw, prevscheme, scheme[SchemeNorm]); drw_settrans(drw, prevscheme, scheme[SchemeNorm]);
drw_arrow(drw, x - plw, 0, plw, bh, bp == '\\' || bp == '>' ? 1 : 0, bp == '<' ? 0 : 1); drw_arrow(drw, x - plw, barg->y, plw, barg->h, bp == '\\' || bp == '>' ? 1 : 0, bp == '<' ? 0 : 1);
drw_rect(drw, x - 2 * plw, 0, plw, bh, 1, 1); drw_rect(drw, x - 2 * plw, barg->y, plw, barg->h, 1, 1);
x -= plw * 2; x -= plw * 2;
} }

View File

@ -1,11 +1,11 @@
static int width_pwrl_status(Bar *bar, BarWidthArg *a); static int width_pwrl_status(Bar *bar, BarArg *a);
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
static int width_pwrl_status_es(Bar *bar, BarWidthArg *a); static int width_pwrl_status_es(Bar *bar, BarArg *a);
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
static int draw_pwrl_status(Bar *bar, BarDrawArg *a); static int draw_pwrl_status(Bar *bar, BarArg *a);
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
static int draw_pwrl_status_es(Bar *bar, BarDrawArg *a); static int draw_pwrl_status_es(Bar *bar, BarArg *a);
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
static int click_pwrl_status(Bar *bar, Arg *arg, BarClickArg *a); static int click_pwrl_status(Bar *bar, Arg *arg, BarArg *a);
static int drawpowerlinestatus(int x, char *stext); static int drawpowerlinestatus(int x, char *stext, BarArg *a);
static int widthpowerlinestatus(char *stext); static int widthpowerlinestatus(char *stext);

View File

@ -1,5 +1,5 @@
int int
width_pwrl_tags(Bar *bar, BarWidthArg *a) width_pwrl_tags(Bar *bar, BarArg *a)
{ {
int w, i; int w, i;
int plw = drw->fonts->h / 2 + 1; int plw = drw->fonts->h / 2 + 1;
@ -21,7 +21,7 @@ width_pwrl_tags(Bar *bar, BarWidthArg *a)
} }
int int
draw_pwrl_tags(Bar *bar, BarDrawArg *a) draw_pwrl_tags(Bar *bar, BarArg *a)
{ {
int x, w; int x, w;
int invert; int invert;
@ -54,14 +54,14 @@ draw_pwrl_tags(Bar *bar, BarDrawArg *a)
w = TEXTW(icon); w = TEXTW(icon);
drw_settrans(drw, prevscheme, (nxtscheme = scheme[bar->mon->tagset[bar->mon->seltags] & 1 << i ? SchemeSel : SchemeNorm])); drw_settrans(drw, prevscheme, (nxtscheme = scheme[bar->mon->tagset[bar->mon->seltags] & 1 << i ? SchemeSel : SchemeNorm]));
#if BAR_POWERLINE_TAGS_SLASH_PATCH #if BAR_POWERLINE_TAGS_SLASH_PATCH
drw_arrow(drw, x, 0, plw, bh, 1, 1); drw_arrow(drw, x, a->y, plw, a->h, 1, 1);
#else #else
drw_arrow(drw, x, 0, plw, bh, 1, 0); drw_arrow(drw, x, a->y, plw, a->h, 1, 0);
#endif // BAR_POWERLINE_TAGS_SLASH_PATCH #endif // BAR_POWERLINE_TAGS_SLASH_PATCH
x += plw; x += plw;
drw_setscheme(drw, nxtscheme); drw_setscheme(drw, nxtscheme);
drw_text(drw, x, 0, w, bh, lrpad / 2, icon, invert, False); drw_text(drw, x, a->y, w, a->h, lrpad / 2, icon, invert, False);
drawindicator(bar->mon, NULL, occ, x, w, i, -1, invert, tagindicatortype); drawindicator(bar->mon, NULL, occ, x, a->y, w, a->h, i, -1, invert, tagindicatortype);
x += w; x += w;
prevscheme = nxtscheme; prevscheme = nxtscheme;
} }
@ -69,15 +69,15 @@ draw_pwrl_tags(Bar *bar, BarDrawArg *a)
drw_settrans(drw, prevscheme, nxtscheme); drw_settrans(drw, prevscheme, nxtscheme);
#if BAR_POWERLINE_TAGS_SLASH_PATCH #if BAR_POWERLINE_TAGS_SLASH_PATCH
drw_arrow(drw, x, 0, plw, bh, 1, 1); drw_arrow(drw, x, a->y, plw, a->h, 1, 1);
#else #else
drw_arrow(drw, x, 0, plw, bh, 1, 0); drw_arrow(drw, x, a->y, plw, a->h, 1, 0);
#endif // BAR_POWERLINE_TAGS_SLASH_PATCH #endif // BAR_POWERLINE_TAGS_SLASH_PATCH
return 1; return 1;
} }
int int
click_pwrl_tags(Bar *bar, Arg *arg, BarClickArg *a) click_pwrl_tags(Bar *bar, Arg *arg, BarArg *a)
{ {
int i = 0, x = lrpad / 2; int i = 0, x = lrpad / 2;
int plw = drw->fonts->h / 2 + 1; int plw = drw->fonts->h / 2 + 1;
@ -94,7 +94,7 @@ click_pwrl_tags(Bar *bar, Arg *arg, BarClickArg *a)
continue; continue;
#endif // BAR_HIDEVACANTTAGS_PATCH #endif // BAR_HIDEVACANTTAGS_PATCH
x += TEXTW(tagicon(bar->mon, i)) + plw; x += TEXTW(tagicon(bar->mon, i)) + plw;
} while (a->rel_x >= x && ++i < NUMTAGS); } while (a->x >= x && ++i < NUMTAGS);
if (i < NUMTAGS) { if (i < NUMTAGS) {
arg->ui = 1 << i; arg->ui = 1 << i;
} }

View File

@ -1,3 +1,3 @@
static int width_pwrl_tags(Bar *bar, BarWidthArg *a); static int width_pwrl_tags(Bar *bar, BarArg *a);
static int draw_pwrl_tags(Bar *bar, BarDrawArg *a); static int draw_pwrl_tags(Bar *bar, BarArg *a);
static int click_pwrl_tags(Bar *bar, Arg *arg, BarClickArg *a); static int click_pwrl_tags(Bar *bar, Arg *arg, BarArg *a);

View File

@ -1,33 +1,33 @@
int int
width_status(Bar *bar, BarWidthArg *a) width_status(Bar *bar, BarArg *a)
{ {
return TEXTWM(stext); return TEXTWM(stext);
} }
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
int int
width_status_es(Bar *bar, BarWidthArg *a) width_status_es(Bar *bar, BarArg *a)
{ {
return TEXTWM(estext) - lrpad; return TEXTWM(estext) - lrpad;
} }
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
int int
draw_status(Bar *bar, BarDrawArg *a) draw_status(Bar *bar, BarArg *a)
{ {
return drw_text(drw, a->x, 0, a->w, bh, lrpad / 2, stext, 0, True); return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, stext, 0, True);
} }
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
int int
draw_status_es(Bar *bar, BarDrawArg *a) draw_status_es(Bar *bar, BarArg *a)
{ {
return drw_text(drw, a->x, 0, a->w, bh, 0, estext, 0, True); return drw_text(drw, a->x, a->y, a->w, a->h, 0, estext, 0, True);
} }
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
int int
click_status(Bar *bar, Arg *arg, BarClickArg *a) click_status(Bar *bar, Arg *arg, BarArg *a)
{ {
return ClkStatusText; return ClkStatusText;
} }

View File

@ -1,9 +1,9 @@
static int width_status(Bar *bar, BarWidthArg *a); static int width_status(Bar *bar, BarArg *a);
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
static int width_status_es(Bar *bar, BarWidthArg *a); static int width_status_es(Bar *bar, BarArg *a);
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
static int draw_status(Bar *bar, BarDrawArg *a); static int draw_status(Bar *bar, BarArg *a);
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
static int draw_status_es(Bar *bar, BarDrawArg *a); static int draw_status_es(Bar *bar, BarArg *a);
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
static int click_status(Bar *bar, Arg *arg, BarClickArg *a); static int click_status(Bar *bar, Arg *arg, BarArg *a);

View File

@ -22,7 +22,7 @@ static char *termcolor[] = {
#endif // BAR_STATUS2D_XRDB_TERMCOLORS_PATCH #endif // BAR_STATUS2D_XRDB_TERMCOLORS_PATCH
int int
width_status2d(Bar *bar, BarWidthArg *a) width_status2d(Bar *bar, BarArg *a)
{ {
int width; int width;
#if BAR_EXTRASTATUS_PATCH || BAR_STATUSCMD_PATCH #if BAR_EXTRASTATUS_PATCH || BAR_STATUSCMD_PATCH
@ -35,7 +35,7 @@ width_status2d(Bar *bar, BarWidthArg *a)
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
int int
width_status2d_es(Bar *bar, BarWidthArg *a) width_status2d_es(Bar *bar, BarArg *a)
{ {
int width; int width;
#if BAR_STATUSCMD_PATCH #if BAR_STATUSCMD_PATCH
@ -48,39 +48,41 @@ width_status2d_es(Bar *bar, BarWidthArg *a)
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
int int
draw_status2d(Bar *bar, BarDrawArg *a) draw_status2d(Bar *bar, BarArg *a)
{ {
#if BAR_EXTRASTATUS_PATCH || BAR_STATUSCMD_PATCH #if BAR_EXTRASTATUS_PATCH || BAR_STATUSCMD_PATCH
return drawstatusbar(a->x, rawstext); return drawstatusbar(a, rawstext);
#else #else
return drawstatusbar(a->x, stext); return drawstatusbar(a, stext);
#endif // #if BAR_EXTRASTATUS_PATCH | BAR_STATUSCMD_PATCH #endif // #if BAR_EXTRASTATUS_PATCH | BAR_STATUSCMD_PATCH
} }
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
int int
draw_status2d_es(Bar *bar, BarDrawArg *a) draw_status2d_es(Bar *bar, BarArg *a)
{ {
#if BAR_STATUSCMD_PATCH #if BAR_STATUSCMD_PATCH
return drawstatusbar(a->x, rawestext); return drawstatusbar(a, rawestext);
#else #else
return drawstatusbar(a->x, estext); return drawstatusbar(a, estext);
#endif // BAR_STATUSCMD_PATCH #endif // BAR_STATUSCMD_PATCH
} }
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
#if !BAR_STATUSCMD_PATCH #if !BAR_STATUSCMD_PATCH
int int
click_status2d(Bar *bar, Arg *arg, BarClickArg *a) click_status2d(Bar *bar, Arg *arg, BarArg *a)
{ {
return ClkStatusText; return ClkStatusText;
} }
#endif // BAR_STATUSCMD_PATCH #endif // BAR_STATUSCMD_PATCH
int int
drawstatusbar(int x, char* stext) drawstatusbar(BarArg *a, char* stext)
{ {
int i, w, len; int i, w, len;
int x = a->x;
int y = a->y;
short isCode = 0; short isCode = 0;
char *text; char *text;
char *p; char *p;
@ -108,7 +110,7 @@ drawstatusbar(int x, char* stext)
text[i] = '\0'; text[i] = '\0';
w = TEXTWM(text) - lrpad; w = TEXTWM(text) - lrpad;
drw_text(drw, x, 0, w, bh, 0, text, 0, True); drw_text(drw, x, y, w, bh, 0, text, 0, True);
x += w; x += w;
@ -194,7 +196,7 @@ drawstatusbar(int x, char* stext)
if (rx < 0) if (rx < 0)
rx = 0; rx = 0;
drw_rect(drw, rx + x, ry, rw, rh, 1, 0); drw_rect(drw, rx + x, y + ry, rw, rh, 1, 0);
} else if (text[i] == 'f') { } else if (text[i] == 'f') {
x += atoi(text + ++i); x += atoi(text + ++i);
} }
@ -207,7 +209,7 @@ drawstatusbar(int x, char* stext)
} }
if (!isCode) { if (!isCode) {
w = TEXTWM(text) - lrpad; w = TEXTWM(text) - lrpad;
drw_text(drw, x, 0, w, bh, 0, text, 0, True); drw_text(drw, x, y, w, bh, 0, text, 0, True);
x += w; x += w;
} }
free(p); free(p);

View File

@ -1,13 +1,13 @@
static int width_status2d(Bar *bar, BarWidthArg *a); static int width_status2d(Bar *bar, BarArg *a);
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
static int width_status2d_es(Bar *bar, BarWidthArg *a); static int width_status2d_es(Bar *bar, BarArg *a);
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
static int draw_status2d(Bar *bar, BarDrawArg *a); static int draw_status2d(Bar *bar, BarArg *a);
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
static int draw_status2d_es(Bar *bar, BarDrawArg *a); static int draw_status2d_es(Bar *bar, BarArg *a);
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
#if !BAR_STATUSCMD_PATCH #if !BAR_STATUSCMD_PATCH
static int click_status2d(Bar *bar, Arg *arg, BarClickArg *a); static int click_status2d(Bar *bar, Arg *arg, BarArg *a);
#endif // BAR_STATUSCMD_PATCH #endif // BAR_STATUSCMD_PATCH
static int drawstatusbar(int x, char *text); static int drawstatusbar(BarArg *a, char *text);
static int status2dtextlength(char *stext); static int status2dtextlength(char *stext);

View File

@ -1,17 +1,17 @@
int int
width_stbutton(Bar *bar, BarWidthArg *a) width_stbutton(Bar *bar, BarArg *a)
{ {
return TEXTW(buttonbar); return TEXTW(buttonbar);
} }
int int
draw_stbutton(Bar *bar, BarDrawArg *a) draw_stbutton(Bar *bar, BarArg *a)
{ {
return drw_text(drw, a->x, 0, a->w, bh, lrpad / 2, buttonbar, 0, False); return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar, 0, False);
} }
int int
click_stbutton(Bar *bar, Arg *arg, BarClickArg *a) click_stbutton(Bar *bar, Arg *arg, BarArg *a)
{ {
return ClkButton; return ClkButton;
} }

View File

@ -1,3 +1,3 @@
static int width_stbutton(Bar *bar, BarWidthArg *a); static int width_stbutton(Bar *bar, BarArg *a);
static int draw_stbutton(Bar *bar, BarDrawArg *a); static int draw_stbutton(Bar *bar, BarArg *a);
static int click_stbutton(Bar *bar, Arg *arg, BarClickArg *a); static int click_stbutton(Bar *bar, Arg *arg, BarArg *a);

View File

@ -5,16 +5,16 @@ static int lastbutton;
#endif // BAR_DWMBLOCKS_PATCH #endif // BAR_DWMBLOCKS_PATCH
int int
click_statuscmd(Bar *bar, Arg *arg, BarClickArg *a) click_statuscmd(Bar *bar, Arg *arg, BarArg *a)
{ {
return click_statuscmd_text(arg, a->rel_x, rawstext); return click_statuscmd_text(arg, a->x, rawstext);
} }
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
int int
click_statuscmd_es(Bar *bar, Arg *arg, BarClickArg *a) click_statuscmd_es(Bar *bar, Arg *arg, BarArg *a)
{ {
return click_statuscmd_text(arg, a->rel_x, rawestext); return click_statuscmd_text(arg, a->x, rawestext);
} }
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH

View File

@ -1,6 +1,6 @@
static int click_statuscmd(Bar *bar, Arg *arg, BarClickArg *a); static int click_statuscmd(Bar *bar, Arg *arg, BarArg *a);
#if BAR_EXTRASTATUS_PATCH #if BAR_EXTRASTATUS_PATCH
static int click_statuscmd_es(Bar *bar, Arg *arg, BarClickArg *a); static int click_statuscmd_es(Bar *bar, Arg *arg, BarArg *a);
#endif // BAR_EXTRASTATUS_PATCH #endif // BAR_EXTRASTATUS_PATCH
static int click_statuscmd_text(Arg *arg, int rel_x, char *text); static int click_statuscmd_text(Arg *arg, int rel_x, char *text);
static void copyvalidchars(char *text, char *rawtext); static void copyvalidchars(char *text, char *rawtext);

View File

@ -2,7 +2,7 @@ static Systray *systray = NULL;
static unsigned long systrayorientation = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; static unsigned long systrayorientation = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
int int
width_systray(Bar *bar, BarWidthArg *a) width_systray(Bar *bar, BarArg *a)
{ {
unsigned int w = 0; unsigned int w = 0;
Client *i; Client *i;
@ -14,7 +14,7 @@ width_systray(Bar *bar, BarWidthArg *a)
} }
int int
draw_systray(Bar *bar, BarDrawArg *a) draw_systray(Bar *bar, BarArg *a)
{ {
if (!showsystray) if (!showsystray)
return 0; return 0;
@ -34,12 +34,12 @@ draw_systray(Bar *bar, BarDrawArg *a)
#if BAR_ALPHA_PATCH #if BAR_ALPHA_PATCH
wa.background_pixel = 0; wa.background_pixel = 0;
wa.colormap = cmap; wa.colormap = cmap;
systray->win = XCreateWindow(dpy, root, bar->bx + a->x + lrpad / 2, bar->by, MAX(a->w + 40, 1), bar->bh, 0, depth, systray->win = XCreateWindow(dpy, root, bar->bx + a->x + lrpad / 2, bar->by + a->y, MAX(a->w + 40, 1), a->h, 0, depth,
InputOutput, visual, InputOutput, visual,
CWOverrideRedirect|CWBorderPixel|CWBackPixel|CWColormap|CWEventMask, &wa); // CWBackPixmap CWOverrideRedirect|CWBorderPixel|CWBackPixel|CWColormap|CWEventMask, &wa); // CWBackPixmap
#else #else
wa.background_pixel = scheme[SchemeNorm][ColBg].pixel; wa.background_pixel = scheme[SchemeNorm][ColBg].pixel;
systray->win = XCreateSimpleWindow(dpy, root, bar->bx + a->x + lrpad / 2, bar->by, MIN(a->w, 1), bar->bh, 0, 0, scheme[SchemeNorm][ColBg].pixel); systray->win = XCreateSimpleWindow(dpy, root, bar->bx + a->x + lrpad / 2, bar->by + a->y, MIN(a->w, 1), a->h, 0, 0, scheme[SchemeNorm][ColBg].pixel);
XChangeWindowAttributes(dpy, systray->win, CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWEventMask, &wa); XChangeWindowAttributes(dpy, systray->win, CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWEventMask, &wa);
#endif // BAR_ALPHA_PATCH #endif // BAR_ALPHA_PATCH
@ -85,12 +85,12 @@ draw_systray(Bar *bar, BarDrawArg *a)
i->mon = bar->mon; i->mon = bar->mon;
} }
XMoveResizeWindow(dpy, systray->win, bar->bx + a->x + lrpad / 2, (w ? bar->by : -bar->by), MAX(w, 1), bar->bh); XMoveResizeWindow(dpy, systray->win, bar->bx + a->x + lrpad / 2, (w ? bar->by + a->y : -bar->by - a->y), MAX(w, 1), a->h);
return w; return w;
} }
int int
click_systray(Bar *bar, Arg *arg, BarClickArg *a) click_systray(Bar *bar, Arg *arg, BarArg *a)
{ {
return -1; return -1;
} }
@ -124,25 +124,29 @@ resizerequest(XEvent *e)
void void
updatesystrayicongeom(Client *i, int w, int h) updatesystrayicongeom(Client *i, int w, int h)
{ {
if (!systray)
return;
int bar_height = systray->bar->bh - 2 * systray->bar->borderpx;
if (i) { if (i) {
i->h = bh; i->h = bar_height;
if (w == h) if (w == h)
i->w = bh; i->w = bar_height;
else if (h == bh) else if (h == bar_height)
i->w = w; i->w = w;
else else
i->w = (int) ((float)bh * ((float)w / (float)h)); i->w = (int) ((float)bar_height * ((float)w / (float)h));
applysizehints(i, &(i->x), &(i->y), &(i->w), &(i->h), False); applysizehints(i, &(i->x), &(i->y), &(i->w), &(i->h), False);
/* force icons into the systray dimensions if they don't want to */ /* force icons into the systray dimensions if they don't want to */
if (i->h > bh) { if (i->h > bar_height) {
if (i->w == i->h) if (i->w == i->h)
i->w = bh; i->w = bar_height;
else else
i->w = (int) ((float)bh * ((float)i->w / (float)i->h)); i->w = (int) ((float)bar_height * ((float)i->w / (float)i->h));
i->h = bh; i->h = bar_height;
} }
if (i->w > 2*bh) if (i->w > 2 * bar_height)
i->w = bh; i->w = bar_height;
} }
} }

View File

@ -26,9 +26,9 @@ struct Systray {
}; };
/* bar integration */ /* bar integration */
static int width_systray(Bar *bar, BarWidthArg *a); static int width_systray(Bar *bar, BarArg *a);
static int draw_systray(Bar *bar, BarDrawArg *a); static int draw_systray(Bar *bar, BarArg *a);
static int click_systray(Bar *bar, Arg *arg, BarClickArg *a); static int click_systray(Bar *bar, Arg *arg, BarArg *a);
/* function declarations */ /* function declarations */
static Atom getatomprop(Client *c, Atom prop); static Atom getatomprop(Client *c, Atom prop);

View File

@ -16,27 +16,27 @@
#endif #endif
int int
width_bartabgroups(Bar *bar, BarWidthArg *a) width_bartabgroups(Bar *bar, BarArg *a)
{ {
return a->max_width; return a->w;
} }
int int
draw_bartabgroups(Bar *bar, BarDrawArg *a) draw_bartabgroups(Bar *bar, BarArg *a)
{ {
drw_rect(drw, a->x, 0, a->w, bh, 1, 1); drw_rect(drw, a->x, a->y, a->w, a->h, 1, 1);
return bartabcalculate(bar->mon, a->x, a->w, -1, bartabdraw, NULL); return bartabcalculate(bar->mon, a->x, a->w, -1, bartabdraw, NULL, a);
} }
int int
click_bartabgroups(Bar *bar, Arg *arg, BarClickArg *a) click_bartabgroups(Bar *bar, Arg *arg, BarArg *a)
{ {
bartabcalculate(bar->mon, 0, a->rel_w, a->rel_x, bartabclick, arg); bartabcalculate(bar->mon, 0, a->w, a->x, bartabclick, arg, a);
return ClkWinTitle; return ClkWinTitle;
} }
void void
bartabdraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg *arg) bartabdraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg *arg, BarArg *barg)
{ {
if (!c) if (!c)
return; return;
@ -59,14 +59,14 @@ bartabdraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg
pad = (w - TEXTW(c->name) + lrpad) / 2; pad = (w - TEXTW(c->name) + lrpad) / 2;
#endif // BAR_CENTEREDWINDOWNAME_PATCH #endif // BAR_CENTEREDWINDOWNAME_PATCH
drw_text(drw, x, 0, w, bh, pad, c->name, 0, False); drw_text(drw, x, barg->y, w, barg->h, pad, c->name, 0, False);
if (c->isfloating) if (c->isfloating)
drawindicator(m, c, 1, x, w, 0, 0, c->isfixed, floatindicatortype); drawindicator(m, c, 1, x, barg->y, w, barg->h, 0, 0, c->isfixed, floatindicatortype);
if (BARTAB_BORDERS) { if (BARTAB_BORDERS) {
XSetForeground(drw->dpy, drw->gc, scheme[SchemeSel][ColBorder].pixel); XSetForeground(drw->dpy, drw->gc, scheme[SchemeSel][ColBorder].pixel);
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, 0, 1, bh); XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, barg->y, 1, barg->h);
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x + w, 0, 1, bh); XFillRectangle(drw->dpy, drw->drawable, drw->gc, x + w - (x + w >= barg->w ? 1 : 0), barg->y, 1, barg->h);
} }
/* Optional tags icons */ /* Optional tags icons */
for (i = 0; i < NUMTAGS; i++) { for (i = 0; i < NUMTAGS; i++) {
@ -77,7 +77,7 @@ bartabdraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg
} }
if (TAGSINDICATOR == 2 || nclienttags > 1 || nviewtags > 1) if (TAGSINDICATOR == 2 || nclienttags > 1 || nviewtags > 1)
drawindicator(m, c, 1, x, w, 0, 0, 0, INDICATOR_RIGHT_TAGS); drawindicator(m, c, 1, x, barg->y, w, barg->h, 0, 0, 0, INDICATOR_RIGHT_TAGS);
} }
#ifndef HIDDEN #ifndef HIDDEN
@ -85,7 +85,7 @@ bartabdraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg
#endif #endif
void void
bartabclick(Monitor *m, Client *c, int passx, int x, int w, int unused, Arg *arg) bartabclick(Monitor *m, Client *c, int passx, int x, int w, int unused, Arg *arg, BarArg *barg)
{ {
if (passx >= x && passx <= x + w) if (passx >= x && passx <= x + w)
arg->v = c; arg->v = c;
@ -94,7 +94,8 @@ bartabclick(Monitor *m, Client *c, int passx, int x, int w, int unused, Arg *arg
int int
bartabcalculate( bartabcalculate(
Monitor *m, int offx, int tabw, int passx, Monitor *m, int offx, int tabw, int passx,
void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg), Arg *arg void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg),
Arg *arg, BarArg *barg
) { ) {
Client *c; Client *c;
int int
@ -141,7 +142,7 @@ bartabcalculate(
for (c = m->clients, i = 0; c; c = c->next) { for (c = m->clients, i = 0; c; c = c->next) {
if (!ISVISIBLE(c)) if (!ISVISIBLE(c))
continue; continue;
tabfn(m, c, passx, x, w + (i < r ? 1 : 0), tgactive, arg); tabfn(m, c, passx, x, w + (i < r ? 1 : 0), tgactive, arg, barg);
x += w + (i < r ? 1 : 0); x += w + (i < r ? 1 : 0);
i++; i++;
} }
@ -153,7 +154,7 @@ bartabcalculate(
for (c = m->clients, i = 0; c; c = c->next) { for (c = m->clients, i = 0; c; c = c->next) {
if (!ISVISIBLE(c) || (c->isfloating && !HIDDEN(c))) if (!ISVISIBLE(c) || (c->isfloating && !HIDDEN(c)))
continue; continue;
tabfn(m, c, passx, x, w + (i < r ? 1 : 0), tgactive, arg); tabfn(m, c, passx, x, w + (i < r ? 1 : 0), tgactive, arg, barg);
x += w + (i < r ? 1 : 0); x += w + (i < r ? 1 : 0);
i++; i++;
} }
@ -172,7 +173,7 @@ bartabcalculate(
for (; c && i < m->nmaster; c = c->next) { // tiled master for (; c && i < m->nmaster; c = c->next) { // tiled master
if (!ISVISIBLE(c) || c->isfloating || HIDDEN(c)) if (!ISVISIBLE(c) || c->isfloating || HIDDEN(c))
continue; continue;
tabfn(m, c, passx, x, w + (i < r ? 1 : 0), tgactive, arg); tabfn(m, c, passx, x, w + (i < r ? 1 : 0), tgactive, arg, barg);
x += w + (i < r ? 1 : 0); x += w + (i < r ? 1 : 0);
i++; i++;
} }
@ -190,7 +191,7 @@ bartabcalculate(
for (; c; c = c->next) { // tiled stack for (; c; c = c->next) { // tiled stack
if (!ISVISIBLE(c) || HIDDEN(c) || c->isfloating) if (!ISVISIBLE(c) || HIDDEN(c) || c->isfloating)
continue; continue;
tabfn(m, c, passx, x, w * BARTAB_STACKWEIGHT + (i - m->nmaster < r ? 1 : 0), tgactive, arg); tabfn(m, c, passx, x, w * BARTAB_STACKWEIGHT + (i - m->nmaster < r ? 1 : 0), tgactive, arg, barg);
x += w * BARTAB_STACKWEIGHT + (i - m->nmaster < r ? 1 : 0); x += w * BARTAB_STACKWEIGHT + (i - m->nmaster < r ? 1 : 0);
i++; i++;
} }
@ -200,7 +201,7 @@ bartabcalculate(
for (c = m->clients; c; c = c->next) { // hidden windows for (c = m->clients; c; c = c->next) { // hidden windows
if (!ISVISIBLE(c) || !HIDDEN(c)) if (!ISVISIBLE(c) || !HIDDEN(c))
continue; continue;
tabfn(m, c, passx, x, w * BARTAB_HIDDENWEIGHT + (i - m->nmaster < r ? 1 : 0), tgactive, arg); tabfn(m, c, passx, x, w * BARTAB_HIDDENWEIGHT + (i - m->nmaster < r ? 1 : 0), tgactive, arg, barg);
x += w * BARTAB_HIDDENWEIGHT + (i - m->nmaster < r ? 1 : 0); x += w * BARTAB_HIDDENWEIGHT + (i - m->nmaster < r ? 1 : 0);
i++; i++;
} }
@ -210,7 +211,7 @@ bartabcalculate(
for (c = m->clients; c; c = c->next) { // floating windows for (c = m->clients; c; c = c->next) { // floating windows
if (!ISVISIBLE(c) || HIDDEN(c) || !c->isfloating) if (!ISVISIBLE(c) || HIDDEN(c) || !c->isfloating)
continue; continue;
tabfn(m, c, passx, x, w * BARTAB_FLOATWEIGHT + (i - m->nmaster < r ? 1 : 0), tgactive, arg); tabfn(m, c, passx, x, w * BARTAB_FLOATWEIGHT + (i - m->nmaster < r ? 1 : 0), tgactive, arg, barg);
x += w * BARTAB_FLOATWEIGHT + (i - m->nmaster < r ? 1 : 0); x += w * BARTAB_FLOATWEIGHT + (i - m->nmaster < r ? 1 : 0);
i++; i++;
} }

View File

@ -1,7 +1,7 @@
static int width_bartabgroups(Bar *bar, BarWidthArg *a); static int width_bartabgroups(Bar *bar, BarArg *a);
static int draw_bartabgroups(Bar *bar, BarDrawArg *a); static int draw_bartabgroups(Bar *bar, BarArg *a);
static int click_bartabgroups(Bar *bar, Arg *arg, BarClickArg *a); static int click_bartabgroups(Bar *bar, Arg *arg, BarArg *a);
static void bartabdraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg *arg); static void bartabdraw(Monitor *m, Client *c, int unused, int x, int w, int groupactive, Arg *arg, BarArg *barg);
static void bartabclick(Monitor *m, Client *c, int passx, int x, int w, int unused, Arg *arg); static void bartabclick(Monitor *m, Client *c, int passx, int x, int w, int unused, Arg *arg, BarArg *barg);
static int bartabcalculate(Monitor *m, int offx, int w, int passx, void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg), Arg *arg); static int bartabcalculate(Monitor *m, int offx, int w, int passx, void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg), Arg *arg, BarArg *barg);

View File

@ -1,11 +1,11 @@
int int
width_taggrid(Bar *bar, BarWidthArg *a) width_taggrid(Bar *bar, BarArg *a)
{ {
return (bh / 2) * (NUMTAGS / tagrows + ((NUMTAGS % tagrows > 0) ? 1 : 0)) + lrpad; return (a->h / 2) * (NUMTAGS / tagrows + ((NUMTAGS % tagrows > 0) ? 1 : 0)) + lrpad;
} }
int int
draw_taggrid(Bar *bar, BarDrawArg *a) draw_taggrid(Bar *bar, BarArg *a)
{ {
unsigned int x, y, h, max_x = 0, columns, occ = 0; unsigned int x, y, h, max_x = 0, columns, occ = 0;
int invert, i,j, k; int invert, i,j, k;
@ -15,13 +15,13 @@ draw_taggrid(Bar *bar, BarDrawArg *a)
occ |= c->tags; occ |= c->tags;
max_x = x = a->x + lrpad / 2; max_x = x = a->x + lrpad / 2;
h = bh / tagrows; h = a->h / tagrows - 1;
y = 0; y = a->y;
columns = NUMTAGS / tagrows + ((NUMTAGS % tagrows > 0) ? 1 : 0); columns = NUMTAGS / tagrows + ((NUMTAGS % tagrows > 0) ? 1 : 0);
/* Firstly we will fill the borders of squares */ /* Firstly we will fill the borders of squares */
XSetForeground(drw->dpy, drw->gc, scheme[SchemeTagsNorm][ColBg].pixel); XSetForeground(drw->dpy, drw->gc, scheme[SchemeTagsNorm][ColBg].pixel);
XFillRectangle(dpy, drw->drawable, drw->gc, x, y, h*columns + 1, bh); XFillRectangle(dpy, drw->drawable, drw->gc, x, y, h*columns + 1, a->h);
/* We will draw NUMTAGS squares in tagraws raws. */ /* We will draw NUMTAGS squares in tagraws raws. */
for (j = 0, i = 0; j < tagrows; j++) { for (j = 0, i = 0; j < tagrows; j++) {
@ -57,12 +57,13 @@ draw_taggrid(Bar *bar, BarDrawArg *a)
} }
int int
click_taggrid(Bar *bar, Arg *arg, BarClickArg *a) click_taggrid(Bar *bar, Arg *arg, BarArg *a)
{ {
unsigned int i, columns; unsigned int i, h, columns;
h = a->h / tagrows - 1;
columns = NUMTAGS / tagrows + ((NUMTAGS % tagrows > 0) ? 1 : 0); columns = NUMTAGS / tagrows + ((NUMTAGS % tagrows > 0) ? 1 : 0);
i = (a->rel_x - lrpad / 2) / (bh / tagrows) + columns * (a->rel_y / (bh / tagrows)); i = (a->x - lrpad / 2) / h + columns * (a->y / h);
if (i >= NUMTAGS) { if (i >= NUMTAGS) {
i = NUMTAGS - 1; i = NUMTAGS - 1;
} }

View File

@ -1,4 +1,4 @@
static int width_taggrid(Bar *bar, BarWidthArg *a); static int width_taggrid(Bar *bar, BarArg *a);
static int draw_taggrid(Bar *bar, BarDrawArg *a); static int draw_taggrid(Bar *bar, BarArg *a);
static int click_taggrid(Bar *bar, Arg *arg, BarClickArg *a); static int click_taggrid(Bar *bar, Arg *arg, BarArg *a);
static void switchtag(const Arg *arg); static void switchtag(const Arg *arg);

View File

@ -1,5 +1,5 @@
int int
width_tags(Bar *bar, BarWidthArg *a) width_tags(Bar *bar, BarArg *a)
{ {
int w, i; int w, i;
#if BAR_HIDEVACANTTAGS_PATCH #if BAR_HIDEVACANTTAGS_PATCH
@ -20,7 +20,7 @@ width_tags(Bar *bar, BarWidthArg *a)
} }
int int
draw_tags(Bar *bar, BarDrawArg *a) draw_tags(Bar *bar, BarArg *a)
{ {
int invert; int invert;
int w, x = a->x; int w, x = a->x;
@ -55,8 +55,8 @@ draw_tags(Bar *bar, BarDrawArg *a)
? SchemeUrg ? SchemeUrg
: SchemeTagsNorm : SchemeTagsNorm
]); ]);
drw_text(drw, x, 0, w, bh, lrpad / 2, icon, invert, False); drw_text(drw, x, a->y, w, a->h, lrpad / 2, icon, invert, False);
drawindicator(m, NULL, occ, x, w, i, -1, invert, tagindicatortype); drawindicator(m, NULL, occ, x, a->y, w, a->h, i, -1, invert, tagindicatortype);
x += w; x += w;
} }
@ -64,7 +64,7 @@ draw_tags(Bar *bar, BarDrawArg *a)
} }
int int
click_tags(Bar *bar, Arg *arg, BarClickArg *a) click_tags(Bar *bar, Arg *arg, BarArg *a)
{ {
int i = 0, x = lrpad / 2; int i = 0, x = lrpad / 2;
#if BAR_HIDEVACANTTAGS_PATCH #if BAR_HIDEVACANTTAGS_PATCH
@ -80,7 +80,7 @@ click_tags(Bar *bar, Arg *arg, BarClickArg *a)
continue; continue;
#endif // BAR_HIDEVACANTTAGS_PATCH #endif // BAR_HIDEVACANTTAGS_PATCH
x += TEXTW(tagicon(bar->mon, i)); x += TEXTW(tagicon(bar->mon, i));
} while (a->rel_x >= x && ++i < NUMTAGS); } while (a->x >= x && ++i < NUMTAGS);
if (i < NUMTAGS) { if (i < NUMTAGS) {
arg->ui = 1 << i; arg->ui = 1 << i;
} }

View File

@ -1,3 +1,3 @@
static int width_tags(Bar *bar, BarWidthArg *a); static int width_tags(Bar *bar, BarArg *a);
static int draw_tags(Bar *bar, BarDrawArg *a); static int draw_tags(Bar *bar, BarArg *a);
static int click_tags(Bar *bar, Arg *arg, BarClickArg *a); static int click_tags(Bar *bar, Arg *arg, BarArg *a);

View File

@ -1,11 +1,11 @@
int int
width_wintitle(Bar *bar, BarWidthArg *a) width_wintitle(Bar *bar, BarArg *a)
{ {
return a->max_width; return a->w;
} }
int int
draw_wintitle(Bar *bar, BarDrawArg *a) draw_wintitle(Bar *bar, BarArg *a)
{ {
#if BAR_TITLE_LEFT_PAD_PATCH && BAR_TITLE_RIGHT_PAD_PATCH #if BAR_TITLE_LEFT_PAD_PATCH && BAR_TITLE_RIGHT_PAD_PATCH
int x = a->x + lrpad / 2, w = a->w - lrpad; int x = a->x + lrpad / 2, w = a->w - lrpad;
@ -21,7 +21,7 @@ draw_wintitle(Bar *bar, BarDrawArg *a)
if (!m->sel) { if (!m->sel) {
drw_setscheme(drw, scheme[SchemeTitleNorm]); drw_setscheme(drw, scheme[SchemeTitleNorm]);
drw_rect(drw, x, 0, w, bh, 1, 1); drw_rect(drw, x, a->y, w, a->h, 1, 1);
return 0; return 0;
} }
@ -33,18 +33,18 @@ draw_wintitle(Bar *bar, BarDrawArg *a)
if (TEXTW(m->sel->name) < w) if (TEXTW(m->sel->name) < w)
pad = (w - TEXTW(m->sel->name) + lrpad) / 2; pad = (w - TEXTW(m->sel->name) + lrpad) / 2;
#endif // BAR_CENTEREDWINDOWNAME_PATCH #endif // BAR_CENTEREDWINDOWNAME_PATCH
drw_text(drw, x, 0, w, bh, pad, m->sel->name, 0, False); drw_text(drw, x, a->y, w, a->h, pad, m->sel->name, 0, False);
#if BAR_IGNORE_XFT_ERRORS_WHEN_DRAWING_TEXT_PATCH #if BAR_IGNORE_XFT_ERRORS_WHEN_DRAWING_TEXT_PATCH
XSync(dpy, False); XSync(dpy, False);
XSetErrorHandler(xerror); XSetErrorHandler(xerror);
#endif // BAR_IGNORE_XFT_ERRORS_WHEN_DRAWING_TEXT_PATCH #endif // BAR_IGNORE_XFT_ERRORS_WHEN_DRAWING_TEXT_PATCH
if (m->sel->isfloating) if (m->sel->isfloating)
drawindicator(m, m->sel, 1, x, w, 0, 0, m->sel->isfixed, floatindicatortype); drawindicator(m, m->sel, 1, x, a->y, w, a->h, 0, 0, m->sel->isfixed, floatindicatortype);
return 1; return 1;
} }
int int
click_wintitle(Bar *bar, Arg *arg, BarClickArg *a) click_wintitle(Bar *bar, Arg *arg, BarArg *a)
{ {
return ClkWinTitle; return ClkWinTitle;
} }

View File

@ -1,3 +1,3 @@
static int width_wintitle(Bar *bar, BarWidthArg *a); static int width_wintitle(Bar *bar, BarArg *a);
static int draw_wintitle(Bar *bar, BarDrawArg *a); static int draw_wintitle(Bar *bar, BarArg *a);
static int click_wintitle(Bar *bar, Arg *arg, BarClickArg *a); static int click_wintitle(Bar *bar, Arg *arg, BarArg *a);

View File

@ -1,27 +1,28 @@
int int
width_wintitle_floating(Bar *bar, BarWidthArg *a) width_wintitle_floating(Bar *bar, BarArg *a)
{ {
return a->max_width; return a->w;
} }
int int
draw_wintitle_floating(Bar *bar, BarDrawArg *a) draw_wintitle_floating(Bar *bar, BarArg *a)
{ {
drw_rect(drw, a->x, 0, a->w, bh, 1, 1); drw_rect(drw, a->x, a->y, a->w, a->h, 1, 1);
return calc_wintitle_floating(bar->mon, a->x, a->w, -1, flextitledraw, NULL);; return calc_wintitle_floating(bar->mon, a->x, a->w, -1, flextitledraw, NULL, a);
} }
int int
click_wintitle_floating(Bar *bar, Arg *arg, BarClickArg *a) click_wintitle_floating(Bar *bar, Arg *arg, BarArg *a)
{ {
calc_wintitle_floating(bar->mon, 0, a->rel_w, a->rel_x, flextitleclick, arg); calc_wintitle_floating(bar->mon, 0, a->w, a->x, flextitleclick, arg, a);
return ClkWinTitle; return ClkWinTitle;
} }
int int
calc_wintitle_floating( calc_wintitle_floating(
Monitor *m, int offx, int tabw, int passx, Monitor *m, int offx, int tabw, int passx,
void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg), Arg *arg void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg),
Arg *arg, BarArg *barg
) { ) {
Client *c; Client *c;
int clientsnfloating = 0, w, r; int clientsnfloating = 0, w, r;
@ -39,6 +40,6 @@ calc_wintitle_floating(
w = tabw / clientsnfloating; w = tabw / clientsnfloating;
r = tabw % clientsnfloating; r = tabw % clientsnfloating;
c = flextitledrawarea(m, m->clients, offx, r, w, clientsnfloating, SCHEMEFOR(GRP_FLOAT), 0, 0, 1, passx, tabfn, arg); c = flextitledrawarea(m, m->clients, offx, r, w, clientsnfloating, SCHEMEFOR(GRP_FLOAT), 0, 0, 1, passx, tabfn, arg, barg);
return 1; return 1;
} }

View File

@ -1,7 +1,8 @@
static int width_wintitle_floating(Bar *bar, BarWidthArg *a); static int width_wintitle_floating(Bar *bar, BarArg *a);
static int draw_wintitle_floating(Bar *bar, BarDrawArg *a); static int draw_wintitle_floating(Bar *bar, BarArg *a);
static int click_wintitle_floating(Bar *bar, Arg *arg, BarClickArg *a); static int click_wintitle_floating(Bar *bar, Arg *arg, BarArg *a);
static int calc_wintitle_floating( static int calc_wintitle_floating(
Monitor *m, int offx, int tabw, int passx, Monitor *m, int offx, int tabw, int passx,
void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg), Arg *arg void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg),
Arg *arg, BarArg *barg
); );

View File

@ -1,27 +1,28 @@
int int
width_wintitle_hidden(Bar *bar, BarWidthArg *a) width_wintitle_hidden(Bar *bar, BarArg *a)
{ {
return a->max_width; return a->w;
} }
int int
draw_wintitle_hidden(Bar *bar, BarDrawArg *a) draw_wintitle_hidden(Bar *bar, BarArg *a)
{ {
drw_rect(drw, a->x, 0, a->w, bh, 1, 1); drw_rect(drw, a->x, a->y, a->w, a->h, 1, 1);
return calc_wintitle_hidden(bar->mon, a->x, a->w, -1, flextitledraw, NULL);; return calc_wintitle_hidden(bar->mon, a->x, a->w, -1, flextitledraw, NULL, a);
} }
int int
click_wintitle_hidden(Bar *bar, Arg *arg, BarClickArg *a) click_wintitle_hidden(Bar *bar, Arg *arg, BarArg *a)
{ {
calc_wintitle_hidden(bar->mon, 0, a->rel_w, a->rel_x, flextitleclick, arg); calc_wintitle_hidden(bar->mon, 0, a->w, a->x, flextitleclick, arg, a);
return ClkWinTitle; return ClkWinTitle;
} }
int int
calc_wintitle_hidden( calc_wintitle_hidden(
Monitor *m, int offx, int tabw, int passx, Monitor *m, int offx, int tabw, int passx,
void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg), Arg *arg void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg),
Arg *arg, BarArg *barg
) { ) {
Client *c; Client *c;
int clientsnhidden = 0, w, r; int clientsnhidden = 0, w, r;
@ -39,6 +40,6 @@ calc_wintitle_hidden(
w = tabw / clientsnhidden; w = tabw / clientsnhidden;
r = tabw % clientsnhidden; r = tabw % clientsnhidden;
c = flextitledrawarea(m, m->clients, offx, r, w, clientsnhidden, SCHEMEFOR(GRP_HIDDEN), 0, 1, 0, passx, tabfn, arg); c = flextitledrawarea(m, m->clients, offx, r, w, clientsnhidden, SCHEMEFOR(GRP_HIDDEN), 0, 1, 0, passx, tabfn, arg, barg);
return 1; return 1;
} }

View File

@ -1,7 +1,8 @@
static int width_wintitle_hidden(Bar *bar, BarWidthArg *a); static int width_wintitle_hidden(Bar *bar, BarArg *a);
static int draw_wintitle_hidden(Bar *bar, BarDrawArg *a); static int draw_wintitle_hidden(Bar *bar, BarArg *a);
static int click_wintitle_hidden(Bar *bar, Arg *arg, BarClickArg *a); static int click_wintitle_hidden(Bar *bar, Arg *arg, BarArg *a);
static int calc_wintitle_hidden( static int calc_wintitle_hidden(
Monitor *m, int offx, int tabw, int passx, Monitor *m, int offx, int tabw, int passx,
void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg), Arg *arg void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg),
Arg *arg, BarArg *barg
); );

View File

@ -3,9 +3,11 @@ Layout *last_layout;
void void
fullscreen(const Arg *arg) fullscreen(const Arg *arg)
{ {
int monocle_pos; int monocle_pos = 0;
if (selmon->showbar || last_layout == NULL) { if (selmon->showbar || last_layout == NULL) {
#if MONOCLE_LAYOUT
for (monocle_pos = 0, last_layout = (Layout *)layouts; !last_layout->arrange || last_layout->arrange != &monocle; monocle_pos++, last_layout++ ); for (monocle_pos = 0, last_layout = (Layout *)layouts; !last_layout->arrange || last_layout->arrange != &monocle; monocle_pos++, last_layout++ );
#endif // MONOCLE_LAYOUT
for (last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++); for (last_layout = (Layout *)layouts; last_layout != selmon->lt[selmon->sellt]; last_layout++);
setlayout(&((Arg) { .v = &layouts[monocle_pos] })); setlayout(&((Arg) { .v = &layouts[monocle_pos] }));
} else { } else {

View File

@ -66,7 +66,7 @@ getfactsforrange(Monitor *m, int an, int ai, int size, int *rest, float *fact)
*fact = facts; *fact = facts;
} }
#if DWMC_PATCH #if IPC_PATCH || DWMC_PATCH
static void static void
setlayoutaxisex(const Arg *arg) setlayoutaxisex(const Arg *arg)
{ {
@ -85,7 +85,7 @@ setlayoutaxisex(const Arg *arg)
#endif // PERTAG_PATCH #endif // PERTAG_PATCH
arrange(selmon); arrange(selmon);
} }
#endif // DWMC_PATCH #endif // IPC_PATCH | DWMC_PATCH
static void static void
layout_no_split(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n) layout_no_split(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n)

View File

@ -2,9 +2,9 @@ static void flextile(Monitor *m);
static void getfactsforrange(Monitor *m, int an, int ai, int size, int *rest, float *fact); static void getfactsforrange(Monitor *m, int an, int ai, int size, int *rest, float *fact);
static void mirrorlayout(const Arg *arg); static void mirrorlayout(const Arg *arg);
static void rotatelayoutaxis(const Arg *arg); static void rotatelayoutaxis(const Arg *arg);
#if DWMC_PATCH #if IPC_PATCH || DWMC_PATCH
static void setlayoutaxisex(const Arg *arg); static void setlayoutaxisex(const Arg *arg);
#endif // DWMC_PATCH #endif // IPC_PATCH | DWMC_PATCH
static void incnstack(const Arg *arg); static void incnstack(const Arg *arg);
/* Symbol handlers */ /* Symbol handlers */

View File

@ -1,4 +1,4 @@
# define SCRATCHPAD_MASK (1u << sizeof tags / sizeof * tags) #define SCRATCHPAD_MASK (1u << NUMTAGS)
static void scratchpad_hide (); static void scratchpad_hide ();
static _Bool scratchpad_last_showed_is_killed (void); static _Bool scratchpad_last_showed_is_killed (void);

View File

@ -1,4 +1,4 @@
#if DWMC_PATCH #if IPC_PATCH || DWMC_PATCH
void void
tagnextmonex(const Arg *arg) tagnextmonex(const Arg *arg)
{ {
@ -10,7 +10,7 @@ tagprevmonex(const Arg *arg)
{ {
tagprevmon(&((Arg) { .ui = 1 << arg->ui })); tagprevmon(&((Arg) { .ui = 1 << arg->ui }));
} }
#endif // DWMC_PATCH #endif // IPC_PATCH | DWMC_PATCH
void void
tagnextmon(const Arg *arg) tagnextmon(const Arg *arg)

View File

@ -1,7 +1,7 @@
#if DWMC_PATCH #if IPC_PATCH || DWMC_PATCH
static void tagnextmonex(const Arg *arg); static void tagnextmonex(const Arg *arg);
static void tagprevmonex(const Arg *arg); static void tagprevmonex(const Arg *arg);
#endif // DWMC_PATCH #endif // IPC_PATCH | DWMC_PATCH
static void tagnextmon(const Arg *arg); static void tagnextmon(const Arg *arg);
static void tagprevmon(const Arg *arg); static void tagprevmon(const Arg *arg);

View File

@ -18,7 +18,7 @@ setgaps(int oh, int ov, int ih, int iv)
arrange(selmon); arrange(selmon);
} }
#if DWMC_PATCH || IPC_PATCH #if IPC_PATCH || DWMC_PATCH
/* External function that takes one integer and splits it /* External function that takes one integer and splits it
* into four gap values: * into four gap values:
* - outer horizontal (oh) * - outer horizontal (oh)
@ -70,7 +70,7 @@ setgapsex(const Arg *arg)
setgaps(oh, ov, ih, iv); setgaps(oh, ov, ih, iv);
} }
#endif // DWMC_PATCH | IPC_PATCH #endif // IPC_PATCH | DWMC_PATCH
static void static void
togglegaps(const Arg *arg) togglegaps(const Arg *arg)

View File

@ -14,6 +14,6 @@ static void togglegaps(const Arg *arg);
static void getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc); static void getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc);
#endif #endif
static void setgaps(int oh, int ov, int ih, int iv); static void setgaps(int oh, int ov, int ih, int iv);
#if DWMC_PATCH #if IPC_PATCH || DWMC_PATCH
static void setgapsex(const Arg *arg); static void setgapsex(const Arg *arg);
#endif // DWMC_PATCH #endif // IPC_PATCH | DWMC_PATCH

View File

@ -83,7 +83,7 @@ loadxrdb()
XRDB_LOAD_COLOR("dwm.selSPRLbgcolor", selSPRLbgcolor); XRDB_LOAD_COLOR("dwm.selSPRLbgcolor", selSPRLbgcolor);
XRDB_LOAD_COLOR("dwm.selfloatbgcolor", selfloatbgcolor); XRDB_LOAD_COLOR("dwm.selfloatbgcolor", selfloatbgcolor);
#endif // BAR_FLEXWINTITLE_PATCH #endif // BAR_FLEXWINTITLE_PATCH
#if BAR_STATUS2D_XRDB_TERMCOLORS_PATCH #if BAR_STATUS2D_XRDB_TERMCOLORS_PATCH && BAR_STATUS2D_PATCH
XRDB_LOAD_COLOR("color0", termcol0); XRDB_LOAD_COLOR("color0", termcol0);
XRDB_LOAD_COLOR("color1", termcol1); XRDB_LOAD_COLOR("color1", termcol1);
XRDB_LOAD_COLOR("color2", termcol2); XRDB_LOAD_COLOR("color2", termcol2);

View File

@ -184,6 +184,11 @@
*/ */
#define BAR_ACTIVETAGINDICATORBAR_ALT1_PATCH N/A #define BAR_ACTIVETAGINDICATORBAR_ALT1_PATCH N/A
/* This patch adds a border around the status bar(s) just like the border of client windows.
* https://codemadness.org/paste/dwm-border-bar.patch
*/
#define BAR_BORDER_PATCH 0
/* This patch centers the WM_NAME of the currently selected window on the status bar. /* This patch centers the WM_NAME of the currently selected window on the status bar.
* This is compatible with the wintitle, bartabgroups, flexwintitle and awesomebar bar * This is compatible with the wintitle, bartabgroups, flexwintitle and awesomebar bar
* modules. * modules.