diff options
| author | Fuwn <[email protected]> | 2024-01-22 21:02:46 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-22 21:02:46 -0800 |
| commit | d49a6bc036a4bd410466d4d3fb69cd998fed0a2a (patch) | |
| tree | 223b754e063ab4ea0ba5d75aa93bfe699ef0bdda /sei.c | |
| parent | style(vanitygaps.c): add explicit types to pad (diff) | |
| download | seiwm-d49a6bc036a4bd410466d4d3fb69cd998fed0a2a.tar.xz seiwm-d49a6bc036a4bd410466d4d3fb69cd998fed0a2a.zip | |
feat(sei.c): followclient
Diffstat (limited to 'sei.c')
| -rw-r--r-- | sei.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -470,14 +470,29 @@ void keyrelease(XEvent *e) { combo = 0; } void combotag(const Arg *arg) { if (selmon->sel && arg->ui & TAGMASK) { + Client *target = selmon->sel; + if (combo) { selmon->sel->tags |= arg->ui & TAGMASK; } else { combo = 1; selmon->sel->tags = arg->ui & TAGMASK; } + focus(NULL); arrange(selmon); + + if (followclient) { + Client *c; + int i = 0; + + for (c = target->mon->clients; c && !ISVISIBLE(c); c = c->next) + if (c->tags == target->tags) + i += 1; + + if (i <= 1) + view(arg); + } } } |