diff --git a/bin/omarchy-wifi-powersave b/bin/omarchy-wifi-powersave index 26810e52..d75434a1 100755 --- a/bin/omarchy-wifi-powersave +++ b/bin/omarchy-wifi-powersave @@ -3,6 +3,7 @@ # omarchy:summary=Set Wi-Fi power save mode on wireless interfaces # omarchy:args= +shopt -s nullglob for iface in /sys/class/net/*/wireless; do iface="$(basename "$(dirname "$iface")")" iw dev "$iface" set power_save "$1" 2>/dev/null diff --git a/install/config/powerprofilesctl-rules.sh b/install/config/powerprofilesctl-rules.sh index c4f99a03..d23e4a9b 100644 --- a/install/config/powerprofilesctl-rules.sh +++ b/install/config/powerprofilesctl-rules.sh @@ -1,6 +1,9 @@ # The udev rule (/etc/udev/rules.d/99-omarchy-power-profile.rules) ships via # omarchy-settings. This script handles the runtime side: enable the service # the rule's RUN+= chains through, and reload udev so the new rule takes effect. +# Also remove the pre-rename legacy path in case the old installer ran since +# the one-shot migration completed (idempotency for re-install/downgrade tests). +sudo rm -f /etc/udev/rules.d/99-power-profile.rules sudo systemctl enable power-profiles-daemon sudo udevadm control --reload 2>/dev/null sudo udevadm trigger --subsystem-match=power_supply 2>/dev/null diff --git a/install/config/wifi-powersave-rules.sh b/install/config/wifi-powersave-rules.sh index 11a39b1c..6a08b060 100644 --- a/install/config/wifi-powersave-rules.sh +++ b/install/config/wifi-powersave-rules.sh @@ -1,5 +1,8 @@ # The udev rule (/etc/udev/rules.d/99-omarchy-wifi-powersave.rules) ships via # omarchy-settings. This script just reloads udev so the rule takes effect # without waiting for a reboot. +# Also remove the pre-rename legacy path in case the old installer ran since +# the one-shot migration completed (idempotency for re-install/downgrade tests). +sudo rm -f /etc/udev/rules.d/99-wifi-powersave.rules sudo udevadm control --reload sudo udevadm trigger --subsystem-match=power_supply diff --git a/migrations/1779307845.sh b/migrations/1779307845.sh index e18f33b4..4fe58953 100644 --- a/migrations/1779307845.sh +++ b/migrations/1779307845.sh @@ -9,6 +9,11 @@ sudo rm -f /etc/udev/rules.d/99-power-profile.rules # Package now ships /etc/udev/rules.d/99-omarchy-wifi-powersave.rules. Same. sudo rm -f /etc/udev/rules.d/99-wifi-powersave.rules -# Reload so the new rules take effect immediately. +# Reload so the new udev rules take effect immediately. sudo udevadm control --reload 2>/dev/null sudo udevadm trigger --subsystem-match=power_supply 2>/dev/null + +# The plocate-updatedb.service drop-in is installed under /etc/systemd/system, +# which Arch's systemd pacman hook does NOT trigger on. Explicitly reload so +# upgrades pick up the drop-in without needing a reboot. +sudo systemctl daemon-reload 2>/dev/null