Haptic feedback daemon for Logitech MX Master 4 mouse with Hyprland integration.
- Hyprland IPC integration for window events
- Custom IPC server for manual haptic triggers
- Support for both Bolt and Bluetooth connections
- C++23 compatible compiler (GCC 13+, Clang 17+)
- Meson >= 1.0.0
- Ninja
- hidapi
- toml++ (fetched automatically if not found)
meson setup build --buildtype=release
meson compile -C buildmeson install -C buildConfiguration file is searched in:
$XDG_CONFIG_HOME/mx4hyprland/config.toml./config.toml
# Default haptic effect for events not explicitly configured
# default_effect = 1
[events]
activewindowv2 = 1
workspace = 2
openwindow = 3
closewindow = 4
fullscreen = 5
[events.openlayer]
default = 1
[events.openlayer.args]
swaync-notification-window = 10
rofi = 6
[events.closelayer]
default = 1
[events.closelayer.args]
swaync-notification-window = 11| ID | Description |
|---|---|
| 0 | Stop/Off |
| 1-15 | Various haptic patterns |
# Run with default config
mx4hyprland
# Specify config file
mx4hyprland -c /path/to/config.toml
# Enable debug logging
mx4hyprland -l debugSIGHUP- Reload configurationSIGTERM/SIGINT- Graceful shutdown
Send haptic effect via Unix socket:
echo "5" | nc -U $XDG_RUNTIME_DIR/mx4hyprland.sockCreate ~/.config/systemd/user/mx-haptics.service:
[Unit]
Description=MX Master 4 Haptic Feedback Daemon
After=graphical-session.target
[Service]
Type=simple
ExecStart=%h/.local/bin/mx4hyprland
Restart=on-failure
RestartSec=5
[Install]
WantedBy=graphical-session.targetEnable and start:
systemctl --user enable --now mx-haptics.service