Skip to main content

discern-discord

disc(ord) + discern — distinguishes your Discord notifications by type.

Colored tray indicator for Discord on Linux.

demo

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-python and PyGObject require 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 @Paolo in 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:

  1. LauncherEntry D-Bus — Discord signals count-visible: false when its badge clears
  2. Window focus — if Discord is focused for 3+ seconds (uses xdotool or xprop, optional)
  3. 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.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for discern-discord 0.3.2
File Size Uploaded Provenance Actions
discern_discord-0.3.2.tar.gz 10.0 kB Without provenance Details for discern_discord-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for discern-discord 0.3.2
File Interpreter ABI Platform Actions
discern_discord-0.3.2-py3-none-any.whl Python 3 none any Details for discern_discord-0.3.2-py3-none-any.whl

Total release size: 20.0 kB

Release files / discern_discord-0.3.2.tar.gz

Download URL discern_discord-0.3.2.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5b1059c2a79ae25daab29daeef0e37a57f7e296d5cf880818d40fbc737bd085b
BLAKE2b-256 checksum
How to use checksums
c416c0a50b74e143ca71f3dcf8a01b3f1926c8112a02724ac69dd09fcbe788a7
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.3.2-py3-none-any.whl

Download URL discern_discord-0.3.2-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a233bdccc826061c4bc00b1c1624443d8eb68e88fe66d0a7d0821a8e45be5455
BLAKE2b-256 checksum
How to use checksums
c54046bbec8df23ee89e945118c05c6ff19b5ff71a69a5aec19a3677f904034f
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.3.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page