summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-06-21 09:07:51 +0200
committerbakkeby <[email protected]>2020-06-21 09:07:51 +0200
commit62cca4897be4b68257c0679bdc1491f0052cd730 (patch)
tree5494f7029fa251c311193d435fc7a0efb78c28b8
parentf27195491c56fe53c75942236077c4152176a582 (diff)
downloaddwm-flexipatch-62cca4897be4b68257c0679bdc1491f0052cd730.tar.gz
dwm-flexipatch-62cca4897be4b68257c0679bdc1491f0052cd730.zip
Tidy following tagothermonitor merge
-rw-r--r--README.md3
-rw-r--r--config.def.h49
-rw-r--r--patch/dwmc.c14
-rw-r--r--patch/dwmc.h4
-rw-r--r--patch/tagothermonitor.c14
-rw-r--r--patch/tagothermonitor.h5
6 files changed, 60 insertions, 29 deletions
diff --git a/README.md b/README.md
index bb6aee7..23b362e 100644
--- a/README.md
+++ b/README.md
@@ -432,6 +432,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
- [tagmonfixfs](https://github.com/bakkeby/patches/tree/master/dwm/dwm-tagmonfixfs-6.2.diff)
- allows moving a fullscreen window to another monitor while remaining in fullscreen
+ - [tagothermonitor](https://dwm.suckless.org/patches/tagothermonitor/)
+ - adds functions and keybindings to tag a window to a desired tag on an adjacent monitor
+
- [tagswapmon](https://github.com/bakkeby/patches/tree/master/dwm/dwm-tagswapmon-6.2.diff)
- swap all visible windows on one monitor with those of an adjacent monitor
diff --git a/config.def.h b/config.def.h
index f693266..0a43c48 100644
--- a/config.def.h
+++ b/config.def.h
@@ -511,10 +511,10 @@ static Signal signals[] = {
#if XRDB_PATCH && !VTCOLORS_PATCH
{ "xrdb", xrdb },
#endif // XRDB_PATCH
- #if TAGOTHERMONITOR_PATCH
+ #if TAGOTHERMONITOR_PATCH
{ "tagnextmonex", tagnextmonex },
{ "tagprevmonex", tagprevmonex },
- #endif // TAGOTHERMONITOR_PATCH
+ #endif // TAGOTHERMONITOR_PATCH
{ "quit", quit },
{ "setlayout", setlayout },
{ "setlayoutex", setlayoutex },
@@ -659,19 +659,45 @@ static const Layout layouts[] = {
/* key definitions */
#define MODKEY Mod1Mask
-#if COMBO_PATCH && SWAPTAGS_PATCH
+#if COMBO_PATCH && SWAPTAGS_PATCH && TAGOTHERMONITOR_PATCH
+#define TAGKEYS(KEY,TAG) \
+ { MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
+ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
+ { MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
+ { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
+ { MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} }, \
+ { MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
+ { MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
+#elif COMBO_PATCH && SWAPTAGS_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} },
+#elif COMBO_PATCH && TAGOTHERMONITOR_PATCH
+#define TAGKEYS(KEY,TAG) \
+ { MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
+ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
+ { MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
+ { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
+ { MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
+ { MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
#elif COMBO_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
+#elif SWAPTAGS_PATCH && TAGOTHERMONITOR_PATCH
+#define TAGKEYS(KEY,TAG) \
+ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
+ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
+ { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
+ { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
+ { MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} }, \
+ { MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
+ { MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
#elif SWAPTAGS_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
@@ -679,20 +705,21 @@ static const Layout layouts[] = {
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} },
+#elif TAGOTHERMONITOR_PATCH
+#define TAGKEYS(KEY,TAG) \
+ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
+ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
+ { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
+ { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
+ { MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
+ { MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
#else
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
-#endif // COMBO_PATCH / SWAPTAGS_PATCH
-
-#if TAGOTHERMONITOR_PATCH
-/* TODO: Choose keybindings for TAGOTHERMONITOR_PATCH
- { MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
- { MODKEY|Mod4Mask|ShiftMask, KEY, tagprevmon, {.ui = 1 << TAG} }, \
-*/
-#endif // TAGOTHERMONITOR_PATCH
+#endif // COMBO_PATCH / SWAPTAGS_PATCH / TAGOTHERMONITOR_PATCH
#if STACKER_PATCH
#define STACKKEYS(MOD,ACTION) \
diff --git a/patch/dwmc.c b/patch/dwmc.c
index 5b1c5e4..065e64d 100644
--- a/patch/dwmc.c
+++ b/patch/dwmc.c
@@ -40,20 +40,6 @@ tagallex(const Arg *arg)
tag(&((Arg){.ui = ~0}));
}
-#if TAGOTHERMONITOR_PATCH
-void
-tagnextmonex(const Arg *arg)
-{
- tagnextmon(&((Arg) { .ui = 1 << arg->ui }));
-}
-
-void
-tagprevmonex(const Arg *arg)
-{
- tagprevmon(&((Arg) { .ui = 1 << arg->ui }));
-}
-#endif
-
int
fake_signal(void)
{
diff --git a/patch/dwmc.h b/patch/dwmc.h
index c30cdaf..4fb0405 100644
--- a/patch/dwmc.h
+++ b/patch/dwmc.h
@@ -10,8 +10,4 @@ static void toggleviewex(const Arg *arg);
static void tagex(const Arg *arg);
static void toggletagex(const Arg *arg);
static void tagallex(const Arg *arg);
-#if TAGOTHERMONITOR_PATCH
-static void tagnextmonex(const Arg *arg);
-static void tagprevmonex(const Arg *arg);
-#endif
static int fake_signal(void);
diff --git a/patch/tagothermonitor.c b/patch/tagothermonitor.c
index 6f39212..4572c88 100644
--- a/patch/tagothermonitor.c
+++ b/patch/tagothermonitor.c
@@ -1,3 +1,17 @@
+#if DWMC_PATCH
+void
+tagnextmonex(const Arg *arg)
+{
+ tagnextmon(&((Arg) { .ui = 1 << arg->ui }));
+}
+
+void
+tagprevmonex(const Arg *arg)
+{
+ tagprevmon(&((Arg) { .ui = 1 << arg->ui }));
+}
+#endif // DWMC_PATCH
+
void
tagnextmon(const Arg *arg)
{
diff --git a/patch/tagothermonitor.h b/patch/tagothermonitor.h
index 44258bc..5cc033f 100644
--- a/patch/tagothermonitor.h
+++ b/patch/tagothermonitor.h
@@ -1,3 +1,8 @@
+#if DWMC_PATCH
+static void tagnextmonex(const Arg *arg);
+static void tagprevmonex(const Arg *arg);
+#endif // DWMC_PATCH
+
static void tagnextmon(const Arg *arg);
static void tagprevmon(const Arg *arg);
static void tagothermon(const Arg *arg, int dir);