vionya / discord-rich-presence

A cross-platform Discord Rich Presence library written in Rust
MIT License
89 stars 16 forks source link

Add support for Snap and Flatpak installs #27

Closed FozzieHi closed 3 months ago

FozzieHi commented 9 months ago

Given this is currently in the middle of a rewrite, and my lack of Rust skills, I thought I'd create an issue instead of a PR. Fairly simply, to access the IPC on Flatpak installations (I imagine this also works for Snap), you have to append the Flatpak path to the path you get from ENV_KEYS.

For example, to access an IPC normally, you would use /run/user/1000/discord-ipc-0. To access it on Flatpak, you would use /run/user/1000/app/com.discordapp.Discord/discord-ipc-0.

The paths should be:

vionya commented 9 months ago

Sure! I didn't realize it would be so straightforward to implement. Thanks for the suggestion :)

I'll leave the issue open so I don't forget :^)

FozzieHi commented 3 months ago

Added by #28 :rocket: