Skip to content

Commit

Permalink
Update autostart instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ursm committed Nov 6, 2021
1 parent 5c67e43 commit 8bc9726
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ Use udev and systemd to recognize the connected keyboards and automatically star

```
# /etc/udev/rules.d/99-osm.rules
ACTION=="add", KERNEL=="event*", ENV{ID_INPUT_KEYBOARD}=="1", ENV{DEVPATH}!="/devices/virtual/input/*", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/devices/virtual/input/%k", RUN+="/bin/systemctl --no-block start osm@%k.service"
ACTION=="add", KERNEL=="event*", ENV{ID_INPUT_KEYBOARD}=="1", ENV{DEVPATH}!="/devices/virtual/input/*", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/devices/virtual/input/%k", ENV{SYSTEMD_WANTS}+="osm@%k.service"
```

```
# /etc/systemd/system/[email protected]
[Unit]
BindsTo=sys-devices-virtual-input-%i.device
After=sys-devices-virtual-input-%i.device
[Service]
ExecStart=/path/to/osm -device /dev/input/%I -keymap LeftCtrl=Esc,LeftShift=Home,RightShift=End
Expand Down

0 comments on commit 8bc9726

Please sign in to comment.