Tidy following tagothermonitor merge

pull/33/head^2
bakkeby 4 years ago
parent f27195491c
commit 62cca4897b

@ -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

@ -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) \

@ -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)
{

@ -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);

@ -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)
{

@ -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);

Loading…
Cancel
Save