Usage

Usage

Command-Line Usage

# Automatic device detection
python3 draggg.py

# Specify device manually
python3 draggg.py --device /dev/input/event5

# Use configuration file
python3 draggg.py --config ~/.config/three-finger-drag/config.json

# Verbose logging
python3 draggg.py --verbose

Command-Line Options

--device PATH          Specify touchpad device path manually
--threshold N          Movement threshold in pixels (default: 10)
--drag-sensitivity F   Drag sensitivity multiplier (default: 0.25)
--left-handed          Use rightmost finger for left-handed users
--leading-weight F     Weight for leading finger (default: 1.5)
--other-weight F       Weight for other fingers (default: 0.3)
--config PATH          Path to configuration file
--verbose, -v          Enable verbose/debug logging

Configuration File

Create a configuration file at ~/.config/three-finger-drag/config.json:

{
  "device": "/dev/input/event5",
  "threshold": 10,
  "drag_sensitivity": 0.25,
  "left_handed": false,
  "leading_finger_weight": 1.5,
  "other_fingers_weight": 0.3
}

Command-line arguments override configuration file settings.

Running as a Systemd Service

For detailed step-by-step instructions on building, testing, and setting up draggg as a background service that starts on boot, see the Building and Testing section above.

Quick setup (if you’ve already tested manually):

  1. Copy and configure service file:

    mkdir -p ~/.config/systemd/user
    cp draggg.service ~/.config/systemd/user/
    # Edit the file to set correct paths (see detailed guide above)
  2. Enable and start:

    systemctl --user daemon-reload
    systemctl --user enable draggg.service
    systemctl --user start draggg.service
  3. Check status:

    systemctl --user status draggg.service
    journalctl --user -u draggg.service -f  # View logs