Update README, add manpage

pull/11/head v1.2
Martin Tournoij 5 years ago
parent 222db0fb4d
commit fcc5cb2534
No known key found for this signature in database
GPG Key ID: A6258419189EE585

@ -1,11 +1,12 @@
CC?=cc
CFLAGS?=-std=c99 -pedantic -Wall -Os
STRIP?=strip
PREFIX?=/usr
PREFIX?=/usr/local
MANPREFIX?=$(PREFIX)/share/man
all:
${CC} ${CFLAGS} ${LDFLAGS} -o find-cursor find-cursor.c -lX11 -lXext -lXfixes
install:
$(STRIP) find-cursor
install -Dm755 find-cursor $(DESTDIR)$(PREFIX)/bin/find-cursor
sed "s/VERSION/`git tag | tail -1 | tr -d v`/g" < find-cursor.1 > $(DESTDIR)$(MANPREFIX)/man1/find-cursor.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/find-cursor.1

@ -6,37 +6,51 @@ feature found in Windows XP (and possibly later?)
![screenshot.gif](https://raw.githubusercontent.com/Carpetsmoker/find-cursor/master/screenshot.gif)
Using it
========
Compile it by typing `make`. Run `find-cursor -h` to see some options for
controlling the appearance.
Installation
============
- The author runs it with [`xcape`][xcape]:
Compile it by typing `make`, install it with `make install`. There are some
packages:
xcape -e 'Control_L=Escape;Shift_L=KP_Add'
- [FreeBSD](https://www.freshports.org/x11/find-cursor/)
- [Void Linux](https://github.com/biopsin/void-packages/tree/master/srcpkgs/find-cursor)
When Left shift is tapped, a Keypad Add is sent I don't have a numpad on my
keyboard which we can then use to launch the program.
Usage
=====
I configured my window manager (PekWM) to pick up Numpad Add and launch this:
See `find-cursor(1)` or `find-cursor -h` to see some options for controlling the
appearance.
KeyPress = "KP_Add" { Actions = "Exec find-cursor" }
Launching
=========
I'm not going to include instructions for every window manager out there. I'm
sure you can figure out how to use it with your WM ;-) You can also use
[`xbindkeys`](xbindkeys), which should work with `$any` window manager.
You will want to map a key in your window manager to run `find-cursor`. You can
also use [`xbindkeys`](xbindkeys), which should work with `$any` window manager.
- You may want to disable shadows if you use compton or some other composite
manager; for example for compton start it with:
I run it with [`xcape`][xcape]:
compton --shadow-exclude "class_g = 'find-cursor'"
xcape -e 'Control_L=Escape;Shift_L=KP_Add'
Or, perhaps even better, disable it for all shaped windows:
When `Left Shift` is tapped a `Keypad Add` is sent; I configured my window
manager to launch `find-cursor` with that.
compton --shadow-exclude 'bounding_shaped'
I don't have a numpad on my keyboard; you can also use `F13` or some other
unused key.
You can also put that in the compton config file. Other managers might have
different options/flags.
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.
[xcape]: https://github.com/alols/xcape
[xbindkeys]: http://www.nongnu.org/xbindkeys/xbindkeys.html

@ -0,0 +1,104 @@
.TH FIND-CURSOR 1 find-cursor\-VERSION
.SH NAME
find-cursor \- highlight the cursor position
.SH SYNOPSIS
.B find-cursor
.RB [ \-fghto ]
.RB [ \-s
.IR size ]
.RB [ \-d
.IR distance ]
.RB [ \-l
.IR line-width ]
.RB [ \-w
.IR wait ]
.RB [ \-c
.IR color ]
.SH DESCRIPTION
.B find-cursor
highlights the cursor position by drawing circiles around them.
.SH OPTIONS
.TP
\fB\-c\fR, \fB\-\-color\fR \fI\,CODE\/\fR
Color; can either be an X11 color name or RGB as hex.
.TP
\fB\-d\fR, \fB\-\-distance\fR \fI\,PIXELS\/\fR
Distance between the circles in pixels.
.TP
\fB-f\fR, \fB--follow\fR
Follow the cursor position as the cursor is moving.
.TP
\fB-g\fR, \fB--grow\fR
Grow the animation in size, rather than shrinking it.
.TP
\fB-h\fR, \fB--help\fR
Show help.
.TP
\fB-l\fR, \fB--line-width\fR \fI\,PIXELS\/\fR
Width of the lines.
.TP
\fB-o\fR, \fB--outline\fR
Draw an outline in the opposite color as well. Helps visibility on all
backgrounds.
.TP
\fB-s\fR, \fB--size\fR \fI\,PIXELS\/\fR
Maximum size the circle will grow to.
.TP
\fB-t\fR, \fB--transparent\fR
Make the window truly 'transparent'. This helps with some display issues when
following the cursor position, but it doesn't work well with all WMs, which is
why it's disabled by default.
.TP
\fB-w\fR, \fB--wait\fR \fI\,MICROSECONDS\/\fR
Time to wait before drawing the next circle.
.SH EXAMPLES
.PP
The defaults:
.RS
find-cursor --size 320 --distance 40 --wait 400 --line-width 4 --color black
.RE
.PP
Draw a solid circle:
.RS
find-cursor --size 100 --distance 1 --wait 20 --line-width 1
.SH LAUNCHING
.PP
You will want to map a key in your window manager to run \fIfind-cursor\fR. You
can also use \fIxbindkeys\fR, which should work with $any window manager.
.PP
I run it with \fIxcape\fR:
.RS
xcape -e 'Control_L=Escape;Shift_L=KP_Add'
.RE
.PP
When
.B
Left Shift
is tapped a
.B
Keypad Add
is sent; I configured my window manager to launch
.I
find-cursor
with that.
.PP
I don't have a numpad on my keyboard; you can also use
.B
F13
or some other unused key.
.SH AUTHORS
.PP
Martin Tournoij <martin@arp242.net>
.PP
The MIT license applies. See
.I
LICENSE
in the source distribution.
.PP
.I
https://github.com/Carpetsmoker/find-cursor
Loading…
Cancel
Save