andrewburgess / steamdeck-discord-status

SteamDeck Homebrew Plugin for displaying current game in Discord
Other
24 stars 8 forks source link

Add Vencord support? (lightweight alternative client) #13

Closed ttang4299 closed 4 months ago

ttang4299 commented 4 months ago

Currently using the Flatpak and it works a lot better than the official Discord client.

andrewburgess commented 4 months ago

I'm not familiar with that.

If it creates an IPC socket somewhere that follows Discord's API, then my plugin should just work. The plugin looks for the IPC socket file in /run/user/1000/app/com.discordapp.Discord or /run/user/1000 with the name discord-ipc-{number} (where {number} is 0-9).

You might be able to symlink Vencord's socket file to that location maybe?

I'm not planning on adding support for this, though I would probably accept a pull request adding support

Waoweens commented 3 months ago

you need a symbolic link at XDG_RUNTIME_DIR/discord-ipc-0 that points to XDG_RUNTIME_DIR/.flatpak/dev.vencord.Vesktop/xdg-run/discord-ipc-0. you can do this manually every time or you can automatically create the link with user tmpfiles:

create /home/deck/user-tmpfiles.d/vesktop-rpc.conf with the following content:

L %t/discord-ipc-0 - - - - .flatpak/dev.vencord.Vesktop/xdg-run/discord-ipc-0

run this command to setup the new link:

systemctl --user enable --now systemd-tmpfiles-setup.service

now RPC should work

source: https://github.com/flathub/dev.vencord.Vesktop?tab=readme-ov-file#native-applications