diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2024-04-29 22:55:11 -0400 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2024-04-29 22:55:11 -0400 |
| commit | c4ce6b128b835425f7137100b495e9d2666d3977 (patch) | |
| tree | 445a6fe382db37a862f304b325188438900bc418 /dwm/dwm.c | |
| parent | feba945701e73601c79d38cfe4075461191e6672 (diff) | |
update dwm keybindings
Diffstat (limited to 'dwm/dwm.c')
| -rw-r--r-- | dwm/dwm.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1216,6 +1216,8 @@ focusmon(const Arg *arg) unfocus(selmon->sel, 0); selmon = m; focus(NULL); + if (selmon->sel) + XWarpPointer(dpy, None, selmon->sel->win, 0, 0, 0, 0, selmon->sel->w/2, selmon->sel->h/2); } void @@ -1232,6 +1234,7 @@ focusstack(const Arg *arg) ; focus(c ? c : p); restack(selmon); + XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w/2, c->h/2); } Atom getatomprop(Client *c, Atom prop) @@ -1607,6 +1610,8 @@ manage(Window w, XWindowAttributes *wa) if (term) swallow(term, c); arrange(c->mon); + if (c && c->mon == selmon) + XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w/2, c->h/2); focus(NULL); } @@ -2646,6 +2651,9 @@ unmanage(Client *c, int destroyed) arrange(m); focus(NULL); updateclientlist(); + if (m == selmon && m->sel) + XWarpPointer(dpy, None, m->sel->win, 0, 0, 0, 0, + m->sel->w/2, m->sel->h/2); } } |
