mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Merge branch 'UtkarshVerma-bar-gaps' ref. #208
This commit is contained in:
commit
8f986a4e3b
19
dwm.c
19
dwm.c
@ -4343,13 +4343,22 @@ updatebarpos(Monitor *m)
|
||||
m->ww = m->mw;
|
||||
m->wh = m->mh;
|
||||
Bar *bar;
|
||||
#if BAR_PADDING_PATCH
|
||||
int y_pad = vertpad;
|
||||
int x_pad = sidepad;
|
||||
#else
|
||||
int y_pad = 0;
|
||||
int x_pad = 0;
|
||||
#endif // BAR_PADDING_PATCH
|
||||
#if BAR_PADDING_VANITYGAPS_PATCH && VANITYGAPS_PATCH
|
||||
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
||||
if (!selmon || selmon->pertag->enablegaps[selmon->pertag->curtag])
|
||||
#else
|
||||
if (enablegaps)
|
||||
#endif // PERTAG_VANITYGAPS_PATCH
|
||||
{
|
||||
y_pad = gappoh;
|
||||
x_pad = gappov;
|
||||
}
|
||||
#elif BAR_PADDING_PATCH
|
||||
y_pad = vertpad;
|
||||
x_pad = sidepad;
|
||||
#endif // BAR_PADDING_PATCH | BAR_PADDING_VANITYGAPS_PATCH
|
||||
|
||||
#if INSETS_PATCH
|
||||
// Custom insets
|
||||
|
@ -86,6 +86,16 @@ togglegaps(const Arg *arg)
|
||||
#else
|
||||
enablegaps = !enablegaps;
|
||||
#endif // PERTAG_VANITYGAPS_PATCH
|
||||
|
||||
#if BAR_PADDING_VANITYGAPS_PATCH
|
||||
updatebarpos(selmon);
|
||||
for (Bar *bar = selmon->bar; bar; bar = bar->next)
|
||||
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
||||
|
||||
#if BAR_SYSTRAY_PATCH
|
||||
drawbarwin(systray->bar);
|
||||
#endif // BAR_SYSTRAY_PATCH
|
||||
#endif // BAR_PADDING_VANITYGAPS_PATCH
|
||||
arrange(NULL);
|
||||
}
|
||||
|
||||
|
@ -347,6 +347,13 @@
|
||||
*/
|
||||
#define BAR_PADDING_PATCH 0
|
||||
|
||||
/* Same as barpadding patch but specifically tailored for the vanitygaps patch in that the outer
|
||||
* bar padding is derived from the vanitygaps settings. In addition to this the bar padding is
|
||||
* toggled in unison when vanitygaps are toggled. Increasing or decreasing gaps during runtime
|
||||
* will not affect the bar padding.
|
||||
*/
|
||||
#define BAR_PADDING_VANITYGAPS_PATCH 0
|
||||
|
||||
/* This patch adds simple markup for status messages using pango markup.
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user