#discord #proton #steam #rpc

app discord-rpc-helper

根据运行中的 Proton 游戏,自动设置 Discord 活动状态

17 个稳定版本

1.2.6 2024 年 7 月 30 日
1.2.5 2024 年 3 月 19 日
1.2.4 2024 年 1 月 23 日
1.2.2 2023 年 11 月 29 日
1.0.1 2022 年 6 月 5 日

42游戏 中排名

Download history 5/week @ 2024-07-03 83/week @ 2024-07-24 51/week @ 2024-07-31

134 每月下载量

GPL-3.0-only

38KB
581

discord-rpc-helper

帮助将 Steam 游戏活动设置为 Discord 活动。

安装

使用 cargo 编译

克隆仓库并在仓库根目录下运行 cargo install --path .

您还需要提供自己的 Discord 客户端 ID。请确保 XDG_CONFIG_HOME 已设置,并创建 $XDG_CONFIG_HOME\discord-rpc-helper\config.json

示例 config.json

{
  "discord_client_id": "11111111111111111111" 
}

Cargo binstall

我们在 1.1.7 版本中添加了 binstall 支持。如果您已安装 binstall (cargo install cargo-binstall),则可以使用 cargo binstall discord-rpc-helper 安装服务。之后,您可以从终端运行助手或遵循下方的 systemd 设置

缓存目录

我们会在 XDG_RUNTIME_DIR 中扫描并创建一个文件夹。这意味着缓存不会在重启之间持续。将来将提供配置缓存路径的选项。

在登录时自动运行服务(systemd 服务)

创建 $HOME/.config/systemd/user/discord-rpc-helper.service 并粘贴以下内容

[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

请确保将 YOURUSERNAME 更改为您使用 cargo install 使用的用户名。

之后运行 systemctl --user daemon-reloadsystemctl --user enable --now discord-rpc-helper.service

通过运行systemctl --user status discord-rpc-helper.service来检查一切是否正常运行。

特性和怪癖

Steam 年龄门

当游戏需要年龄门才能访问 Steam 商店页面时,我们通过提交 1/1/1990 的年龄来处理年龄门。

依赖关系

~13–43MB
~698K SLoC