Small script for disabling battery sucking decorations when on battery. Uses `upower` to check the status. Verify the device path before use. Add an `exec-once <path-to-script>` in your hyprland config.
```bash
#!/bin/bash
while true; do
battery=$(upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep -E "state" | awk '{print $2}')
if [ "$battery" == "discharging" ]; then
hyprctl keyword animations:enabled false
hyprctl keyword decoration:blur:enabled false
hyprctl keyword decoration:shadow:enabled false
sleep 120
fi
if [[ "$battery" == "charging" || "$battery" == "fully-charged" ]]; then
hyprctl keyword animations:enabled true
hyprctl keyword decoration:blur:enabled true
hyprctl keyword decoration:shadow:enabled true
sleep 120
fi
done
```