#!/bin/sh
CURRENT_POWER_MODE=$(powerprofilesctl get)
CHOICE=$(printf "performance\nbalanced\npower-saver" | dmenu -c -i -l 5 -p "$CURRENT_POWER_MODE")
case "$CHOICE" in
  "performance")
    powerprofilesctl set performance;;
  "balanced")
    powerprofilesctl set balanced;;
  "power-saver")
    powerprofilesctl set power-saver;;
esac
