Files
Nomarchy/bin/hardware/nomarchy-wifi-powersave
Bernardo Magri 8a72a09bd8 fix(system): enable uwsm and fix session detection to allow VM login
- Enable programs.uwsm for session management.
- Improve SDDM theme session detection logic to be case-insensitive and more robust.
- Perform a global cleanup of 'Nnomarchy' and 'org.nnomarchy' typos across all scripts and configurations.
2026-04-05 11:18:41 +01:00

18 lines
444 B
Bash
Executable File

#!/usr/bin/env bash
# Toggles wifi power saving declaratively.
# Usage: nomarchy-wifi-powersave <on|off>
STATE_FILE="/etc/nixos/state.json"
case "$1" in
on) value="true" ;;
off) value="false" ;;
*) echo "Usage: nomarchy-wifi-powersave <on|off>"; exit 1 ;;
esac
sudo jq ".wifi.powersave = $value" "$STATE_FILE" > /tmp/state.json && sudo mv /tmp/state.json "$STATE_FILE"
echo "Wifi powersave set to $1. Applying changes..."
sudo sys-update