discern-discord
disc(ord) + discern — distinguishes your Discord notifications by type.
Colored tray indicator for Discord on Linux.
| Color | Meaning |
|---|---|
| Red | DM, @mention, @everyone, @here |
| Blue | Generic channel message |
| Grey | Nothing unread |
Resets to grey automatically when you open Discord and read your messages.
Install
From source (any distro)
git clone https://github.com/polpanka/discern-discord.git
cd discern-discord
bash install.sh
The script detects your package manager (apt/dnf/pacman/zypper) and installs dependencies automatically.
From PyPI
pip install discern-discord
Note:
dbus-pythonandPyGObjectrequire system libraries. If pip fails, install them via your package manager first (see Dependencies).
From AUR (Arch/Manjaro)
yay -S discern-discord
Configuration
Edit ~/.config/discern-discord/settings.json:
{
"discord_username": "Paolo",
"mention_keywords": ["urgente", "importante"]
}
- discord_username — your Discord display name, to detect
@Paoloin channel messages - mention_keywords — extra words that trigger the red indicator (case-insensitive)
Usage
# Run directly
discern-discord
# Or as a systemd user service
systemctl --user enable --now discern-discord
Test notifications
discern-discord &
python3 test/send_test_notification.py dm # → red
python3 test/send_test_notification.py generic # → blue
python3 test/send_test_notification.py mention # → red
python3 test/send_test_notification.py clear # → grey
How it works
Discord (Electron)
│
│ org.freedesktop.Notifications.Notify
▼
D-Bus session bus ◄── discern-discord (eavesdrop / dbus-monitor fallback)
│
├── title has no "#"? → DM (red)
├── body has @you/@everyone? → mention (red)
└── otherwise → generic (blue)
Auto-reset when you read messages:
- LauncherEntry D-Bus — Discord signals
count-visible: falsewhen its badge clears - Window focus — if Discord is focused for 3+ seconds (uses
xdotoolorxprop, optional) - Manual — right-click tray icon → Clear
Dependencies
| Ubuntu/Debian | Fedora | Arch | openSUSE | |
|---|---|---|---|---|
| D-Bus Python | python3-dbus | python3-dbus | python-dbus | python3-dbus-python |
| PyGObject | python3-gi | python3-gobject | python-gobject | python3-gobject |
| AppIndicator | gir1.2-ayatanaappindicator3-0.1 | libayatana-appindicator-gtk3 | libayatana-appindicator | typelib-1_0-AyatanaAppIndicator3-0_1 |
| xdotool or xprop (optional) | xdotool | xdotool | xdotool | xdotool |
Uninstall
bash uninstall.sh
# or
pip uninstall discern-discord
License
MIT
Metadata
Release files for discern-discord 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| discern_discord-0.1.0.tar.gz | 9.8 kB | Without provenance | Details for discern_discord-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| discern_discord-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for discern_discord-0.1.0-py3-none-any.whl |
Total release size: 19.7 kB
Release files / discern_discord-0.1.0.tar.gz
| Download URL | discern_discord-0.1.0.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c0d21bad1496ea41d496b012640dd7d325649b9aedc4e229fc3d2f01848cc67
|
|
BLAKE2b-256 checksum How to use checksums |
5aff05b72e60dae1a0fbfe25051e50a68007899a8709e1627b598b5762633eac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / discern_discord-0.1.0-py3-none-any.whl
| Download URL | discern_discord-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e0da3141b5a0dd0db92e3c236fa17862c6798c4152e79666dca5d649317ab9a
|
|
BLAKE2b-256 checksum How to use checksums |
9d883f7dced47be4560d357a27a96e3c696288f8c031e95cbf74c875795cbece
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for discern-discord 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.