Go to file
Eduardo Santiago 5fdb707a25 Identify the correct screen
On multiscreen systems, identify which screen the cursor is on.
Code copied shamelessly from xdotool.

Signed-off-by: Eduardo Santiago <ed@edsantiago.com>
2022-01-11 11:21:07 -07:00
.github Update funding 2020-03-30 20:39:33 +08:00
.gitignore Remove .travis.yml 2019-11-20 23:41:49 +08:00
find-cursor.c Identify the correct screen 2022-01-11 11:21:07 -07:00
LICENSE Use shaped window to pass through mouse events 2017-03-23 05:02:56 +00:00
Makefile Don't really need a manpage 2020-12-06 17:24:38 +08:00
README.markdown Accept argument in -o for outline width, add --outline-color 2021-05-16 13:47:00 +08:00
screenshot.gif Update screenshot 2015-09-10 00:04:35 +02:00

This project is considered stable

Simple XLib program to highlight the cursor position. This is similar to the feature found in Windows XP (and possibly later?)

screenshot.gif

Installation

Compile it by typing make, install it with make install. There packages for some platforms as well.

You'll need to install some X11 header files on some systems; e.g. on Ubuntu/Debian: libx11-dev, libxcomposite-dev, libxdamage-dev, and libxrender-dev.

There is also a Docker container at klo2k/find-cursor if you want it. Note this is NOT maintained (or supported) by me. See #19.

Usage

See find-cursor -h to see some options for controlling the appearance.

Launching

You will want to map a key in your window manager to run find-cursor. You can also use xbindkeys, which should work with $any window manager.

I run it with xcape:

xcape -e 'Control_L=Escape;Shift_L=KP_Add'

When Left Shift is tapped a Keypad Add is sent; I configured my window manager to launch find-cursor with that.

I don't have a numpad on my keyboard; you can also use F13 or some other unused key.

You can use a little wrapper script if you want a "toggle" switch for when repeating forever:

#!/bin/sh
if pgrep find-cursor; then
    pkill find-cursor
else
    find-cursor -r0 &
fi

Compton

You may want to disable shadows if you use compton or some other composite manager; for example for compton start it with:

compton --shadow-exclude "class_g = 'find-cursor'"

Or, perhaps even better, disable it for all shaped windows:

compton --shadow-exclude 'bounding_shaped'

You can also put that in the compton config file. Other managers might have different options/flags.