{"id":17800987,"url":"https://github.com/refi64/discord-linux-rpc","last_synced_at":"2025-04-02T04:40:33.716Z","repository":{"id":69429142,"uuid":"169161047","full_name":"refi64/discord-linux-rpc","owner":"refi64","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-12T22:05:33.000Z","size":2096,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T05:06:48.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/refi64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-04T22:39:37.000Z","updated_at":"2020-06-06T04:01:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"93230f39-d513-4aaf-902f-0cb9ee67f472","html_url":"https://github.com/refi64/discord-linux-rpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fdiscord-linux-rpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fdiscord-linux-rpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fdiscord-linux-rpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fdiscord-linux-rpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refi64","download_url":"https://codeload.github.com/refi64/discord-linux-rpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246758278,"owners_count":20828919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T12:33:03.824Z","updated_at":"2025-04-02T04:40:33.695Z","avatar_url":"https://github.com/refi64.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# discord-linux-rpc\n\nAllows you to expose some of your running processes to Discord, even if it's the Flatpak version,\nvia rich presence.\n\n## Features\n\n- Updates your rich presence with the processes you want.\n- Allows you to configure multiple processes that can be picked up.\n- Automatically switches between processes as they are started and stopped.\n\n## Installation\n\nRPMs will come SOON(tm), for now you have to build from source.\n\n## Installing from source\n\n### Requirements\n\nYou need:\n\n- A C compiler\n- [Meson](https://mesonbuild.com/) and Ninja\n- systemd and libsystemd\n- libcap/setcap\n- [yajl](https://lloyd.github.io/yajl/)\n\n```bash\n# Installing dependencies on Fedora\n$ sudo dnf install gcc meson libcap systemd-devel yajl-devel\n# Installing dependencies on Arch\n$ sudo pacman -S base-devel libcap meson yajl\n```\n\n### Building and installing\n\nJust run:\n\n```\n# configure\n$ meson _build\n# build and install (you shouldn't need root, Meson will use polkit if possible)\n$ ninja -C _build install\n```\n\nNow, to enable the service to run on boot and start it:\n\n```\n$ systemctl --user enable --now discord-linux-rpc\n```\n\n## Usage\n\ndiscord-linux-rpc reads its configuration from `~/.config/discord-linux-rpc/proc`. In order to\nconfigure it, however, you need to create a Discord application for each process you want to\nshow up on your rich presence.\n\n### Getting the client IDs\n\nHead over to the [Discord developer portal](https://discordapp.com/developers/applications/)\nand create a new application. Name it the name you want to appear you're playing when your\nprocess is running. If you want it to have a picture, head over to the *Rich Presence* tab of\nthe application's settings and upload the image as a rich presence asset, giving it the name\n`discord-linux-rpc`.\n\n### Setting up the configuration file\n\n**NOTE:** There should be a GUI for this SOON(tm).\n\n```\n# This file should be stored at: ~/.config/discord-linux-rpc/proc\n# Lines beginning with a # are comments.\n# The file contains data in the following format:\n# [CLIENT-ID] [name|path] [MATCHER]\n# or\n# [CLIENT-ID] [name|path] [MATCHER] -- [STATE]\n\n# If a process matches the given MATCHER (simply a plain string) via its name or path,\n# then the rich presence will be set using CLIENT-ID, and the state will be STATE if it\n# is given.\n\n# - CLIENT-ID is the Discord client ID you want this process to use.\n# - name|path determines whether the process will be matched via its name or\n#   its path. If a process matches the given MATCHER by name or path, then\n# - If name was given, then MATCHER is the name of the process to match.\n    If path was given, then MATCHER is the full path to the process.\n# STATE is optional, it will be the rich presence state associated with the process.\n\n# None of the above probably made sense, so here are some examples:\n\n# This will match a process named \"sleep\". When sleep is running, then the rich presence\n# will be associated with the client ID 000000000000000000, meaning the name given to the\n# application will appear as what you're playing.\n000000000000000000 name sleep\n\n# This instead matches the program /usr/lib/systemd/systemd by its path.\n# In addition, the -- means that a state is being given. The state is \"systemd power\".\n# Whenever discord-linux-rpc uses this process, it will set the rich presence state to\n# \"systemd power\".\n111111111111111111 path /usr/lib/systemd/systemd -- systemd power\n\n# This is similar to the first one, but it shows that the process name can have spaces,\n# and it shows that you can still pass a custom state string.\n22222222222222222 name My Game -- some state goes here\n\n# Note: ORDER MATTERS! In the above config, sleep is prioritized over systemd, and systemd\n# is prioritized over My Game. This means that if sleep is running, discord-linux-rpc will\n# show you're playing sleep's client ID. If sleep stops, then discord-linux-rpc will go\n# down the list, see systemd, and use that. My Game will never be used, because systemd is\n# always going to be running.\n```\n\n### Controlling the daemon\n\nWhenever you change your config file, run:\n\n```\n$ systemctl --user reload discord-linux-rpc\n```\n\n## Future ideas\n\n- System packages. (Maybe also build on a really old system so that it'll run anywhere systemd\n  is available, and then distribute those binaries.)\n- A GUI to edit the config file and reload the daemon.\n- Later on: maybe a D-Bus API to be make it easy for other Linux apps to set Discord rich\n  presence without having to worry about whether or not the Flatpak is being used?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefi64%2Fdiscord-linux-rpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefi64%2Fdiscord-linux-rpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefi64%2Fdiscord-linux-rpc/lists"}