Last Rich Presence
Windows app for accurate, polished Discord Rich Presence for media, creative, and productivity workflows. Built with C++20 and WinUI 3.
Overview
Last Rich Presence keeps Discord aligned with what you are actually doing on Windows, across three independent activity lanes: media playback read from Windows media sessions, creative work detected from Adobe-family desktop apps, and productivity work detected from Office-family apps. Each lane owns a separate Discord application, so a track, a Photoshop session, and a Word document can appear as distinct cards rather than fighting over one status.
The app is single-instance and tray-first: it can start minimized, close to tray, and redirect a second launch back to the running instance. An optional Chromium extension improves timeline accuracy for web players that Windows reports poorly.
Key Features
- Media Lane Reads active Windows media sessions (GSMTC) and builds presence with title, artist, album, playback state, and timeline.
- Creativity Lane Detects 23 Adobe-family desktop apps, from Photoshop and Premiere Pro through the Substance 3D suite, with project-name and window-title display.
- Productivity Lane Detects Word, Excel, PowerPoint, OneNote, Access, Publisher, Visio, Project, and Codex, with project or file-name display.
- Three Discord Apps Each lane connects under its own application ID, so lanes coexist as separate Discord cards instead of overwriting one another.
- Browser Companion Optional MV3 extension supplies high-confidence hints for 14 web players over Chromium native messaging.
- Hint Arbitration Browser hints are scored on playback state, tab visibility, confidence, and age, so a stale background tab cannot hijack the timeline.
- Privacy Modes Per-lane Normal, App Only, and Private modes, plus a sensitive-keyword filter and a blocked app and site term list.
- Detection Modes Choose whether a lane follows the foreground window, any visible window, or foreground with visible fallback.
- Tray-First Workflow Single instance, close to tray, launch on startup, start minimized, and a global Rich Presence master toggle.
- Diagnostics Export and import settings, inspect detection state, and enable source debug mode when a lane misbehaves.
Activity Lanes
The three lanes run independently. Each has its own detector, its own presence manager, and its own Discord application ID, and each can be disabled without affecting the others.
| Lane | Source | Discord Card |
|---|---|---|
| Media | Windows media sessions (GSMTC), optionally refined by browser hints | Dedicated application |
| Creativity | Adobe-family desktop windows | Dedicated application |
| Productivity | Office-family desktop windows and Codex | Dedicated application |
Detection Modes
The Creativity and Productivity lanes decide which app to report using one of three strategies.
| Mode | Behaviour |
|---|---|
| ForegroundPreferredVisibleFallback | Default. Reports the focused app; falls back to any visible supported window when focus moves elsewhere. |
| ForegroundOnly | Reports only the app you are actively focused on. Presence clears the moment you alt-tab away. |
| VisibleWindowOnly | Reports any open supported window, whether or not it holds focus. |
Privacy Modes
| Mode | What Discord sees |
|---|---|
| Normal | App name plus the project or document name. |
| AppOnly | App name only. File and project names are withheld. |
| Private | A generic card. Neither the app nor the document is named. |
Conflict & Idle Behaviour
When media and creative activity are live at once, CreativePriorityMode decides which wins: Auto, PreferMedia, or PreferCreative. When an app closes, CreativeIdleBehavior either holds the last card for five seconds (HoldLast5Seconds) or clears it at once (ClearImmediately), which avoids flicker when you are switching between documents.
Installation & Setup
Click the Download button above for the latest installer. Requires Windows 10 or 11 and the Discord desktop client, running. The web client does not expose the local IPC socket that Rich Presence needs.
Building from Source
Requires Visual Studio 2026 with the Desktop development for C++ workload, the MSVC v145 toolset, Node.js on PATH for the extension syntax checks, and Inno Setup 6 if you intend to produce the unpackaged installer.
| Configuration | Purpose |
|---|---|
| Debug / Release | Standard development builds. |
| Release-Inno | Unpackaged, self-contained build for Inno installer releases. |
| Release-MSIX | Packaged MSIX build path. |
The verification script restores NuGet packages, builds the solution, runs the extension's JavaScript syntax checks, executes the native guard tests, validates release artifacts, and performs a launch smoke test.
.\scripts\verify.ps1 -Configuration Debug -Platform x64
# Non-interactive runners have no desktop session for the launch smoke test
.\scripts\verify.ps1 -Configuration Debug -Platform x64 -SkipLaunchSmoke
# The MSIX path installs the package, launches it by identity, then uninstalls
.\scripts\verify.ps1 -Configuration Release-MSIX -Platform x64
Browser Extension & Hint Contract
Windows reports browser playback poorly: the timeline is often missing or stale. The optional MV3 extension fills that gap by reading the page directly and sending the desktop app a structured hint.
- Open
chrome://extensionsoredge://extensionsand enable Developer mode. - Click Load unpacked and select the
browser-extension/folder. - Open the extension popup to choose whether hints are enabled and which sites may send them.
- Launch the desktop app once afterwards so it can refresh the per-user native-host registration.
key without also updating the app-side allow-list will silently break every hint.
Transport
The extension never talks to the app directly. It posts to a Chromium native-messaging host, which the app itself provides when launched with --browser-native-host; that host then forwards the payload into the running instance over a local named pipe. The app verifies the calling origin and the parent process before accepting anything, and it will not auto-launch if it is closed.
| Channel | Identifier |
|---|---|
| Native messaging host | com.lastprojects.lastrichpresence |
| Named pipe | \\.\pipe\LastRichPresence.BrowserHints |
| Accepted parents | chrome.exe, msedge.exe |
| Max message size | 64 KB |
Hint Payload
Every tab reports its own hint. The background worker scores them and forwards only the winner, so a paused background tab cannot override the video you are actually watching. Playback state is worth the most, then tab visibility, then the scraper's own confidence, with older hints decaying.
{
"schemaVersion": 1,
"kind": "hint",
"source": "lrp-browser-extension",
"timestamp": 1749650412233,
"data": {
"service": "YouTube Music",
"siteKey": "youtube_music",
"mediaKind": "music",
"title": "Time",
"artist": "Hans Zimmer",
"album": "Inception OST",
"isPlaying": true,
"positionSeconds": 191,
"durationSeconds": 348,
"pageHost": "music.youtube.com",
"pageVisible": true,
"tabId": 42,
"sequence": 17,
"confidence": 92,
"rule": "media-session"
}
}
When no tab qualifies, the extension sends { "kind": "clear" } instead, and the app falls back to whatever GSMTC reports on its own.
Supported Web Sources
Fourteen players ship with high-confidence scrapers: YouTube, YouTube Music, Spotify Web, SoundCloud, Apple Music, Amazon Music, Deezer, TIDAL, JioSaavn, Gaana, Wynk Music, Bandcamp, Mixcloud, and Twitch. Each can be toggled individually from the extension popup.
Architecture & Component Layout
Detection, presence building, and Discord IPC live in src/core/; the WinUI 3 shell, pages, and tray controller live in src/ui/. Each lane is a vertical slice (detector, presence manager, Discord application), and the browser chain feeds only the media lane. Click a node to jump to the section that documents it.
Last Rich Presence/
├── src/
│ ├── core/ # Detection, presence building, settings, Discord IPC
│ └── ui/ # WinUI shell, pages, settings, tray, animations
├── browser-extension/ # Optional MV3 companion extension
├── installer/ # Inno Setup script and installer guide
├── scripts/ # Build and verification scripts
├── tests/ # Native guard tests
└── Assets/ # Branding and curated fallback app logos
Settings & Persistence
Settings are stored in the WinRT ApplicationData local settings container, not a config file you edit by hand. Use the Settings page, or the diagnostics export and import if you want to move a configuration between machines.
| Group | Controls |
|---|---|
| General | Rich Presence master toggle, close to tray, launch on startup, start minimized, tray left-click behaviour. |
| Media | Timestamps, source label, paused state, album art, idle card, activity type override. |
| Privacy | Sensitive keyword filter, strict browser privacy, browser album-art suppression, blocked app and site terms. |
| Creativity / Productivity | Per-lane enable, detection mode, privacy mode, project-name display, per-app filters, activity type override. |
| Appearance | Theme: FollowSystem, Light, or Dark. |
Privacy & Network
The app is local-first, but two features reach the network and are worth knowing about before you enable them. Album-art fallback may query itunes.apple.com; if no direct artwork exists and only a thumbnail is available, the app can upload those image bytes to Imgur to obtain a hostable asset URL. Both are governed by the browser privacy and album-art settings, and turning album art off stops them entirely.
Troubleshooting & FAQ
The most common issues seen during install, build, and daily use.
key is unchanged: a new key means a new ID, and the app's allow-list will reject it. Note also that the extension will not launch the app for you; it must already be running.
Terms & License
Last Rich Presence is open source under the GNU General Public License v3.0. You may use, study, modify, and redistribute it, provided derivative works remain under the same license and the source stays available.
Adobe, Microsoft Office, Discord, and the streaming services named above are trademarks of their respective owners. This project is not affiliated with, endorsed by, or sponsored by any of them; app detection relies only on publicly visible window metadata.