aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryson Steck <brysonsteck@protonmail.com>2022-10-05 18:49:51 -0600
committerBryson Steck <brysonsteck@protonmail.com>2022-10-05 18:49:51 -0600
commit3e7db78a19e50c7d629c5d1bc677cc386f32d2e7 (patch)
tree388052603b3aeda660cf6e8cb6cb9c620758c20b
parent16dc543e11cde35a56ff126a0c55e5e99f02d4fe (diff)
downloaddwm-3e7db78a19e50c7d629c5d1bc677cc386f32d2e7.tar
dwm-3e7db78a19e50c7d629c5d1bc677cc386f32d2e7.tar.gz
dwm-3e7db78a19e50c7d629c5d1bc677cc386f32d2e7.tar.bz2
cursor warp
-rw-r--r--config.h4
-rw-r--r--dwm.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/config.h b/config.h
index 569a7c8..38815b1 100644
--- a/config.h
+++ b/config.h
@@ -27,7 +27,7 @@ static const char *colors[][3] = {
};
/* tagging */
-static const char *tags[] = { "!", "@", "#", "$", "%", "^", "&", "*" };
+static const char *tags[] = { "!", "@", "#", "$", "%" };
static const Rule rules[] = {
/* xprop(1):
@@ -59,6 +59,8 @@ static const Layout layouts[] = {
};
/* key definitions */
+// Mod4Mask is super
+// Mod1Mask is alt/meta
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
diff --git a/dwm.c b/dwm.c
index e5c8b27..e4f75a7 100644
--- a/dwm.c
+++ b/dwm.c
@@ -837,6 +837,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
@@ -862,6 +864,7 @@ focusstack(const Arg *arg)
if (c) {
focus(c);
restack(selmon);
+ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w/2, c->h/2);
}
}