mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
No wifi power saving when connected to power
This commit is contained in:
5
bin/omarchy-wifi-powersave
Executable file
5
bin/omarchy-wifi-powersave
Executable file
@@ -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
|
||||||
@@ -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/input-group.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/omarchy-ai-skill.sh
|
run_logged $OMARCHY_INSTALL/config/omarchy-ai-skill.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/powerprofilesctl-rules.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/hibernation.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/hardware/network.sh
|
run_logged $OMARCHY_INSTALL/config/hardware/network.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh
|
run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh
|
||||||
|
|||||||
9
install/config/wifi-powersave-rules.sh
Normal file
9
install/config/wifi-powersave-rules.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
if omarchy-battery-present; then
|
||||||
|
cat <<EOF | sudo tee "/etc/udev/rules.d/99-wifi-powersave.rules"
|
||||||
|
SUBSYSTEM=="power_supply", ATTR{type}=="Mains", ATTR{online}=="0", RUN+="$HOME/.local/share/omarchy/bin/omarchy-wifi-powersave on"
|
||||||
|
SUBSYSTEM=="power_supply", ATTR{type}=="Mains", ATTR{online}=="1", RUN+="$HOME/.local/share/omarchy/bin/omarchy-wifi-powersave off"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sudo udevadm control --reload
|
||||||
|
sudo udevadm trigger --subsystem-match=power_supply
|
||||||
|
fi
|
||||||
3
migrations/1770811646.sh
Normal file
3
migrations/1770811646.sh
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
echo "Disable WiFi power save on AC power"
|
||||||
|
|
||||||
|
source $OMARCHY_PATH/install/config/wifi-powersave-rules.sh
|
||||||
Reference in New Issue
Block a user