From 450d4dd82bdb56206e330482da5e933f128acea0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 11 Feb 2026 14:06:52 +0100 Subject: [PATCH] No wifi power saving when connected to power --- bin/omarchy-wifi-powersave | 5 +++++ install/config/all.sh | 1 + install/config/wifi-powersave-rules.sh | 9 +++++++++ migrations/1770811646.sh | 3 +++ 4 files changed, 18 insertions(+) create mode 100755 bin/omarchy-wifi-powersave create mode 100644 install/config/wifi-powersave-rules.sh create mode 100644 migrations/1770811646.sh diff --git a/bin/omarchy-wifi-powersave b/bin/omarchy-wifi-powersave new file mode 100755 index 00000000..9e1c5bbe --- /dev/null +++ b/bin/omarchy-wifi-powersave @@ -0,0 +1,5 @@ +#!/bin/bash +for iface in /sys/class/net/*/wireless; do + iface="$(basename "$(dirname "$iface")")" + iw dev "$iface" set power_save "$1" 2>/dev/null +done diff --git a/install/config/all.sh b/install/config/all.sh index a5dc5cf3..f62a4e61 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -20,6 +20,7 @@ run_logged $OMARCHY_INSTALL/config/sudoless-asdcontrol.sh run_logged $OMARCHY_INSTALL/config/input-group.sh run_logged $OMARCHY_INSTALL/config/omarchy-ai-skill.sh run_logged $OMARCHY_INSTALL/config/powerprofilesctl-rules.sh +run_logged $OMARCHY_INSTALL/config/wifi-powersave-rules.sh run_logged $OMARCHY_INSTALL/config/hibernation.sh run_logged $OMARCHY_INSTALL/config/hardware/network.sh run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh diff --git a/install/config/wifi-powersave-rules.sh b/install/config/wifi-powersave-rules.sh new file mode 100644 index 00000000..08b8d49b --- /dev/null +++ b/install/config/wifi-powersave-rules.sh @@ -0,0 +1,9 @@ +if omarchy-battery-present; then + cat <