Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # CPUFreq YAD Interface
- # Made by Artur 'hoOmE' Paiva <[email protected]>
- # Under LGPLv3
- # Verifica se o YAD Existe mesmo.
- here=$(dirname $0)
- if [ "$(yad --version 2>/dev/null)" = "$null" ]; then
- echo "YAD isnt installed, but GameVision needs YAD"
- exit 1
- fi
- # Subrotina para trocar o governator de todos os nucleos
- changeto() {
- sudo cpupower frequency-set -g $1
- }
- # A Tela principal
- while [ "$resposta" != "252" ]; do
- yad --button="OnDemand":0 --button="Performance":1 --button="PowerSave":3 --button="gtk-close":252 --center --image="cpu" --title="Accelerometer" --text="Current Speed: $($here/getclock.sh) - Current Governator: $(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)" --sticky --undecorated --on-top --skip-taskbar --geometry=0x0+0+0
- resposta=$?
- if [ "$resposta" = "0" ]; then
- changeto ondemand
- elif [ "$resposta" = "1" ]; then
- changeto performance
- elif [ "$resposta" = "2" ]; then
- changeto conservative
- elif [ "$resposta" = "3" ]; then
- changeto powersave
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment