This is my fork of sxiv's lisgd. https://git.sr.ht/~mil/lisgd
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
2.0 KiB

4 years ago
# lisgd
Lisgd (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. L-R, R-L, U-D, and D-U swipe 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.
4 years ago
This program was built for use on the [Pinephone](https://www.pine64.org/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.
4 years ago
## Configuration
Configuration can be done in two ways:
1. Through a suckless style `config.h`; see the `config.def.h`
2. Through commandline flags which override the default config.h values
### Suckless-style config.h based configuration
4 years ago
Copy the example `config.def.h` configuration to `config.h`.
4 years ago
### Commandline flags based configuration
Flags:
4 years ago
4 years ago
- **-d [devicenodepath]**: Defines the dev filesystem device to monitor
- Example: `lisgd -d /dev/input/input1`
- **-t [threshold_units]**: Number of libinput units (number) minimum to recognize a gesture
- Example: `lisgd -t 400`
- **-v**: Verbose mode, useful for debugging
- 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
- Single Gesture Example: `lisgd -g "1,l,r,notify-send swiped lr"`
- Multiple Gestures Example: `lisgd -g "1,l,r,notify-send swiped lr" -g "1,r,l,noitfy-send swiped rl"`
4 years ago
Full commandline-based configuration example:
4 years ago
4 years ago
```
lisgd -d /dev/input/input1 -g "1,l,r,notify-send swiped lr" -t 200 -v
4 years ago
```