f8858eb730
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
15 lines
613 B
Bash
Executable File
15 lines
613 B
Bash
Executable File
#!/bin/bash
|
|
# Re-apply RGB after suspend/resume. Direct-mode Corsair/Aura state is volatile and the USB
|
|
# controllers re-enumerate on wake, so restart the OpenRGB server (rgb-lavender.service is
|
|
# PartOf it and re-runs automatically). Pure user-level: watches logind's PrepareForSleep.
|
|
set -u
|
|
exec dbus-monitor --system "type='signal',interface='org.freedesktop.login1.Manager',member='PrepareForSleep'" |
|
|
while read -r line; do
|
|
case "$line" in
|
|
*"boolean false"*)
|
|
sleep 3 # let USB finish re-enumerating before re-detecting
|
|
systemctl --user restart openrgb-server.service
|
|
;;
|
|
esac
|
|
done
|