Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

xhidecursor is a minimal X11 utility that hides the cursor on key presses and shows it again on mouse movement. Compared to more feature-rich alternatives such as xbanish, xhidecursor focuses on a simple implementation and efficient event processing, resulting in two main advantages:

  • Simplicity: xhidecursor has only 66 SLOC compared to 488 SLOC for xbanish, as measured by cloc. This is accomplished by using XFixes to hide and show the cursor and XInput2 to handle input events.

  • Performance: When stress-tested on an i5-8350U by moving the mouse erratically, htop shows 0% CPU utilization for xhidecursor and up to 1.3% for xbanish. This is because xhidecursor only listens for the first mouse movement needed to show the cursor and ignores subsequent mouse movements, avoiding redundant event processing. The same applies to key presses.

Dependencies

  • libx11
  • libxi
  • libxfixes
  • pkg-config

Installation

make
sudo make install

Usage

xhidecursor

About

Minimal X11 utility that efficiently hides the cursor on key presses and shows it again on mouse movement.

Topics

Resources

Stars

64 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages