mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Add a new patch to integrate vanity gaps with bar padding
This commit is contained in:
parent
40d30e5d1b
commit
8f401e1d81
9
dwm.c
9
dwm.c
@ -4319,7 +4319,14 @@ updatebarpos(Monitor *m)
|
|||||||
m->ww = m->mw;
|
m->ww = m->mw;
|
||||||
m->wh = m->mh;
|
m->wh = m->mh;
|
||||||
Bar *bar;
|
Bar *bar;
|
||||||
#if BAR_PADDING_PATCH
|
#if BAR_GAPS_PADDING_PATCH
|
||||||
|
int y_pad = 0;
|
||||||
|
int x_pad = 0;
|
||||||
|
if (enablegaps) {
|
||||||
|
y_pad = gappov;
|
||||||
|
x_pad = gappoh;
|
||||||
|
}
|
||||||
|
#elif BAR_PADDING_PATCH
|
||||||
int y_pad = vertpad;
|
int y_pad = vertpad;
|
||||||
int x_pad = sidepad;
|
int x_pad = sidepad;
|
||||||
#else
|
#else
|
||||||
|
@ -86,6 +86,16 @@ togglegaps(const Arg *arg)
|
|||||||
#else
|
#else
|
||||||
enablegaps = !enablegaps;
|
enablegaps = !enablegaps;
|
||||||
#endif // PERTAG_VANITYGAPS_PATCH
|
#endif // PERTAG_VANITYGAPS_PATCH
|
||||||
|
|
||||||
|
#if BAR_GAPS_PADDING_PATCH
|
||||||
|
updatebarpos(selmon);
|
||||||
|
Bar *bar = selmon->bar;
|
||||||
|
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw + gappoh, bar->bh);
|
||||||
|
|
||||||
|
#if BAR_SYSTRAY_PATCH
|
||||||
|
drawbarwin(systray->bar);
|
||||||
|
#endif // BAR_SYSTRAY_PATCH
|
||||||
|
#endif // BAR_GAPS_PADDING_PATCH
|
||||||
arrange(NULL);
|
arrange(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -347,6 +347,12 @@
|
|||||||
*/
|
*/
|
||||||
#define BAR_PADDING_PATCH 0
|
#define BAR_PADDING_PATCH 0
|
||||||
|
|
||||||
|
/* Same as barpadding patch but specifically written for the vanitygaps patch. It adds the same
|
||||||
|
* outer horizontal and vertical padding as vanity gaps. Moreover, the padding is toggled whenever
|
||||||
|
* vanitygaps are toggled.
|
||||||
|
*/
|
||||||
|
#define BAR_GAPS_PADDING_PATCH 0
|
||||||
|
|
||||||
/* This patch adds simple markup for status messages using pango markup.
|
/* This patch adds simple markup for status messages using pango markup.
|
||||||
* This depends on the pango library v1.44 or greater.
|
* This depends on the pango library v1.44 or greater.
|
||||||
* You need to uncomment the corresponding lines in config.mk to use the pango libraries
|
* You need to uncomment the corresponding lines in config.mk to use the pango libraries
|
||||||
|
Loading…
Reference in New Issue
Block a user