#!/usr/bin/env bash
current=$(eww state 2>/dev/null | grep '^power-save:' | awk '{print $2}')
if [ "$current" = "true" ]; then
  powerprofilesctl set balanced 2>/dev/null || true
  echo false
else
  powerprofilesctl set power-saver 2>/dev/null || true
  echo true
fi
