#discord #proton #steam #rpc

app discord-rpc-helper

Automatically sets Discord activity based on running Proton games

16 stable releases

1.2.5 Mar 19, 2024
1.2.2 Nov 29, 2023
1.2.0 Jul 17, 2023
1.1.7 Mar 6, 2023
1.0.1 Jun 5, 2022

#31 in Games

Download history 7/week @ 2024-01-10 3/week @ 2024-01-17 8/week @ 2024-02-14 40/week @ 2024-02-21 4/week @ 2024-02-28 2/week @ 2024-03-06 106/week @ 2024-03-13 85/week @ 2024-03-20 44/week @ 2024-03-27 47/week @ 2024-04-03

283 downloads per month

GPL-3.0-only

37KB
581 lines

discord-rpc-helper

Helps set Steam game activity as a Discord activity.

Installation

Compile with cargo

Clone the repo and run cargo install --path . from the repo's root directory.

You will also need to provide your own Discord client id. Make sure XDG_CONFIG_HOME is set and create $XDG_CONFIG_HOME\discord-rpc-helper\config.json.

Example config.json

{
  "discord_client_id": "11111111111111111111" 
}

Cargo binstall

We have added binstall support in version 1.1.7. If you have binstall installed (cargo install cargo-binstall) then you can install the service with cargo binstall discord-rpc-helper. After that, you can either run the helper from the terminal or follow the systemd setup bellow.

Caching directory

We scan for XDG_RUNTIME_DIR and create a folder in there. This means the cache does not persist between reboots. In the future there will be an option to configure the cache path.

Running the service automatically on login (systemd service)

Create $HOME/.config/systemd/user/discord-rpc-helper.service and paste the following:

[Service]
Environment=XDG_CONFIG_HOME=/home/YOURUSERNAME/.config
ExecStart=/home/YOURUSERNAME/.cargo/bin/discord-rpc-helper

[Install]
WantedBy=default.target

[Unit]
Description=Discord RPC helper for Steam, written in Rust
After=network.target

Make sure to change YOURUSERNAME to the username that you used to run cargo install with.

After that run systemctl --user daemon-reload and systemctl --user enable --now discord-rpc-helper.service.

Check if everything is running by running systemctl --user status discord-rpc-helper.service.

Quirks and features

Steam Age Gate

When a game requires an age gate to get to the Steam Store page, we handle the age gate by submitting an age of 1/1/1990.

Dependencies

~13–29MB
~431K SLoC