Skip to content

Commit f3aa9a5

Browse files
ivandimitrov8080Shinyzenith
authored andcommittedJul 3, 2022
[contrib] OpenRC service file
1 parent 6df7dac commit f3aa9a5

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed
 

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ All supported key and modifier names are listed in `man 5 swhkd-keys`.
5858
### To autostart swhkd you can do one of two things:
5959

6060
1. Add the commands from the ["Running" section](https://github.com/waycrate/swhkd#running) to your window managers configuration file.
61-
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.
61+
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.
6262

6363
## Security:
6464

‎contrib/init/openrc/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## OpenRC Instructions
2+
3+
To have OpenRC automatically start `swhkd` for you:
4+
5+
1. `chmod +x swhkd`
6+
2. Copy `swhkd` into /etc/init.d/
7+
3. Run `sudo rc-update add swhkd`
8+
4. Run `swhks` on login ( Add it to your `.xinitrc` file or your setup script )
9+

‎contrib/init/openrc/swhkd

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/sbin/openrc-run
2+
3+
command="/usr/bin/swhkd"
4+
command_background=true
5+
pidfile="/run/${RC_SVCNAME}.pid"
6+

0 commit comments

Comments
 (0)