{"id":13611769,"url":"https://github.com/waycrate/swhkd","last_synced_at":"2025-05-15T03:05:55.336Z","repository":{"id":37408880,"uuid":"436518785","full_name":"waycrate/swhkd","owner":"waycrate","description":"Sxhkd clone for Wayland (works on TTY and X11 too)","archived":false,"fork":false,"pushed_at":"2025-05-04T09:17:59.000Z","size":5936,"stargazers_count":757,"open_issues_count":89,"forks_count":59,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-05-08T19:04:04.610Z","etag":null,"topics":["hotkey","hotkey-client","hotkey-daemons","hotkey-functionality","hotkey-server","hotkeys","linux","linux-app","rust","rust-application","rust-apps","rust-lang","rust-language"],"latest_commit_sha":null,"homepage":"https://git.sr.ht/~shinyzenith/swhkd","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waycrate.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null},"funding":{"github":["Shinyzenith"]}},"created_at":"2021-12-09T07:15:55.000Z","updated_at":"2025-05-07T14:49:52.000Z","dependencies_parsed_at":"2024-04-06T20:22:49.797Z","dependency_job_id":"c759b1aa-3869-45dc-bf93-cad60146c9c4","html_url":"https://github.com/waycrate/swhkd","commit_stats":{"total_commits":562,"total_committers":33,"mean_commits":17.03030303030303,"dds":0.5427046263345195,"last_synced_commit":"5f391b5c41c3a56b0bc6da3335067dde88bd2b78"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waycrate%2Fswhkd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waycrate%2Fswhkd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waycrate%2Fswhkd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waycrate%2Fswhkd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waycrate","download_url":"https://codeload.github.com/waycrate/swhkd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264765,"owners_count":22041793,"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":["hotkey","hotkey-client","hotkey-daemons","hotkey-functionality","hotkey-server","hotkeys","linux","linux-app","rust","rust-application","rust-apps","rust-lang","rust-language"],"created_at":"2024-08-01T19:02:05.934Z","updated_at":"2025-05-15T03:05:55.305Z","avatar_url":"https://github.com/waycrate.png","language":"Rust","funding_links":["https://github.com/sponsors/Shinyzenith"],"categories":["Rust"],"sub_categories":[],"readme":"\u003cp align=center\u003e\n  \u003cimg src=\"https://git.sr.ht/~shinyzenith/swhkd/blob/main/assets/swhkd.png\" alt=SWHKD width=60%\u003e\n\n  \u003cp align=\"center\"\u003eA next-generation hotkey daemon for Wayland/X11 written in \u003ca href=\"https://www.rust-lang.org/\"\u003eRust\u003c/a\u003e.\u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n  \u003ca href=\"./LICENSE.md\"\u003e\u003cimg src=\"https://img.shields.io/github/license/waycrate/swhkd?style=flat-square\u0026logo=appveyor\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/cargo-v1.2.1-green?style=flat-square\u0026logo=appveyor\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues/waycrate/swhkd?style=flat-square\u0026logo=appveyor\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/forks/waycrate/swhkd?style=flat-square\u0026logo=appveyor\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/waycrate/swhkd?style=flat-square\u0026logo=appveyor\"\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n## SWHKD\n\n**S**imple **W**ayland **H**ot**K**ey **D**aemon\n\n`swhkd` is a display protocol-independent hotkey daemon made in\n[Rust](https://www.rust-lang.org). `swhkd` uses an easy-to-use configuration\nsystem inspired by `sxhkd`, so you can easily add or remove hotkeys.\n\nIt also attempts to be a drop-in replacement for `sxhkd`, meaning your `sxhkd`\nconfig file is also compatible with `swhkd`.\n\nBecause `swhkd` can be used anywhere, the same `swhkd` config can be used across\nXorg or Wayland desktops, and you can even use `swhkd` in a TTY.\n\n## Installation and Building\n\n[Installation and building instructions can be found here.](./INSTALL.md)\n\n## Running\n\n```bash\n./swhks \u0026\u0026 doas ./swhkd\n```\n\nThe doas or sudo can be skipped by making the swhkd binary a setuid binary.\nThis can be done by running the following command:\n\n```bash\nsudo chown root:root swhkd\nsudo chmod u+s swhkd\n```\n\nthen to start,\n```bash\nswhks \u0026\nswhkd\n```\n\n## Runtime signals\n\nAfter opening `swhkd`, you can control the program through signals:\n\n- `sudo pkill -USR1 swhkd` — Pause key checking\n- `sudo pkill -USR2 swhkd` — Resume key checking\n- `sudo pkill -HUP swhkd` — Reload config file\n\n## Configuration\n\n`swhkd` closely follows `sxhkd` syntax, so most existing `sxhkd` configs should\nbe functional with `swhkd`.\nMore information about the sxhkd syntax can be found in the official man pages from the [arch wiki](https://man.archlinux.org/man/sxhkd.1).\n\nThe default configuration file is in `~/.config/swhkd/swhkdrc` with a fallback to `etc/swhkd/swhkdrc`.\n\nIf you use Vim, you can get `swhkd` config syntax highlighting with the\n[swhkd-vim](https://github.com/waycrate/swhkd-vim) plugin. Install it in\nvim-plug with `Plug 'waycrate/swhkd-vim'`.\n\nAll supported key and modifier names are listed in `man 5 swhkd-keys`.\n\n## Environment Variables\n\nThe environment variables are now sourced using the SWHKS binary, running in the background which are then supplemented\nto the command that is to be run, thus emulating the environment variables in the default shell.\n\nThe commands are executed via *SHELL -c 'command'*, hence the environment is sourced from the default shell.\nIf the user wants to use a different set of environment variables, they can set the environment variables\nin the default shell or export the environment variables within a logged in instance of their shell before\nrunning the SWHKS binary.\n\n## Autostart\n\n### To autostart `swhkd` you can do one of two things\n\n1. Add the commands from the [\"Running\"\n   section](https://github.com/waycrate/swhkd#running) to your window managers\n   configuration file.\n1. Enable the [service\n   file](https://github.com/waycrate/swhkd/tree/main/contrib/init) for your\n   respective init system. Currently, only systemd and OpenRC service files\n   exist and more will be added soon including Runit.\n\n## Security\n\nWe use a server-client model to keep you safe. The daemon (`swhkd` — privileged\nprocess) is responsible for listening to key events and running shell commands.\nThe server (`swhks` — non-privileged process) is responsible for keeping a track of the\nenvironment variables and sending them to the daemon. The daemon\nuses these environment variables while running the shell commands.\nThe daemon only runs shell commands that have been parsed from the config file and there is no way to\nrun arbitrary shell commands. The server is responsible for only sending the environment variables to the daemon and nothing else.\nThis separation of responsibilities ensures security.\n\nSo yes, you're safe!\n\n## Support\n\n1. https://matrix.to/#/#waycrate-tools:matrix.org\n1. https://discord.gg/KKZRDYrRYW\n\n## Contributors\n\n\u003ca href=\"https://github.com/Shinyzenith/swhkd/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=waycrate/swhkd\" /\u003e\n\u003c/a\u003e\n\n## Supporters:\n\n1. [@CluelessTechnologist](https://github.com/CluelessTechnologist)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaycrate%2Fswhkd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaycrate%2Fswhkd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaycrate%2Fswhkd/lists"}