{"id":13894611,"url":"https://github.com/cheeze2000/elcord-wsl","last_synced_at":"2025-07-17T09:33:39.759Z","repository":{"id":108800133,"uuid":"289949810","full_name":"cheeze2000/elcord-wsl","owner":"cheeze2000","description":"Discord Rich Presence for Emacs on WSL","archived":true,"fork":false,"pushed_at":"2020-09-02T00:08:04.000Z","size":34,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-08-07T18:31:09.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cheeze2000.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}},"created_at":"2020-08-24T14:23:53.000Z","updated_at":"2023-08-19T20:12:31.000Z","dependencies_parsed_at":"2023-03-29T20:19:30.813Z","dependency_job_id":null,"html_url":"https://github.com/cheeze2000/elcord-wsl","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/cheeze2000%2Felcord-wsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheeze2000%2Felcord-wsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheeze2000%2Felcord-wsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cheeze2000%2Felcord-wsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cheeze2000","download_url":"https://codeload.github.com/cheeze2000/elcord-wsl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226248375,"owners_count":17595159,"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-08-06T18:01:39.447Z","updated_at":"2024-11-24T23:31:16.694Z","avatar_url":"https://github.com/cheeze2000.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"# elcord-wsl\n#### Discord Rich Presence for Emacs on WSL\n\n#### `elcord-wsl` uses [`discord-rpc`](https://www.npmjs.com/package/discord-rpc) and [`pm2`](https://www.npmjs.com/package/pm2)\n\n## Setup\n- Ensure Node.js is installed on Windows.\n- Ensure PM2 is installed on WSL.\n- On WSL, get the path of `node` on Windows with `whereis node`\n- Clone this repository and define the path.\n- `cd` and `npm install` to install dependencies.\n- Include this snippet in your init file and customise the paths.\n```elisp\n;; do not use `straight-use-package`\n(use-package elcord-wsl\n  :load-path \"~/.emacs.d/elcord-wsl\" ;; customise the path\n  :custom\n  (elcord-wsl--load-path \"~/.emacs.d/elcord-wsl\") ;; customise the path\n  (elcord-wsl--node-path \"/mnt/c/Program Files/nodejs/node.exe\")) ;; customise the path\n```\n\n## Interactive Functions\nFunctions | Description\n-- | --\n`M-x elcord-wsl--connect` | Starts the process\n`M-x elcord-wsl--disconnect` | Deletes the process\n---\n`elcord-wsl--connect` might take very long to start, do not use this on startup. \\\n`elcord-wsl--disconnect` will always be called when killing Emacs, it is added in `kill-emacs-hook`.\n\n## More Custom Symbols\nSymbols | Description | Default\n-- | -- | --\n`elcord-wsl--assets-alist` | The art assets for `elcord-wsl` to load | `((\"_default\" . \"_default\"))`\n`elcord-wsl--client-id` | The client ID of your Discord Application | `\"698809287564328991\"`\n`elcord-wsl--ignored-buffers` | The buffers that will not be displayed | `(\"Minibuf\")`\n`elcord-wsl--details-function` | The function to get the Rich Presence details | `(concat \"Editing \" buf)`\n`elcord-wsl--state-function` | The function to get the Rich Presence state | `(concat \"Line \" (format-mode-line \"%l\"))`\n`elcord-wsl--large-image-text-function` | The function to get the Rich Presence large image text | `(concat \"Emacs \" emacs-version)`\n---\n`buf` refers to the name of the current buffer.\n\n## Example\n```elisp\n(use-package elcord-wsl\n  :load-path \"/path/to/directory\"\n  :custom\n  (elcord-wsl--load-path \"/path/to/directory\")\n  (elcord-wsl--ignored-buffers\n    '(\"Treemacs\" \"Minibuf\"))\n  (elcord-wsl--assets-alist\n    '((\"\\\\.cpp$\" . \"cpp\")\n      (\"\\\\.hpp$\" . \"cpp\")\n      (\"\\\\.hs$\" . \"haskell\")\n      (\"scratch\" . \"emacs\")\n      (\"^_default\" . \"emacs\")))\n  (elcord-wsl--client-id \"1234567890\")\n  :config\n  (defun elcord-wsl--details-function (buf)\n    (concat \"I am editing \" buf \"!\"))\n  (defun elcord-wsl--state-function (buf)\n    '\"I am totally not procrastinating.\"))\n```\n---\nThe keys in the alist will be [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) objects. The asset used will be the first key which the buffer name matches the respective `RegExp` object.\n\nThe elements in the ignored buffers list will also be `RegExp` objects. If the buffer name matches any `RegExp` object in the list, it will be not be displayed in the Rich Presence.\n\n## Default Client ID and Art Assets\n#### Assets of the default client `(698809287564328991)`\n![art-assets](https://cdn.discordapp.com/attachments/437471715975757834/748904075021647943/unknown.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheeze2000%2Felcord-wsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheeze2000%2Felcord-wsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheeze2000%2Felcord-wsl/lists"}