1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-12-12 00:15:17 +00:00
dotfiles/.config/fish/functions/cpugov.fish

15 lines
593 B
Fish
Raw Normal View History

2018-11-15 01:01:37 +00:00
# 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