- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| bin | ||
| docs/superpowers | ||
| icons | ||
| .gitignore | ||
| manifest.json | ||
| README.md | ||
opendeck-mute-toggle
OpenDeck plugin: one Stream Deck button arms/disarms mouse4/mouse5 as a push-to-mute for Discord. Hold mouse4 or mouse5 while armed and Discord mutes; release and it unmutes. Disarmed, the buttons do nothing to Discord (so they're free for other uses, e.g. in-game chat binds) and the icon shows which state you're in.
Why
Built for games that already use mouse4/mouse5 for their own chat, where
binding Discord's own keybind to the same buttons would collide. This
plugin only intercepts them (via a non-exclusive evdev tap, so the game
still receives the events normally) while explicitly armed.
Requirements
- OpenDeck on Linux
python-evdev(pacman -S python-evdevon Arch;pip install evdevelsewhere)websocket-client(pip install websocket-clientif not already present)- Your user must be in the
inputgroup (sudo usermod -aG input $USER, then log out/in) so the plugin can read the mouse device - A Discord desktop client running locally (uses its local RPC socket)
Setup
- Register a Discord application at
https://discord.com/developers/applications — note its Client ID and
Client Secret (OAuth2 page). No redirect URI setup needed beyond adding
http://localhostunder OAuth2 → Redirects. - Create
~/.config/discord-mute-toggle/app.json:{"client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET"}chmod 600it. This directory also holdstokens.json, written automatically on first authorize — don't commit either file, they're both gitignored. - Install into OpenDeck (must be a real copy, not a symlink — see
the design doc's "Gotchas" section for why):
Restart OpenDeck, add the "Push-to-Mute Toggle" action to a button.rsync -a --delete ./ ~/.config/opendeck/plugins/dev.lvxy.mutetoggle.sdPlugin/ \ --exclude .git --exclude docs - First run authorizes Discord: either run
python3 bin/mute-toggle.py --selfcheckonce from a terminal (so you can see and click the Discord authorize prompt), or just press the OpenDeck button — either path writestokens.jsonafter you approve.
Usage
- Press the button once to arm (icon shows ARMED). Press again to disarm (icon shows OFF).
- While armed, holding mouse4 or mouse5 mutes Discord; releasing unmutes. Either button (or both) held counts as muted.
- Disarming while a button is held un-mutes immediately — never gets stuck muted.
Development
No test framework — this is a small, single-file, event-driven personal
utility. python3 bin/mute-toggle.py --selfcheck exercises the Discord
RPC/token path standalone (no OpenDeck needed). Full design notes and the
protocol details (reverse-engineered from OpenDeck's own Rust source,
since no Python SDK exists) are in
docs/superpowers/specs/2026-08-19-opendeck-mute-toggle-design.md.