GestureD (pronounced like "gesture dee") is a daemon-like tool for hand gestures. It acts as a standalone Python script that responds to hand gestures. Currently it is setup for Hyprland, but can be extended to other compositors via ports.
- SwayNC
- Hyprland
- Python 3.8+
opencv-pythonmediapipe
pip install -r requirements.txt
python src/main.py
Flags:
--debug: Enable OpenCV window and show camera--no-log: Disable logging to file
The model is downloaded automatically on first run to ~/.gestured/mdl.task.
./scripts/install.sh
Enter your sudo password, then run:
gestured
Note: You will need the libraries from
requirements.txtinstalled globally, otherwise the script wont work.
To open gestured globally.
Daily logs are written to ~/.gestured/logs/log-YYYY-MM-DD.txt.
| gesture | action |
|---|---|
| wave left | switch to previous workspace |
| wave right | switch to next workspace |
| hand up | scroll up (arrow key) |
| hand down | scroll down (arrow key) |
| peace sign (hold) | exit |
| pointer finger (hold) | launcher |
| fist (hold) | press Escape |
| three fingers + thumb on pinky (hold) | press Enter |
| ok sign (hold) | quit the active program (not gestured, another program like firefox) |
Note: Only one gesture is active at a time. Gestures are classified in priority order: fist -> three fingers -> peace -> pointer -> open hand.
Settings are auto-generated at ~/.gestured/config.ini on first run.
| key | default | description |
|---|---|---|
wave_thresh |
0.10 |
minimum hand travel distance to count as a wave |
min_speed |
0.010 |
minimum per-frame movement to register |
dir_purity |
0.80 |
ratio of frames that must agree on direction |
history |
20 |
number of frames to track |
cooldown |
0.9 |
seconds between gesture triggers |
hand_pt |
9 |
hand landmark point used for tracking |
launcher_hold |
0.5 |
seconds the pointer gesture must be held before triggering |
launcher_cmd |
rofi -show drun |
command to run when pointer gesture fires |
fist_hold |
0.5 |
seconds the fist must be held before triggering |
gesture_grace |
5 |
frames a gesture can drop out before its timer resets |
scroll_thresh |
0.06 |
minimum vertical travel to trigger a scroll step |
scroll_cooldown |
0.25 |
seconds between repeated scroll triggers while held |
confirm_hold |
0.5 |
seconds the three-finger gesture must be held before triggering |
ok_hold |
0.4 |
seconds the ok sign must be held before triggering |
BSD 3-Clause License. See LICENSE for more info.
