diff options
| author | Bagellll <[email protected]> | 2022-02-11 10:57:53 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-02-11 16:57:53 +0100 |
| commit | ae67378b200842998bb4bc178e0d67220f09fefc (patch) | |
| tree | 9da48cb032d37b646a0b93d954fe5b7942f9cf96 /patch/focusadjacenttag.c | |
| parent | 8f986a4e3b64533d9d96272941685a314f3fa837 (diff) | |
| download | dwm-flexipatch-ae67378b200842998bb4bc178e0d67220f09fefc.tar.gz dwm-flexipatch-ae67378b200842998bb4bc178e0d67220f09fefc.zip | |
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 <[email protected]>
Diffstat (limited to 'patch/focusadjacenttag.c')
| -rw-r--r-- | patch/focusadjacenttag.c | 49 |
1 files changed, 4 insertions, 45 deletions
diff --git a/patch/focusadjacenttag.c b/patch/focusadjacenttag.c index 85d9d74..b311b74 100644 --- a/patch/focusadjacenttag.c +++ b/patch/focusadjacenttag.c @@ -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 })); } } - |
