Skip to content

Gestures for user-defined actions using Google's MediaPipe hand recognition.

License

Notifications You must be signed in to change notification settings

annyman/air-gesture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖐️ Air Gesture

Control your Linux workspace with a flick of your wrist. Powered by Google's MediaPipe for high-performance, low-latency tracking.

image

🚀 The Concept

Air Gesture turns your webcam into a touchless controller. It tracks your index finger and identifies rapid "swipes" to trigger system commands.


⚙️ Configuration

Your config lives here: ~/.config/air-gesture/config.toml

Sample Config

[settings]
threshold = 150       # Sensitivity (lower = easier to trigger)
history_size = 10     # Motion smoothness (higher = more stable)

[gestures]
SWIPE_LEFT = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut 'Switch to Previous Desktop'"
SWIPE_RIGHT = "qdbus org.kde.kglobalaccel /component/kwin invokeShortcut 'Switch to Next Desktop'"
Option What it does
threshold Distance your finger must travel to count as a "swipe."
history_size The number of frames tracked to verify a gesture.
gestures Map any swipe to a terminal command or script.

📦 Setup

Linux

  1. Clone & Enter
git clone https://github.com/your-username/air-gesture.git
cd air-gesture
  1. Run Installer
python scripts/setup.py

Note: This script fetches the hand_landmarker.task AI model (~7MB) from Google's API. 3. Launch

air-gesture --enable-camera

Windows support on the way.

🖥️ Background Usage

  • X11 (.xinitrc): Add air-gesture & to your file to start it with X11.
  • Wayland/DEs: Add air-gesture to your Startup Applications list.

⚠️ Avoiding Common Mistakes

  • Light it up: The tracker needs to see your hand clearly. Avoid dark rooms.
  • Palm check: Keep your palm facing the camera. It helps the AI anchor your finger position.
  • Clean view: Make sure no other apps are hogging your /dev/video0.

❤️ Credits

  • Engine: Google MediaPipe.
  • Model: Pre-trained model usage is subject to Google's TOS.

made by annyman

Releases

No releases published

Packages

No packages published

Languages