diff options
| author | Bear <bear@bengtsson.win> | 2021-12-27 09:29:58 +0000 |
|---|---|---|
| committer | Bear <bear@bengtsson.win> | 2021-12-27 09:29:58 +0000 |
| commit | 69262b01ced79c2d776fab9b889926d1816a1e7a (patch) | |
| tree | f304cd6fa8734e83a7772d07dc9b484781565155 /patch/tagothermonitor.c | |
Added DWM
Diffstat (limited to 'patch/tagothermonitor.c')
| -rw-r--r-- | patch/tagothermonitor.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/patch/tagothermonitor.c b/patch/tagothermonitor.c new file mode 100644 index 0000000..d12f6ff --- /dev/null +++ b/patch/tagothermonitor.c @@ -0,0 +1,44 @@ +#if IPC_PATCH || 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 // IPC_PATCH | DWMC_PATCH + +void +tagnextmon(const Arg *arg) +{ + tagothermon(arg, 1); +} + +void +tagprevmon(const Arg *arg) +{ + tagothermon(arg, -1); +} + +void +tagothermon(const Arg *arg, int dir) +{ + Client *sel; + Monitor *newmon; + + if (!selmon->sel || !mons->next) + return; + sel = selmon->sel; + newmon = dirtomon(dir); + sendmon(sel, newmon); + if (arg->ui & TAGMASK) { + sel->tags = arg->ui & TAGMASK; + focus(NULL); + arrange(newmon); + } +} + |
