diff options
| author | bakkeby <[email protected]> | 2021-05-28 14:33:56 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2021-05-28 14:33:56 +0200 |
| commit | 75b0c4f86b245d8aaca0f1d13ce9653483c2976b (patch) | |
| tree | 7addb34432e9592cb023d0148c0bed6ae985c2b9 /patch | |
| parent | 9072ef28a42051f306f2722004aab4d1061bdb37 (diff) | |
| download | dwm-flexipatch-75b0c4f86b245d8aaca0f1d13ce9653483c2976b.tar.gz dwm-flexipatch-75b0c4f86b245d8aaca0f1d13ce9653483c2976b.zip | |
focusadjacenttag: adding pertag compatibiltiy ref. #152
Diffstat (limited to 'patch')
| -rw-r--r-- | patch/focusadjacenttag.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/patch/focusadjacenttag.c b/patch/focusadjacenttag.c index 5b13b54..d6a8e7f 100644 --- a/patch/focusadjacenttag.c +++ b/patch/focusadjacenttag.c @@ -28,7 +28,11 @@ 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); } @@ -40,7 +44,11 @@ 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); } @@ -53,7 +61,11 @@ tagandviewtoleft(const Arg *arg) && 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); } @@ -66,7 +78,11 @@ tagandviewtoright(const Arg *arg) && 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); } |
