diff options
author | Patrick Spek <p.spek@tyil.nl> | 2023-05-16 17:29:36 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2023-05-16 17:29:45 +0200 |
commit | c909f1f393054eae1af662683e3fdc6cd7333330 (patch) | |
tree | a2530565bc451b54c8af2ed36db891f0a01e9d16 | |
parent | 412c02641808aec4191836a82ab6559e81a460d6 (diff) | |
download | dotfiles-c909f1f393054eae1af662683e3fdc6cd7333330.tar.gz dotfiles-c909f1f393054eae1af662683e3fdc6cd7333330.tar.bz2 |
Add mouse follows focus to awesome
-rw-r--r-- | .config/awesome/rc.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 5be24b2..ea3eb70 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -653,6 +653,14 @@ client.connect_signal("focus", function(c) c.opacity = 1 -- Mouse follows focus + if mouse.object_under_pointer() ~= c then + local geometry = c:geometry() + + mouse.coords({ + x = geometry.x + geometry.width/2, + y = geometry.y + geometry.height/2, + }, true) + end end) client.connect_signal("unfocus", function(c) |