governor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) if [[ $governor == "powersave" ]]; then sudo /opt/power/performance.sh else sudo /opt/power/powersave.sh fi