whereswaldon / kfreestyle2d

Unofficial Kinesis Freestyle 2 Userspace Linux Driver
MIT License
76 stars 21 forks source link

Use systemd instance template for device dependencies #10

Open samiconductor opened 4 years ago

samiconductor commented 4 years ago

I think I've got something working for #8. I was having to unplug / plug in the keyboard to get it working after reboot or power cycle. But with this it picks it up on startup! I was excited anyway.

It changes up things a bit though and the service bypasses sort-and-run.sh which could be cleaned up if you're good with the approach in this PR. Also it runs two separate instances of kfreestyle2d, one for each device. You can get the status with systemctl status kfreestyle2d@kinesis1.service for example. AFAIK two instances are fine?

Changes:

Here's a good example of putting it all together. It's also where I got the idea to depend on user session service. (edit: works fine without waiting for systemd-user-sessions.service)

whereswaldon commented 4 years ago

Thank you for putting this together! I will try to look at it this weekend!