![crates.io] ![docs.rs] ![license] ![build status]
lillinput
is a small utility written in Rust for connecting [libinput
]
gestures into:
* commands for the [i3
] tiling window manager IPC interface
* shell commands
Please be aware that this project is in beta, and was started for scratching
a specific itch - allowing three-finger swipe for changing between workspaces
in i3
under a personal setup. It aims to stay small (hence the [name]) and
biased towards custom needs (and a bit of a Rust playground).
Upon invocation, lillinput
will listen to libinput
events until stopped. By
default, the i3
action will be enabled, with the workspace next
configured
for the "three finger right swipe" gesture, and the workspace prev
for the
"three finger left swipe" gesture.
The full list of options can be retrieved via:
lillinput --help
```
...
OPTIONS:
-e, --enabled-action-types
-s, --seat <seat> libinput seat [default: seat0]
--swipe-down-3 <swipe-down-3>... actions the three-finger swipe down
--swipe-left-3 <swipe-left-3>... actions the three-finger swipe left
--swipe-right-3 <swipe-right-3>... actions the three-finger swipe right
--swipe-up-3 <swipe-up-3>... actions the three-finger swipe up
-t, --threshold <threshold>
minimum threshold for position changes [default: 20.0]
```
Each --swipe-{foo}
argument accepts one or several "actions", in the form
{type}:{command}
. For example, the following command specifies an action
for moving to the next workspace in i3
, and an action for creating a file
when swiping up:
lillinput --swipe-up-3 "i3:workspace next" --swipe-up-3 "command:touch myfile"
Currently, the available action types are i3
and command
.
The following system-level libraries are required by this crate dependencies:
sudo aptitude install libudev-dev libinput-dev
This create relies heavily on the wonderful work on the [input
] and [i3ipc
]
crates (among others) - kudos to their maintainers for making them available.
Outside rust, the following projects provide a more complete solution for using
libinput
gestures:
* [libinput-gestures
]
* [fusuma
]
* [geebar-libinput
]
Any contribution is welcome, please issue or PR away!
This project is licensed under [BSD-3-Clause].