summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2019-10-08 00:54:06 +0200
committerbakkeby <[email protected]>2019-10-08 00:54:06 +0200
commit83242012da297c5afddb906d0879f92e3dffb1ab (patch)
treec9a763a6b4d80ee6f5fc37bc98a910c1e6c8406b
parentca8638128f96f3309451577b600dc2840511ef97 (diff)
downloaddwm-flexipatch-83242012da297c5afddb906d0879f92e3dffb1ab.tar.gz
dwm-flexipatch-83242012da297c5afddb906d0879f92e3dffb1ab.zip
Fixed minor cross-compatibility issues for combo, holdbar, leftlayout, hidevacanttags, taggrid and activetagindicatorbar
-rw-r--r--README.md2
-rw-r--r--config.def.h49
-rw-r--r--dwm.c47
-rw-r--r--patch/combo.c2
-rw-r--r--patch/combo.h2
-rw-r--r--patch/holdbar.c3
6 files changed, 98 insertions, 7 deletions
diff --git a/README.md b/README.md
index 8326aaf..2227422 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog:
-2019-10-07 - Added sortscreens and dwmc patches
+2019-10-07 - Added sortscreens and dwmc patches, fixed minor cross-compatibility issues for combo, holdbar, leftlayout, hidevacanttags, taggrid and activetagindicatorbar
2019-10-06 - Added statuscolors and statusallmons patches, fixed minor cross-compatibility issues for killunsel, fullscreen, noborder, tagintostack patches
diff --git a/config.def.h b/config.def.h
index 92c77bc..b6323a4 100644
--- a/config.def.h
+++ b/config.def.h
@@ -267,6 +267,45 @@ static const Layout layouts[] = {
{ "[\\]", flextile, { -1, -1, NO_SPLIT, DWINDLE, 0, 0, NULL } }, // fibonacci dwindle
{ "(@)", flextile, { -1, -1, NO_SPLIT, SPIRAL, 0, 0, NULL } }, // fibonacci spiral
{ "|||", flextile, { -1, -1, SPLIT_VERTICAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // columns (col) layout
+ #if TILE_LAYOUT
+ { "[]=", tile, {0} },
+ #endif
+ #if MONOCLE_LAYOUT
+ { "[M]", monocle, {0} },
+ #endif
+ #if BSTACK_LAYOUT
+ { "TTT", bstack, {0} },
+ #endif
+ #if BSTACKHORIZ_LAYOUT
+ { "===", bstackhoriz, {0} },
+ #endif
+ #if CENTEREDMASTER_LAYOUT
+ { "|M|", centeredmaster, {0} },
+ #endif
+ #if CENTEREDFLOATINGMASTER_LAYOUT
+ { ">M>", centeredfloatingmaster, {0} },
+ #endif
+ #if DECK_LAYOUT
+ { "[D]", deck, {0} },
+ #endif
+ #if FIBONACCI_SPIRAL_LAYOUT
+ { "(@)", spiral, {0} },
+ #endif
+ #if FIBONACCI_DWINDLE_LAYOUT
+ { "[\\]", dwindle, {0} },
+ #endif
+ #if GRIDMODE_LAYOUT
+ { "HHH", grid, {0} },
+ #endif
+ #if HORIZGRID_LAYOUT
+ { "---", horizgrid, {0} },
+ #endif
+ #if GAPPLESSGRID_LAYOUT
+ { ":::", gaplessgrid, {0} },
+ #endif
+ #if NROWGRID_LAYOUT
+ { "###", nrowgrid, {0} },
+ #endif
#if CYCLELAYOUTS_PATCH
{ NULL, NULL, {0} },
#endif
@@ -355,6 +394,9 @@ static Key keys[] = {
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
+ #if SWITCHCOL_PATCH
+ { MODKEY, XK_v, switchcol, {0} },
+ #endif // SWITCHCOL_PATCH
#if ROTATESTACK_PATCH
{ MODKEY|Mod4Mask, XK_j, rotatestack, {.i = +1 } },
{ MODKEY|Mod4Mask, XK_k, rotatestack, {.i = -1 } },
@@ -365,6 +407,10 @@ static Key keys[] = {
#endif // PUSH_PATCH / PUSH_NO_MASTER_PATCH
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
+ #if FLEXTILE_DELUXE_LAYOUT
+ { MODKEY|ControlMask, XK_i, incnstack, {.i = +1 } },
+ { MODKEY|ControlMask, XK_u, incnstack, {.i = -1 } },
+ #endif // FLEXTILE_DELUXE_LAYOUT
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
#if CFACTS_PATCH
@@ -448,6 +494,9 @@ static Key keys[] = {
#if TOGGLEFULLSCREEN_PATCH
{ MODKEY, XK_y, togglefullscreen, {0} },
#endif // TOGGLEFULLSCREEN_PATCH
+ #if FULLSCREEN_PATCH
+ { MODKEY|ShiftMask, XK_f, fullscreen, {0} },
+ #endif // FULLSCREEN_PATCH
#if STICKY_PATCH
{ MODKEY, XK_s, togglesticky, {0} },
#endif // STICKY_PATCH
diff --git a/dwm.c b/dwm.c
index 27d3ec5..0b2c771 100644
--- a/dwm.c
+++ b/dwm.c
@@ -636,13 +636,40 @@ buttonpress(XEvent *e)
if (ev->x < x) {
click = ClkLtSymbol;
} else {
- do
+ #if HIDEVACANTTAGS_PATCH
+ for (c = m->clients; c; c = c->next)
+ occ |= c->tags == 255 ? 0 : c->tags;
+ #endif // HIDEVACANTTAGS_PATCH
+ #if TAGGRID_PATCH
+ if (drawtagmask & DRAWCLASSICTAGS)
+ #endif // TAGGRID_PATCH
+ do {
+ #if HIDEVACANTTAGS_PATCH
+ /* do not reserve space for vacant tags */
+ if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
+ continue;
+ #endif // HIDEVACANTTAGS_PATCH
x += TEXTW(tags[i]);
- while (ev->x >= x && ++i < LENGTH(tags));
+ } while (ev->x >= x && ++i < LENGTH(tags));
if (i < LENGTH(tags)) {
click = ClkTagBar;
arg.ui = 1 << i;
+ #if TAGGRID_PATCH
+ } else if (ev->x < x + columns * bh / tagrows && (drawtagmask & DRAWTAGGRID)) {
+ click = ClkTagBar;
+ i = (ev->x - x) / (bh / tagrows);
+ i = i + columns * (ev->y / (bh / tagrows));
+ if (i >= LENGTH(tags)) {
+ i = LENGTH(tags) - 1;
+ }
+ arg.ui = 1 << i;
}
+ else if (ev->x < x + blw + columns * bh / tagrows)
+ click = ClkLtSymbol;
+ #else // TAGGRID_PATCH
+ } else if (ev->x < x + blw)
+ click = ClkLtSymbol;
+ #endif // TAGGRID_PATCH
#if AWESOMEBAR_PATCH && SYSTRAY_PATCH
else if (ev->x > selmon->ww - TEXTW(stext) + lrpad - 2 - getsystraywidth())
#elif AWESOMEBAR_PATCH
@@ -676,13 +703,13 @@ buttonpress(XEvent *e)
#endif // AWESOMEBAR_PATCH
}
#else // LEFTLAYOUT_PATCH
- #if TAGGRID_PATCH
- if (drawtagmask & DRAWCLASSICTAGS)
- #endif // TAGGRID_PATCH
#if HIDEVACANTTAGS_PATCH
for (c = m->clients; c; c = c->next)
occ |= c->tags == 255 ? 0 : c->tags;
#endif // HIDEVACANTTAGS_PATCH
+ #if TAGGRID_PATCH
+ if (drawtagmask & DRAWCLASSICTAGS)
+ #endif // TAGGRID_PATCH
do {
#if HIDEVACANTTAGS_PATCH
/* do not reserve space for vacant tags */
@@ -710,7 +737,7 @@ buttonpress(XEvent *e)
}
else if (ev->x < x + blw + columns * bh / tagrows)
click = ClkLtSymbol;
- #else
+ #else // TAGGRID_PATCH
} else if (ev->x < x + blw)
click = ClkLtSymbol;
#endif // TAGGRID_PATCH
@@ -1416,7 +1443,11 @@ drawbar(Monitor *m)
if (tw > 0) /* trap special handling of 0 in drw_text */
drw_text(drw, x, 0, tw, bh, lrpad / 2, c->name, 0);
if (c->isfloating)
+ #if ACTIVETAGINDICATORBAR_PATCH
+ drw_rect(drw, x + boxw, 0, w - ( 2 * boxw + 1), boxw, c->isfixed, 0);
+ #else
drw_rect(drw, x + boxs, boxs, boxw, boxw, c->isfixed, 0);
+ #endif // ACTIVETAGINDICATORBAR_PATCH
x += tw;
w -= tw;
}
@@ -1437,7 +1468,11 @@ drawbar(Monitor *m)
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
#endif // CENTEREDWINDOWNAME_PATCH
if (m->sel->isfloating)
+ #if ACTIVETAGINDICATORBAR_PATCH
+ drw_rect(drw, x + boxw, 0, w - ( 2 * boxw + 1), boxw, m->sel->isfixed, 0);
+ #else
drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
+ #endif // ACTIVETAGINDICATORBAR_PATCH
} else {
drw_setscheme(drw, scheme[SchemeNorm]);
drw_rect(drw, x, 0, w, bh, 1, 1);
diff --git a/patch/combo.c b/patch/combo.c
index 3f13f16..7d1f3f2 100644
--- a/patch/combo.c
+++ b/patch/combo.c
@@ -1,10 +1,12 @@
static int combo = 0;
+#if !HOLDBAR_PATCH
void
keyrelease(XEvent *e)
{
combo = 0;
}
+#endif // !HOLDBAR_PATCH
void
combotag(const Arg *arg)
diff --git a/patch/combo.h b/patch/combo.h
index d6d141e..08be95e 100644
--- a/patch/combo.h
+++ b/patch/combo.h
@@ -1,3 +1,5 @@
+#if !HOLDBAR_PATCH
static void keyrelease(XEvent *e);
+#endif // !HOLDBAR_PATCH
static void combotag(const Arg *arg);
static void comboview(const Arg *arg); \ No newline at end of file
diff --git a/patch/holdbar.c b/patch/holdbar.c
index a7727b8..0ea1d41 100644
--- a/patch/holdbar.c
+++ b/patch/holdbar.c
@@ -15,6 +15,9 @@ keyrelease(XEvent *e)
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
arrange(selmon);
}
+ #if COMBO_PATCH
+ combo = 0;
+ #endif // COMBO_PATCH
}
void