Add basic manpage and sync up README documentation
This commit is contained in:
parent
b4dd89ae3a
commit
51ecaea4e2
5 changed files with 105 additions and 16 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,3 +1,3 @@
|
||||||
slig
|
lisgd
|
||||||
slig.o
|
lisgd.o
|
||||||
config.h
|
config.h
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -26,5 +26,10 @@ install: all
|
||||||
cp -f lisgd ${DESTDIR}${PREFIX}/bin
|
cp -f lisgd ${DESTDIR}${PREFIX}/bin
|
||||||
chmod 755 ${DESTDIR}${PREFIX}/bin/lisgd
|
chmod 755 ${DESTDIR}${PREFIX}/bin/lisgd
|
||||||
|
|
||||||
|
mkdir -p ${DESTDIR}${PREFIX}/share/man/man1
|
||||||
|
cp lisgd.1 ${DESTDIR}${PREFIX}/share/man/man1
|
||||||
|
chmod 644 ${DESTDIR}${PREFIX}/share/man/man1
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f config.h
|
rm -f config.h
|
||||||
|
|
33
README.md
33
README.md
|
@ -1,10 +1,11 @@
|
||||||
# lisgd
|
# lisgd
|
||||||
|
|
||||||
Lisgd (libinput **synthetic** gesture daemon) lets you bind gestures based on
|
Lisgd (libinput synthetic gesture daemon) lets you bind gestures based on
|
||||||
libinput touch events to run specific commands to execute. For example,
|
libinput touch events to run specific commands to execute. For example,
|
||||||
dragging left to right with one finger could execute a particular command
|
dragging left to right with one finger could execute a particular command
|
||||||
like launching a terminal. L-R, R-L, U-D, and D-U swipe gestures are
|
like launching a terminal. Directional L-R, R-L, U-D, and D-U gestures and
|
||||||
supported with 1 through n fingers.
|
diagnoal LD-RU, RD-LU, UR-DL, UL-DR gestures are supported with 1 through
|
||||||
|
n fingers.
|
||||||
|
|
||||||
Unlike other libinput gesture daemons, lisgd uses touch events to
|
Unlike other libinput gesture daemons, lisgd uses touch events to
|
||||||
recognize **synthetic swipe gestures** rather than using the *libinput*'s
|
recognize **synthetic swipe gestures** rather than using the *libinput*'s
|
||||||
|
@ -31,16 +32,22 @@ Flags:
|
||||||
|
|
||||||
- **-d [devicenodepath]**: Defines the dev filesystem device to monitor
|
- **-d [devicenodepath]**: Defines the dev filesystem device to monitor
|
||||||
- Example: `lisgd -d /dev/input/input1`
|
- Example: `lisgd -d /dev/input/input1`
|
||||||
- **-t [threshold_units]**: Number of libinput units (number) minimum to recognize a gesture
|
- **-t [threshold_units]**: Threshold in libinput units (pixels) after which a
|
||||||
|
gesture registers. Defaults to 300.
|
||||||
- Example: `lisgd -t 400`
|
- Example: `lisgd -t 400`
|
||||||
|
- **-r [milli]**: Number of degrees offset each 45-degree interval may still
|
||||||
|
be recognized within. Maximum value is 45. Default value is 15. E.g. U-D
|
||||||
|
is a 180 degree gesture but with 15 degrees of leniency will be recognized
|
||||||
|
between 165-195 degrees.
|
||||||
|
- Example: `lisgd -r 20`
|
||||||
|
- **-m [timeoutms]**: Number of milliseconds gestures must be performed within
|
||||||
|
to be registered. After the timeoutms value; the gesture won't be registered.
|
||||||
|
- Example: `lisgd -m 1200`
|
||||||
- **-v**: Verbose mode, useful for debugging
|
- **-v**: Verbose mode, useful for debugging
|
||||||
- Example: `lisgd -v`
|
- Example: `lisgd -v`
|
||||||
- **-g [fingers,start,end,command]**: Defines a gesture; wherein fingers is a integer, start/end are {l,r,d,u}, and command is the command to execute
|
- **-g [nfingers,gesture,command]**: Allows you to bind a gesture wherein
|
||||||
- Single Gesture Example: `lisgd -g "1,l,r,notify-send swiped lr"`
|
nfingers is an integer, gesture is one of {LR,RL,DU,UD,DLUR,URDL,ULDR,DLUR},
|
||||||
- Multiple Gestures Example: `lisgd -g "1,l,r,notify-send swiped lr" -g "1,r,l,noitfy-send swiped rl"`
|
and command is the shell command to be executed. The -g option can be used
|
||||||
|
multiple times to bind multiple gestures.
|
||||||
Full commandline-based configuration example:
|
- Single Gesture Example: `lisgd -g "1,LR,notify-send swiped lr"`
|
||||||
|
- Multiple Gestures Example: `lisgd -g "1,LR,notify-send swiped lr" -g "1,RL,noitfy-send swiped rl"`
|
||||||
```
|
|
||||||
lisgd -d /dev/input/input1 -g "1,l,r,notify-send swiped lr" -t 200 -v
|
|
||||||
```
|
|
||||||
|
|
78
lisgd.1
Normal file
78
lisgd.1
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
.TH LISGD 1
|
||||||
|
|
||||||
|
.SH NAME
|
||||||
|
lisgd \- libinput synthetic gesture daemon
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B lisgd
|
||||||
|
[\fB\-t\fR \fIthreshold\fR]
|
||||||
|
[\fB\-d\fR \fIdegreesofleniency\fR]
|
||||||
|
[\fB\-m\fR \fItimeoutms\fR]
|
||||||
|
[\fB\-o\fR \fIorientation\fR]
|
||||||
|
[\fB\-v\fR \fIverbose\fR]
|
||||||
|
[\fB\-g\fR \fIgesturespec\fR]...
|
||||||
|
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.B lisgd
|
||||||
|
(or libinput **synthetic** gesture daemon) lets you bind gestures based on
|
||||||
|
libinput touch events to run specific commands to execute. For example,
|
||||||
|
dragging left to right with one finger could execute a particular command
|
||||||
|
like launching a terminal. Directional L-R, R-L, U-D, and D-U gestures and
|
||||||
|
diagnoal LD-RU, RD-LU, UR-DL, UL-DR gestures are supported with 1 through
|
||||||
|
n fingers.
|
||||||
|
|
||||||
|
Unlike other libinput gesture daemons, lisgd uses touch events to
|
||||||
|
recognize synthetic swipe gestures rather than using the libinput's
|
||||||
|
gesture events. The advantage of this is that the synthetic gestures
|
||||||
|
you define via lisgd can be used on touchscreens, which normal libinput
|
||||||
|
gestures don't support.
|
||||||
|
|
||||||
|
This program was built for use on the Pinephone however it could be used in
|
||||||
|
general for any device that supports touch events, like laptop touchscreens
|
||||||
|
or similar. You may want to adjust the threshold depending on the device
|
||||||
|
you're using.
|
||||||
|
|
||||||
|
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
.BR \-d ", " \-d\ devicepath\fR
|
||||||
|
Path of the dev filesystem device to monitor (like /dev/input/event1).
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.BR \-t ", " \-t\ distancethreshold\fR
|
||||||
|
Threshold in libinput units (pixels) after which a gesture registers. Defaults
|
||||||
|
to 300.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.BR \-r ", " \-r\ degreesofleniency\fR
|
||||||
|
Number of degrees offset each 45-degree interval may still be recognized within.
|
||||||
|
Maximum value is 45. Default value is 15. E.g. U-D is a 180 degree gesture
|
||||||
|
but with 15 degrees of leniency will be recognized between 165-195 degrees.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.BR \-m ", " \-m\ timeoutms\fR
|
||||||
|
Number of milliseconds gestures must be performed within to be registered. After
|
||||||
|
the timeoutms value; the gesture won't be registered.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.BR \-v \fR
|
||||||
|
Enables verbose mode which prints debugging messages.
|
||||||
|
|
||||||
|
.TP
|
||||||
|
.BR \-g ", " \-g\ nfingers,gesture,command\fR
|
||||||
|
Allow you to bind a gesture wherein nfingers is an integer, gesture is
|
||||||
|
one of {LR,RL,DU,UD,DLUR,URDL,ULDR,DLUR}, and the shell command to be executed.
|
||||||
|
|
||||||
|
The -g option can be used multiple times to bind multiple gestures.
|
||||||
|
|
||||||
|
.SH SEE ALSO
|
||||||
|
lisgd was built as part of Sxmo; an project to create a Pinephone UI out of
|
||||||
|
simple and suckless programs. See: http://sr.ht/mil/Sxmo
|
||||||
|
|
||||||
|
.SH AUTHOR
|
||||||
|
.BR lisgd
|
||||||
|
is written by Miles Alan <m@milesalan.com>
|
||||||
|
|
||||||
|
.SH CONTRIBUTING
|
||||||
|
Bugs and feature dicussions can be sent to ~mil/sxmo-devel@lists.sr.ht
|
1
lisgd.c
1
lisgd.c
|
@ -160,7 +160,6 @@ touchmotion(struct libinput_event *e)
|
||||||
{
|
{
|
||||||
struct libinput_event_touch *tevent;
|
struct libinput_event_touch *tevent;
|
||||||
int slot;
|
int slot;
|
||||||
double x, y;
|
|
||||||
|
|
||||||
tevent = libinput_event_get_touch_event(e);
|
tevent = libinput_event_get_touch_event(e);
|
||||||
slot = libinput_event_touch_get_slot(tevent);
|
slot = libinput_event_touch_get_slot(tevent);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue