You are not logged in.

#1 2021-10-05 05:40:29

lfitzgerald
Member
Registered: 2021-07-16
Posts: 45

[SOLVED] Move mouse to the corner when idle

I use i3 and rarely touch the mouse, in fact the mouse is in a very invonvenient location so I try to avoid it when I can. Unfortunately I often have mouse pointer sitting in the middle of the screen and annoying me.

I installed unclutter and that does a nice job of hiding it. However it only visually hides the pointer. The mouse is still pointing at the center of the screen, so it can trigger mouse over effects on some web pages for instance.

I would prefer it if instead of hiding the cursor, it was moved to the edge of the screen. How can I do this? Does unclutter have an option I've missed? Does xbanish support it? Is there some other program that does?

Last edited by lfitzgerald (2022-04-01 20:17:04)

Offline

#2 2021-10-05 06:44:32

seth
Member
Registered: 2012-09-03
Posts: 29,047

Re: [SOLVED] Move mouse to the corner when idle

You could bind xautolock to "xdotool mousemove" or "xinput disable" it (but for the latter need a non-mouse shortcut/action to re-enable it)

Offline

#3 2021-10-12 01:39:33

lfitzgerald
Member
Registered: 2021-07-16
Posts: 45

Re: [SOLVED] Move mouse to the corner when idle

Thanks for the suggestion seth and sorry for the late reply. "xdotool mousemove" sounds about right, I'll give it a try and leave a reply here for future readers.

seth wrote:

"xinput disable" it (but for the latter need a non-mouse shortcut/action to re-enable it)

Makes sense smile In my case I would presumably press my "launch terminal" hotkey and do "xinput enable" or smth. Sounds like this would inactivate my mouse completely, rather than just moving it out of the way, no?

Offline

#4 2021-10-12 06:33:21

seth
Member
Registered: 2012-09-03
Posts: 29,047

Re: [SOLVED] Move mouse to the corner when idle

Sounds like this would inactivate my mouse completely, rather than just moving it out of the way, no?

Yes. It's like the touchpad toggle on many notebooks.

Offline

#5 2022-04-01 20:16:42

lfitzgerald
Member
Registered: 2021-07-16
Posts: 45

Re: [SOLVED] Move mouse to the corner when idle

I wasn't able to figure out how to automatically respond to mouse idleness.

However I realized that I could simply create a script called `mouse-move` containing "xdotool 9999 0".

I then added "bindsym $mod+m exec ~/scripts/mouse-move" to my i3 config and now I can press Win+M when I want the mouse to go away. This is good enough for me.

One could probably make the script remember the last location and restore it if the mouse is in the corner. Then Win+M would toggle hiding/unhiding mouse. I have no need of this feature, so I'll leave it as an exercise for future readers.

Offline

Board footer

Powered by FluxBB