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.1

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.1
File Size Uploaded Provenance Actions
discern_discord-0.3.1.tar.gz 9.9 kB Without provenance Details for discern_discord-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 19.9 kB

Release files / discern_discord-0.3.1.tar.gz

Download URL discern_discord-0.3.1.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6770ad4b8db29dce3ec31cc9ccc436f538a0533aec9651f336e5d6a7e4c1a001
BLAKE2b-256 checksum
How to use checksums
59f6564ffbeb0dd7c1135a1fa40921316b895adbb490e6ff95d4679b1f453f37
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.1-py3-none-any.whl

Download URL discern_discord-0.3.1-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3fd498392723a1eb821c8e2dd93a59325f0c0c58e2c29454f4b0906b2ef567b4
BLAKE2b-256 checksum
How to use checksums
8f76b7f133edc5a4386deadb6495ace2fe6b5c0b56ab4b1604b28156762b2982
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.1

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