1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-05 06:25:00 +00:00
dotfiles/.config/fish/functions/cpugov.fish
2018-11-14 20:01:37 -05:00

15 lines
593 B
Fish
Executable file

# Defined in /tmp/fish.EI2lVJ/cpugov.fish @ line 2
function cpugov
set state ( cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor )
set newState ""
echo -e "The current state is [ $state ]"
if [ $state != "performance" ]
s -i cpupower frequency-set -g performance >/dev/null
set newState ( cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor )
else
s cpupower frequency-set -g powersave >/dev/null
set newState ( cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor )
end
echo -e "Now in *** $newState *** mode"
end