





















1
After some trial and error, I’ve got my MX4 Master mouse to send haptic pulses, per event, per application.
The file watch.py (for real time monitoring) works with the MX4 mouse connected via Bolt or Bluetooth. But you have to have Solaar installed though. I combine watch.py with an autostart.
There is also demo.py to test all the sixteen haptic pulses (three seconds). Level is controllable from Solaar, or from demo.py itself (0 to 100)
https://github.com/Physics-of-Data/mx4-haptic-linux
The MX Master 4 ships with 16 named waveforms. Pick by feel:
| Strong / distinct | Soft / subtle |
|---|---|
SHARP STATE CHANGE |
SQUARE |
DAMP STATE CHANGE |
WAVE |
SHARP COLLISION |
FIREWORK |
DAMP COLLISION |
MAD |
SUBTLE COLLISION |
KNOCK |
HAPPY ALERT |
JINGLE |
ANGRY ALERT |
RINGING |
COMPLETED |
WHISPER COLLISIO |
In watch.py you set up the applications to trigger haptic pulses, or those you want muted:
# Map application names (lowercase) to specific haptic patterns
APP_PATTERNS = {
"claude code": "COMPLETED",
"firefox": "KNOCK",
"obsidian": "WAVE",
"dolphin": "SUBTLE COLLISION",
"rsnapshot": "JINGLE",
"cloud-drive-ui": "KNOCK",
}
# Apps whose notifications should never trigger a haptic (lowercase).
MUTED_APPS = {
"spectacle",
}
Enjoy!
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。