# Script made by UpInTheAir and hardly modified by minealex2244
case $1 in
gpu_gov)
  if grep -Fxq "[Current Governor] Interactive" /sys/devices/14ac0000.mali/dvfs_governor
  then
    P="Interactive"
  elif grep -Fxq "[Current Governor] Default" /sys/devices/14ac0000.mali/dvfs_governor
  then
    P="Default"
  elif grep -Fxq "[Current Governor] Static" /sys/devices/14ac0000.mali/dvfs_governor
  then
    P="Static"
  elif grep -Fxq "[Current Governor] Booster" /sys/devices/14ac0000.mali/dvfs_governor
  then
    P="Booster"
  fi
  if [ ! -z $2 ]; then
  if [ $2 == Default ]; then
    echo "0" > /sys/devices/14ac0000.mali/dvfs_governor
  elif [ $2 == Interactive ]; then
    echo "1" > /sys/devices/14ac0000.mali/dvfs_governor
  elif [ $2 == Static ]; then
    echo "2" > /sys/devices/14ac0000.mali/dvfs_governor
  elif [ $2 == Booster ]; then
    echo "3" > /sys/devices/14ac0000.mali/dvfs_governor
  fi; fi
  copy=$P
  if [ $copy == Default ]; then
    echo Default
  elif [ $copy == Interactive ]; then
    echo Interactive
  elif [ $copy == Static ]; then
    echo Static
  elif [ $copy == Booster ]; then
    echo Booster
  fi
  ;;
esac
