How to monitor the movement of the window? I hope to receive event alerts when the window is moved

42 views
Skip to first unread message

木瓜太香

unread,
Sep 4, 2024, 2:42:06 AM9/4/24
to Hammerspoon
I'm writing a code to highlight the current focused window. I will draw some lines on the edge of the window to serve as a reminder, but I don't know how to monitor the window's movement event. What should I do?

M N

unread,
Sep 11, 2024, 8:15:08 AM9/11/24
to Hammerspoon
here is my solution:

Draw a red border around the current active app.
https://github.com/muescha/dot_hammerspoon/blob/master/Functions/AppBorders.lua

木瓜太香

unread,
Sep 11, 2024, 10:00:36 AM9/11/24
to Hammerspoon

Thank you for your help. I have already implemented similar code myself. What I want to resolve is the issue where the window does not follow the border during movement. This problem still persists.
Reply all
Reply to author
Forward
0 new messages