Merge remote-tracking branch 'upstream/master'
This commit is contained in:
11
README.org
11
README.org
@@ -123,6 +123,7 @@
|
||||
- [[#only-one-rule-match][Only One Rule Match]]
|
||||
- [[#only-quit-on-empty][Only Quit On Empty]]
|
||||
- [[#per-tag][Per Tag]]
|
||||
- [[#per-monitor][Per Monitor]]
|
||||
- [[#place-direction][Place Direction]]
|
||||
- [[#place-mouse][Place Mouse]]
|
||||
- [[#push][Push]]
|
||||
@@ -2547,6 +2548,16 @@ This controls whether or not to also store bar position on a per tag basis, or l
|
||||
#define PERTAGBAR_PATCH 0
|
||||
#+END_SRC
|
||||
|
||||
*** Per Monitor
|
||||
|
||||
**** Vanity Gaps
|
||||
|
||||
This patch allows configuring vanity gaps on a per-monitor basis rather than all monitors (default).
|
||||
|
||||
#+BEGIN_SRC c :tangle patches.def.h
|
||||
#define PERMON_VANITYGAPS_PATCH 0
|
||||
#+END_SRC
|
||||
|
||||
*** Place Direction
|
||||
|
||||
Similar to the focusdir patch this patch allow users to move a window in any direction in the tiled stack (up, down, left, right).
|
||||
|
9
dwm.c
9
dwm.c
@@ -482,6 +482,9 @@ struct Monitor {
|
||||
int gappiv; /* vertical gap between windows */
|
||||
int gappoh; /* horizontal outer gaps */
|
||||
int gappov; /* vertical outer gaps */
|
||||
#if PERMON_VANITYGAPS_PATCH
|
||||
int enablegaps; /* whether gaps are enabled */
|
||||
#endif // PERMON_VANITYGAPS_PATCH
|
||||
#endif // VANITYGAPS_PATCH
|
||||
#if SETBORDERPX_PATCH
|
||||
int borderpx;
|
||||
@@ -1769,6 +1772,10 @@ createmon(void)
|
||||
}
|
||||
#endif // PERTAG_PATCH
|
||||
|
||||
#if PERMON_VANITYGAPS_PATCH
|
||||
m->enablegaps = 1;
|
||||
#endif // PERMON_VANITYGAPS_PATCH
|
||||
|
||||
#if SEAMLESS_RESTART_PATCH
|
||||
restoremonitorstate(m);
|
||||
#endif // SEAMLESS_RESTART_PATCH
|
||||
@@ -4651,6 +4658,8 @@ updatebarpos(Monitor *m)
|
||||
#if BAR_PADDING_VANITYGAPS_PATCH && VANITYGAPS_PATCH
|
||||
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
||||
if (!selmon || selmon->pertag->enablegaps[selmon->pertag->curtag])
|
||||
#elif PERMON_VANITYGAPS_PATCH
|
||||
if (!selmon || selmon->enablegaps)
|
||||
#else
|
||||
if (enablegaps)
|
||||
#endif // PERTAG_VANITYGAPS_PATCH
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/* Settings */
|
||||
#if !PERTAG_VANITYGAPS_PATCH
|
||||
#if !(PERTAG_VANITYGAPS_PATCH || PERMON_VANITYGAPS_PATCH)
|
||||
static int enablegaps = 1;
|
||||
#endif // PERTAG_VANITYGAPS_PATCH
|
||||
|
||||
@@ -69,10 +69,12 @@ setgapsex(const Arg *arg)
|
||||
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
||||
if (!selmon->pertag->enablegaps[selmon->pertag->curtag])
|
||||
selmon->pertag->enablegaps[selmon->pertag->curtag] = 1;
|
||||
#elif PERMON_VANITYGAPS_PATCH
|
||||
selmon->enablegaps = 1;
|
||||
#else
|
||||
if (!enablegaps)
|
||||
enablegaps = 1;
|
||||
#endif // PERTAG_VANITYGAPS_PATCH
|
||||
#endif // PERTAG_VANITYGAPS_PATCH | PERMON_VANITYGAPS_PATCH
|
||||
|
||||
setgaps(oh, ov, ih, iv);
|
||||
}
|
||||
@@ -83,24 +85,35 @@ togglegaps(const Arg *arg)
|
||||
{
|
||||
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
||||
selmon->pertag->enablegaps[selmon->pertag->curtag] = !selmon->pertag->enablegaps[selmon->pertag->curtag];
|
||||
#elif PERMON_VANITYGAPS_PATCH
|
||||
selmon->enablegaps = !selmon->enablegaps;
|
||||
#else
|
||||
enablegaps = !enablegaps;
|
||||
#endif // PERTAG_VANITYGAPS_PATCH
|
||||
#endif // PERTAG_VANITYGAPS_PATCH | PERMON_VANITYGAPS_PATCH
|
||||
|
||||
#if BAR_PADDING_VANITYGAPS_PATCH
|
||||
#if PERMON_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);
|
||||
#else
|
||||
for (Monitor *m = mons; m; m = m->next) {
|
||||
updatebarpos(m);
|
||||
for (Bar *bar = m->bar; bar; bar = bar->next)
|
||||
XMoveResizeWindow(dpy, bar->win, bar->bx, bar->by, bar->bw, bar->bh);
|
||||
}
|
||||
#endif // PERMON_VANITYGAPS_PATCH
|
||||
|
||||
#if BAR_SYSTRAY_PATCH
|
||||
drawbarwin(systray->bar);
|
||||
#endif // BAR_SYSTRAY_PATCH
|
||||
#endif // BAR_PADDING_VANITYGAPS_PATCH
|
||||
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
||||
|
||||
#if (PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH) || PERMON_VANITYGAPS_PATCH
|
||||
arrange(selmon);
|
||||
#else
|
||||
arrange(NULL);
|
||||
#endif // PERTAG_VANITYGAPS_PATCH
|
||||
#endif // PERTAG_VANITYGAPS_PATCH | PERMON_VANITYGAPS_PATCH
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -193,9 +206,11 @@ getgaps(Monitor *m, int *oh, int *ov, int *ih, int *iv, unsigned int *nc)
|
||||
unsigned int n, oe, ie;
|
||||
#if PERTAG_VANITYGAPS_PATCH && PERTAG_PATCH
|
||||
oe = ie = m->pertag->enablegaps[m->pertag->curtag];
|
||||
#elif PERMON_VANITYGAPS_PATCH
|
||||
oe = ie = m->enablegaps;
|
||||
#else
|
||||
oe = ie = enablegaps;
|
||||
#endif // PERTAG_VANITYGAPS_PATCH
|
||||
#endif // PERTAG_VANITYGAPS_PATCH | PERMON_VANITYGAPS_PATCH
|
||||
Client *c;
|
||||
|
||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
|
||||
|
@@ -241,6 +241,8 @@
|
||||
|
||||
#define PERTAGBAR_PATCH 0
|
||||
|
||||
#define PERMON_VANITYGAPS_PATCH 0
|
||||
|
||||
#define PLACEDIR_PATCH 0
|
||||
|
||||
#define PLACEMOUSE_PATCH 1
|
||||
|
Reference in New Issue
Block a user