Files
discord-presence/README.md
T
2026-07-17 15:27:38 -04:00

84 lines
3.2 KiB
Markdown

# Discord Presence
A little desktop app that lets you set your Discord "Playing" status to whatever you want. Built with Tauri v2 and Rust, works on Windows and Linux.
## What you need
- Rust toolchain (https://rustup.rs)
- Tauri CLI v2 — install it with `cargo install tauri-cli --version "^2"`
- Discord running on the same machine
- On Linux you'll also need some system packages: `sudo apt install libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf`
## Getting started
First you need a Discord Application. Head to https://discord.com/developers/applications and make a new one. The name you give it is what shows up as the "Playing X" title on your profile, so name it whatever you want people to see. On the General Information page there's an Application ID (long number near the top) — copy that.
You can make as many Applications as you want with different names and just swap between the IDs whenever you want to change your "game" title.
To run the app in dev mode:
```
cd src-tauri
cargo tauri dev
```
To build a release:
```
cd src-tauri
cargo tauri build
```
On Windows this gives you a standalone exe in src-tauri/target/release/ that just works on any modern Windows 10/11 machine. On Linux you get an AppImage.
## How to use it
Paste your Application ID into the app and hit Connect. Type whatever you want in the Status and Details fields (both are optional — you can leave them empty and just show the game title). Hit Set Status and your Discord profile updates right away. Clear removes the presence, Disconnect drops the connection.
The elapsed timer normally starts from when you connect. If you want to fake a longer session, just put in custom hours and minutes before setting your status. Throw in 48 hours and it'll look like you've been at it for two days.
If you want to change the "Playing" title, rename the Application in the developer portal, then disconnect and reconnect in the app. Discord caches these pretty aggressively so give it a minute or two. If old game names are stuck on your profile, go into Discord settings, Activity Settings, Registered Games, and delete them from there.
## Adding a custom icon
Tauri looks for icons in src-tauri/icons/. If you want your own, grab a square PNG (512x512 or bigger) and run this from the src-tauri directory:
```
cargo tauri icon /path/to/your/image.png
```
That generates all the sizes and formats it needs. Rebuild the app and you'll see it on the window, taskbar, and the binary itself.
## How it works
No bot token, no OAuth, no server. Discord has a local IPC socket on every machine running the desktop client and any process can connect to it for Rich Presence. The Application ID just tells Discord which app entry to display. Everything else is just text and timestamps sent over that socket.
## Project structure
```
discord-presence/
src/ frontend (vanilla JS + Tailwind CDN)
index.html
main.js
src-tauri/ backend (Rust)
src/
lib.rs connect, disconnect, set/clear activity commands
main.rs entry point
capabilities/
default.json
Cargo.toml
build.rs
tauri.conf.json
README.md
```
## License
Do whatever you want with it.