From c909f1f393054eae1af662683e3fdc6cd7333330 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Tue, 16 May 2023 17:29:36 +0200 Subject: Add mouse follows focus to awesome --- .config/awesome/rc.lua | 8 ++++++++ 1 file changed, 8 insertions(+) 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) -- cgit v1.1