Don't really need a manpage

pull/21/head
Martin Tournoij 4 years ago
parent 9ed9ec581c
commit 49f0ef9270

@ -1,12 +1,9 @@
CC?=cc
CFLAGS?=-std=c99 -pedantic -Wall -Os
PREFIX?=/usr/local
MANPREFIX?=$(PREFIX)/share/man
all:
${CC} ${CFLAGS} ${LDFLAGS} -o find-cursor find-cursor.c -lX11 -lXext -lXfixes
install:
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

@ -26,8 +26,7 @@ this is NOT maintained (or supported) by me. See #19.
Usage
-----
See `find-cursor(1)` or `find-cursor -h` to see some options for controlling the
appearance.
See `find-cursor -h` to see some options for controlling the appearance.
Launching
---------

@ -1,114 +0,0 @@
.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 ]
.RB [ \-r
.IR repeat ]
.SH DESCRIPTION
.B find-cursor
highlights the cursor position by drawing circles 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 window
managers, which is why it's disabled by default.
.TP
\fB-w\fR, \fB--wait\fR \fI\,TIME\/\fR
Time to wait before drawing the next circle, in tenths of milliseconds.
.TP
\fB-r\fR, \fB--repeat\fR \fI\,N\/\fR
Number of times to repeat the animation. Use 0 to repeat indefinitely.
.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
.RE
.PP
Always draw a full circle on top of the cursor:
.RS
find-cursor --repeat 0 --follow --distance 1 --wait 1 --line-width 16 --size 16
.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/arp242/find-cursor

@ -42,7 +42,8 @@ static struct option longopts[] = {
};
void usage(char *name) {
printf("Usage: %s [-stplcftgr]\n", name);
printf("find-cursor highlights the cursor position by drawing circles around it.\n");
printf("https://github.com/arp242/find-cursor\n");
printf("\n");
printf("Flags:\n");
printf(" -h, --help Show this help.\n");
@ -74,6 +75,19 @@ void usage(char *name) {
printf(" %s --size 100 --distance 1 --wait 20 --line-width 1\n\n", name);
printf(" Always draw a full circle on top of the cursor:\n");
printf(" %s --repeat 0 --follow --distance 1 --wait 1 --line-width 16 --size 16\n", name);
printf("\n");
printf("Launching:\n");
printf(" You will want to map a key in your window manager to run find-cursor.\n");
printf(" You can also use xbindkeys, which should work with any window manager.\n");
printf("\n");
printf(" I run it with xcape:\n");
printf(" xcape -e 'Control_L=Escape;Shift_L=KP_Add'\n");
printf("\n");
printf(" When Left Shift is tapped a Keypad Add is sent; I configured my window\n");
printf(" manager to launch find-cursor with that.\n");
printf("\n");
printf(" I don't have a numpad on my keyboard; you can also use F13 or some\n");
printf(" other unused key.\n");
}
// Parse number from commandline, or show error and exit if it's not a number.

Loading…
Cancel
Save