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

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.7
File Size Uploaded Provenance Actions
discern_discord-0.3.7.tar.gz 9.8 kB With provenance Details for discern_discord-0.3.7.tar.gz

Built distribution (wheel)

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

Total release size: 19.8 kB

Release files / discern_discord-0.3.7.tar.gz

Download URL discern_discord-0.3.7.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
38f98192e4762aa14dad5b5be6af0d77564f1e12ab2c237a6184781904fc8d55
BLAKE2b-256 checksum
How to use checksums
444e299beaa14fd8d77d369c4ced83de26c68ea51d23a0f77a97e7179131dcf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / discern_discord-0.3.7-py3-none-any.whl

Download URL discern_discord-0.3.7-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9df1b761314c6e8dffe924bceff1632f7e1ca41361041659bb0da472f05395c
BLAKE2b-256 checksum
How to use checksums
392bf60df648086bcf67c1e919ab266025af7c0db1bc63cbcc7db969fe85e1ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for discern-discord 0.3.7

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for discern_discord-0.3.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.3.7 This release

2 release files Full provenance

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