richard fe74d20a3b Add xdg-desktop-portal GlobalShortcuts backend for Wayland (Linux)
Implements a three-tier hotkey backend chain on Linux:
1. xdg-desktop-portal GlobalShortcuts — works on Hyprland, GNOME, and KDE
   without any privilege setup; requires one bind line in hyprland.conf for Hyprland
2. evdev — fallback for users in the input group or with systemd-logind seat ACLs
3. X11 XGrabKey — last resort for plain X11 sessions

Fixes double-fire on Hyprland by filtering signals by sig.Name to guard
against Deactivated events leaking through the Activated match rule.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 20:40:18 +03:00
2026-06-01 17:49:11 +03:00

discord-lobby-mute

Runs in the system tray as a console app. Press a configurable global hotkey to toggle server-mute for everyone in a Discord voice channel.

Setup

  1. Create a bot at https://discord.com/developers/applications
    • Enable Server Members Intent under Privileged Gateway Intents
    • Grant the Mute Members permission when inviting it to your server
  2. Place config.json next to the .exe and fill in your values (see below)
  3. Run discord-lobby-mute.exe

config.json

{
    "token": "YOUR_BOT_TOKEN",
    "guild_id": "YOUR_SERVER_ID",
    "channel_id": "YOUR_VOICE_CHANNEL_ID",
    "keybind": "ctrl+shift+m",
    "exempt_users": ["YOUR_DISCORD_USER_ID"]
}

exempt_users is optional. Any user IDs listed there will never be muted. Add your own ID to exclude yourself when pressing the keybind.

To get IDs: enable Developer Mode in Discord settings, then right-click a server, channel, or user and choose Copy ID.

Keybind format

modifier+modifier+key — modifiers come first, key last. Case-insensitive.

Examples: ctrl+shift+m, alt+f9, ctrl+alt+delete

Modifiers

Value Windows Linux macOS
ctrl Control Control Control
shift Shift Shift Shift
alt Alt Alt (Mod1) Option
win Windows key Super (Mod4) Cmd
super Windows key Super (Mod4) Cmd
cmd Cmd

Keys

Value Key
a z Letter keys
0 9 Number row
f1 f20 Function keys
space Space
enter / return Enter / Return
escape / esc Escape
tab Tab
delete Delete
left Left arrow
right Right arrow
up Up arrow
down Down arrow

Build

# Windows
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o discord-lobby-mute.exe .

# Linux
go build -ldflags="-s -w" -o discord-lobby-mute .

# macOS
go build -ldflags="-s -w" -o discord-lobby-mute .

macOS: the app needs Accessibility permission to register global hotkeys. Grant it in System Settings → Privacy & Security → Accessibility.

Linux: requires X11 (libx11-dev) and CGO enabled.

Tests

go test ./...
S
Description
Discord bot that listens to keybinds and then mutes every user except yourself in the specified voice channel
Readme 3.2 MiB
v1.0.3 Latest
2026-06-01 17:40:18 +00:00
Languages
Go 100%