diff options
| author | Fuwn <[email protected]> | 2024-01-29 23:16:21 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-29 23:16:21 -0800 |
| commit | d5482bfe9bddcbfbe1d4d90f62aa22092d63fe78 (patch) | |
| tree | c1b5fa23387903125137035cab7b2fb9ffa51346 | |
| parent | fix(ninja): lower required ninja version (diff) | |
| download | seiwm-d5482bfe9bddcbfbe1d4d90f62aa22092d63fe78.tar.xz seiwm-d5482bfe9bddcbfbe1d4d90f62aa22092d63fe78.zip | |
feat(sei.c): followclient follows on tagmon
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | config.h | 5 | ||||
| -rw-r--r-- | sei.c | 13 |
3 files changed, 17 insertions, 5 deletions
@@ -49,7 +49,9 @@ makepkg -si default name or to overwrite it completely - XSession desktop entry - centretitle patch toggle -- `followclient`: Optionally follow a client's view if the target tag is empty +- `followclient`: + - The view will follow the client when sent to an empty tag + - The focus and cursor will follow the client when sent to a new monitor - `systraypinning` toggle fix: If `systraypinning` is enabled, the system tray will only toggle its visibility if the mutation originates from the monitor it is pinned on. @@ -10,8 +10,9 @@ /* appearance */ static char wmname[] = "sei"; /* followclient: - * 1: if sending a client to a new tag with no other clients, the view will - * follow the client + * 1: + * - the view will follow the client when sent to an empty tag + * - the focus and cursor will follow the client when sent to a new monitor * 0: default behaviour */ static const int followclient = 1; static unsigned int borderpx = 2; /* border pixel of windows */ @@ -2116,8 +2116,17 @@ void sendmon(Client *c, Monitor *m) { attachaside(c); attachstack(c); setclienttagprop(c); - focus(NULL); - arrange(NULL); + + if (followclient) { + focus(c); + arrange(c->mon); + + if (c && c->mon == selmon) + XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2); + } else { + focus(NULL); + arrange(NULL); + } } void setclientstate(Client *c, long state) { |