#!/bin/sh
# systemd-sleep hook: reapply saved RGB color/brightness after the machine
# wakes. The Aura keyboard/lightbar reset to off across suspend; this brings
# the last color back without a reboot.
# Installed to /etc/systemd/system-sleep/rgb-restore (NOT /usr, which is
# read-only on rpm-ostree/Bazzite).
case "$1/$2" in
  post/*)
    systemctl start --no-block rgb-restore.service
    ;;
esac
exit 0
