diff --git a/README.md b/README.md index ea5d283..b6c7005 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # openrgb-systemd-unit User-Systemd-Unit for OpenRGB + +--- + +For use with https://gitlab.com/j-be/OpenRGB on Linux. +This Systemd-User-Unit sets a given Color to your OpenRGB-Controlled RGBs, and turns them off again on shutdown. + +## Usage + +``` + mkdir -p ~/.config/systemd/user/ + cp openrgb.service ~/.config/systemd/user/ + systemctl --user daemon-reload + systemctl --user enable openrgb.service + ``` + This assumes, that your OpenRGB-Executable is available under `~/bin/OpenRGB/OpenRGB`, as it would be, if you checked the OpenRGB-Repo out in your `~/bin`. + + ## Known Problems + * If you plan to use Profiles, test them first. I Encountered many combinations, where I end up with broken Profiles, which did not work, even if the User-Unit does. From my understanding the profiles should be world-readable also. + * When you also plan to start the GUI of OpenRGB as an autostart-entry of your desktop, you might want to delay the GUI with `sleep5; ./OpenRGB` or something similar. During testing, when both, the Systemd-Unit and the GUI were starting more or less simultaneously, there was a high chance, that the OpenRGB-thread raised by the unit becomes unresponsive, and became a zombie when trying to kill it. diff --git a/systemd/user/openrgb.service b/systemd/user/openrgb.service new file mode 100644 index 0000000..2476cb6 --- /dev/null +++ b/systemd/user/openrgb.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenRGB control + +[Service] +Type=simple +ExecStart=%h/bin/OpenRGB/OpenRGB -c 00FFFF -m Static +ExecStop=%h/bin/OpenRGB/OpenRGB -c 000000 -m Static +RemainAfterExit=yes + +[Install] +WantedBy=default.target