Hide the Mouse

I rarely use mice — in fact, since 2008 I have not even owned one. Since I bought my first laptop, the most I use to move the cursor is a graphics tablet, my keyboard shortcuts and the touchpad when I am not too far from the laptop.
The problem is that the cursor often sits in front of whatever I am doing and I need to hide it somehow. In this post I will show two simple solutions to that problem.
1. Move the cursor
The simplest solution is to move the cursor to the corner of the screen, where it does not bother
me. Until recently, moving the cursor meant taking my hand off the keyboard or repeatedly pressing
my shortcut key, which only moves 10 pixels at a time. xdotool solved that:
First install the program:
sudo pacman -S xdotool
Move the cursor to the top left corner:
xdotool mousemove 0 0
Move the cursor to the top right corner (assuming your screen is no bigger than full HD):
xdotool mousemove 1920 1080
So I do not have to type that in the terminal, I added this command to my shortcuts in
.xbindkeysrc:
# Move to the bottom right corner
"xdotool mousemove_relative 1920 1080"
KP_Begin
KP_Begin corresponds to the 5 key on my numeric keypad.
Hide the cursor when idle
We can use unclutter to hide the cursor.
Install unclutter:
sudo pacman -S unclutter
Just type unclutter & in the terminal. The default is to hide the mouse after 5s of inactivity.
Some options can also be useful:
noevents - Does not send an EnterNotify event. It may not work well with some programs:
unclutter -idle 5 -noevents &
grab - I noticed it could not hide the cursor when it was over Pidgin in AwesomeWM (the cursor
kept flickering). This command changes the method used to grab the cursor in order to hide it:
unclutter -grab
Notes:
- Put these commands in
.xinitrcso they run when X starts. - Some programs such as
xtrlockwill only work when the mouse is visible
Links

I’m a Brazilian computer engineer based in Germany, passionate about tech, science, photography, and languages.
I’ve been programming for about two decades already, exploring everything from mobile apps and web development to machine learning. These days I focus on cloud SRE and data engineering.
I volunteer in the open source and Python communities, helping organize PyCon DE and PyData Berlin, mentoring, and contributing with code and translations.
On my blog, I share Linux tips, setup guides, and personal notes I’ve written for future reference. I hope others find them helpful as well. The content is available in multiple languages.
Browse my gallery for some of my photography.
Away from the keyboard, you’ll find me at concerts, playing clarinet, cycling, scuba diving, or exploring new places, cultures, and cuisines.
Always happy to connect! 🙂