Skip to content

Commit

Permalink
[contrib] OpenRC service file
Browse files Browse the repository at this point in the history
  • Loading branch information
ivandimitrov8080 authored and Shinyzenith committed Jul 3, 2022
1 parent 6df7dac commit f3aa9a5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ All supported key and modifier names are listed in `man 5 swhkd-keys`.
### To autostart swhkd you can do one of two things:

1. Add the commands from the ["Running" section](https://github.com/waycrate/swhkd#running) to your window managers configuration file.
1. Enable the [service file](https://github.com/waycrate/swhkd/tree/main/contrib/init) for your respective init system. Currently only systemd service files exist and more will be added soon including Runit and OpenRC.
1. Enable the [service file](https://github.com/waycrate/swhkd/tree/main/contrib/init) for your respective init system. Currently only systemd and OpenRC service files exist and more will be added soon including Runit.

## Security:

Expand Down
9 changes: 9 additions & 0 deletions contrib/init/openrc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## OpenRC Instructions

To have OpenRC automatically start `swhkd` for you:

1. `chmod +x swhkd`
2. Copy `swhkd` into /etc/init.d/
3. Run `sudo rc-update add swhkd`
4. Run `swhks` on login ( Add it to your `.xinitrc` file or your setup script )

6 changes: 6 additions & 0 deletions contrib/init/openrc/swhkd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/sbin/openrc-run

command="/usr/bin/swhkd"
command_background=true
pidfile="/run/${RC_SVCNAME}.pid"

0 comments on commit f3aa9a5

Please sign in to comment.