Does someone have an idea of how to fix this?

Question

Hello!

I have this line in my i3 config, which enables the cursor to move to the currently focused container on the same monitor as well. I am using xdotool for this and the cursor places itself in the center of the container. This combined with having focus follows cursor enabled makes it so that I rarely have to touch my mouse.

There is a problem however: when moving focus to second monitor when no window is there the cursor gets stuck in the upper left corner of the main monitor.

set $movemouse "sh -c 'eval `xdotool getactivewindow getwindowgeometry --shell`; xdotool mousemove $((X+WIDTH/2)) $((Y+HEIGHT/2))'"
  • Would it be able to make it so that if there is no window on the monitor I am trying to move my cursor to, it instead places itself in the middle of that monitor.

Thanks in advance! :)

Posted Aug 3, 2026, 10:50 AM UTC

72
Loading comments…