How to hide the mouse cursor on Linux

One of the most interesting aspects of using Linux as your OS is, undoubtedly, the fact that you can customize it as per your liking. One of the things I dislike when I am reading is distractions. I particularly find most distracting the mouse cursor. So today I am going to share how to hide the mouse cursor when you are not messing with your mouse.

As a matter of fact, it is very easy to hide your mouse cursor when you are not using it. Easy indeed. You just have to install a little application called unclutter

I am using Manjaro as my Linux distribution. As a result my package manager is pacman. To install the application you just have to run:

sudo pacman -S unclutter 

To learn more on installing software on other Linux distributions click here.

When that is finished, and while still in the terminal, you can test it by just typing:

unclutter --timeout 1

Now use your mouse, and then leave the cursor stay still for a second – that’s what the idle flag stands for. When you reach for your mouse again, the cursor will be where you had previously left it.

If that is too fast for you you can modify it according to your liking. Once you are happy with its behavior you can simply set it to load automatically on every OS boot. To learn how to create a script that automatically loads on boot, click here.

I am using i3wm instead, which makes it very easy to do so by simply modifying the i3 config file which is a simple text file. I like to append my custom configuration to the bottom of the config file, so these are the steps to follow:

  1. open a terminal
  2. type vim ~/.i3/config
  3. While in vim, press G to go to the bottom of the file
  4. type exec_always --no-startup-id unclutter -timeout 1
  5. press Ctrl+C to return to command mode
  6. type :wq to save and exit vim

Finally, when you are out of vim again, you can simply restart i3 inplace, which restarts the window manager without rebooting, allowing you to see your changes take effect right away.

Similar Posts