Drop fixed unit name from power-profile udev rule to prevent wakeup failures

With a fixed --unit name, the rule fails to start when a unit from a
previous power event still exists, leaving the power profile stale.
Letting systemd-run generate unique unit names keeps every trigger
working; --collect still garbage-collects each unit on exit.

Ports 749a8c04 from master.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Diego
2026-07-18 12:31:13 -07:00
committed by David Heinemeier Hansson
co-authored by Claude Fable 5
parent 2f081f57b2
commit f322f0332b
@@ -1,2 +1,2 @@
SUBSYSTEM=="power_supply", ATTR{type}=="Mains", RUN+="/usr/bin/systemd-run --no-block --collect --unit=omarchy-power-profile --property=After=power-profiles-daemon.service /usr/bin/omarchy-powerprofiles-set" SUBSYSTEM=="power_supply", ATTR{type}=="Mains", RUN+="/usr/bin/systemd-run --no-block --collect --property=After=power-profiles-daemon.service /usr/bin/omarchy-powerprofiles-set"
SUBSYSTEM=="power_supply", ATTR{type}=="USB", RUN+="/usr/bin/systemd-run --no-block --collect --unit=omarchy-power-profile --property=After=power-profiles-daemon.service /usr/bin/omarchy-powerprofiles-set" SUBSYSTEM=="power_supply", ATTR{type}=="USB", RUN+="/usr/bin/systemd-run --no-block --collect --property=After=power-profiles-daemon.service /usr/bin/omarchy-powerprofiles-set"