Tag-Sync patch (for syncing tags across all monitors) (#219)
* Tag-Sync patch * Major compatibility updates * SWITCHTAG/TAGSYNC compatibility * tagsync: refactoring Co-authored-by: bakkeby <bakkeby@gmail.com>
This commit is contained in:
@ -27,17 +27,7 @@ viewtoleft(const Arg *arg)
|
||||
{
|
||||
if (__builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
|
||||
&& selmon->tagset[selmon->seltags] > 1) {
|
||||
selmon->seltags ^= 1; /* toggle sel tagset */
|
||||
#if PERTAG_PATCH
|
||||
pertagview(&((Arg) { .ui = selmon->tagset[selmon->seltags ^ 1] >> 1 }));
|
||||
#else
|
||||
selmon->tagset[selmon->seltags] = selmon->tagset[selmon->seltags ^ 1] >> 1;
|
||||
#endif // pertagview
|
||||
focus(NULL);
|
||||
arrange(selmon);
|
||||
#if BAR_EWMHTAGS_PATCH
|
||||
updatecurrentdesktop();
|
||||
#endif // BAR_EWMHTAGS_PATCH
|
||||
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] >> 1 }));
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,17 +36,7 @@ viewtoright(const Arg *arg)
|
||||
{
|
||||
if (__builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
|
||||
&& selmon->tagset[selmon->seltags] & (TAGMASK >> 1)) {
|
||||
selmon->seltags ^= 1; /* toggle sel tagset */
|
||||
#if PERTAG_PATCH
|
||||
pertagview(&((Arg) { .ui = selmon->tagset[selmon->seltags ^ 1] << 1 }));
|
||||
#else
|
||||
selmon->tagset[selmon->seltags] = selmon->tagset[selmon->seltags ^ 1] << 1;
|
||||
#endif // pertagview
|
||||
focus(NULL);
|
||||
arrange(selmon);
|
||||
#if BAR_EWMHTAGS_PATCH
|
||||
updatecurrentdesktop();
|
||||
#endif // BAR_EWMHTAGS_PATCH
|
||||
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] << 1 }));
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,17 +47,7 @@ tagandviewtoleft(const Arg *arg)
|
||||
&& __builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
|
||||
&& selmon->tagset[selmon->seltags] > 1) {
|
||||
selmon->sel->tags >>= 1;
|
||||
selmon->seltags ^= 1; /* toggle sel tagset */
|
||||
#if PERTAG_PATCH
|
||||
pertagview(&((Arg) { .ui = selmon->tagset[selmon->seltags ^ 1] >> 1 }));
|
||||
#else
|
||||
selmon->tagset[selmon->seltags] = selmon->tagset[selmon->seltags ^ 1] >> 1;
|
||||
#endif // pertagview
|
||||
focus(selmon->sel);
|
||||
arrange(selmon);
|
||||
#if BAR_EWMHTAGS_PATCH
|
||||
updatecurrentdesktop();
|
||||
#endif // BAR_EWMHTAGS_PATCH
|
||||
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] >> 1 }));
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,17 +58,6 @@ tagandviewtoright(const Arg *arg)
|
||||
&& __builtin_popcount(selmon->tagset[selmon->seltags] & TAGMASK) == 1
|
||||
&& selmon->tagset[selmon->seltags] & (TAGMASK >> 1)) {
|
||||
selmon->sel->tags <<= 1;
|
||||
selmon->seltags ^= 1; /* toggle sel tagset */
|
||||
#if PERTAG_PATCH
|
||||
pertagview(&((Arg) { .ui = selmon->tagset[selmon->seltags ^ 1] << 1 }));
|
||||
#else
|
||||
selmon->tagset[selmon->seltags] = selmon->tagset[selmon->seltags ^ 1] << 1;
|
||||
#endif // pertagview
|
||||
focus(selmon->sel);
|
||||
arrange(selmon);
|
||||
#if BAR_EWMHTAGS_PATCH
|
||||
updatecurrentdesktop();
|
||||
#endif // BAR_EWMHTAGS_PATCH
|
||||
view(&((Arg) { .ui = selmon->tagset[selmon->seltags] << 1 }));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user