Remove some gunk and fix indent
This commit is contained in:
parent
887a9b4e45
commit
34ab214c39
47
scripts/tdp
47
scripts/tdp
|
@ -171,9 +171,9 @@ check_tdp () {
|
||||||
local pl1=$(uw_to_w $(get_pl 1))
|
local pl1=$(uw_to_w $(get_pl 1))
|
||||||
local pl2=$(uw_to_w $(get_pl 2))
|
local pl2=$(uw_to_w $(get_pl 2))
|
||||||
|
|
||||||
echo "PL1 is ${pl1}W" # Placeholder
|
echo "PL1 is ${pl1}W"
|
||||||
if ( is_detailed $@ ); then
|
if ( is_detailed $@ ); then
|
||||||
echo "PL2 is ${pl2}W" # Placeholder
|
echo "PL2 is ${pl2}W"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif ( is_help $@ ); then
|
elif ( is_help $@ ); then
|
||||||
|
@ -244,35 +244,34 @@ gui_handler() {
|
||||||
case $gui_action in
|
case $gui_action in
|
||||||
|
|
||||||
"check")
|
"check")
|
||||||
gui_msg "$($command_name check --detail)"
|
gui_msg "$($command_name check --detail)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"preset")
|
"preset")
|
||||||
gui_tdp=$(
|
gui_tdp=$(
|
||||||
zenity --list --title "${gui_name}" --width=400 --height=350 $gui_options --text="Chose TDP to set:" --hide-column=1 --column="" --column="Wattage" \
|
zenity --list --title "${gui_name}" --width=400 --height=350 $gui_options --text="Chose TDP to set:" --hide-column=1 --column="" --column="Wattage" \
|
||||||
8 "`printf "\n 8W (Ultra-low, for simple 2D games)\n "`" \
|
8 "`printf "\n 8W (Ultra-low, for simple 2D games)\n "`" \
|
||||||
12 "`printf "\n 12W (Low power)\n "`" \
|
12 "`printf "\n 12W (Low power)\n "`" \
|
||||||
15 "`printf "\n 15W (Balanced)\n "`" \
|
15 "`printf "\n 15W (Balanced)\n "`" \
|
||||||
20 "`printf "\n 20W (High power)\n "`" \
|
20 "`printf "\n 20W (High power)\n "`" \
|
||||||
28 "`printf "\n 28W (Max power / Docked)\n "`"
|
28 "`printf "\n 28W (Max power / Docked)\n "`"
|
||||||
)
|
)
|
||||||
echo $gui_tdp
|
if ! [ -z $gui_tdp ]; then
|
||||||
if ! [ -z $gui_tdp ]; then
|
gui_msg "$(tdp set $gui_tdp --detail)"
|
||||||
gui_msg "$(tdp set $gui_tdp --detail)"
|
fi
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"set")
|
"set")
|
||||||
gui_tdp=$(gui_read "Please enter TDP")
|
gui_tdp=$(gui_read "Please enter TDP")
|
||||||
|
|
||||||
if ! [ -z $gui_tdp ]; then
|
if ! [ -z $gui_tdp ]; then
|
||||||
if $(gui_ask "Should PL2 be set to the same wattage?\nIf unsure, answer No."); then
|
if $(gui_ask "Should PL2 be set to the same wattage?\nIf unsure, answer No."); then
|
||||||
gui_msg "$(tdp set $gui_tdp --same --detail)"
|
gui_msg "$(tdp set $gui_tdp --same --detail)"
|
||||||
else
|
else
|
||||||
gui_msg "$(tdp set $gui_tdp --detail)"
|
gui_msg "$(tdp set $gui_tdp --detail)"
|
||||||
|
fi
|
||||||
|
gui_tdp=""
|
||||||
fi
|
fi
|
||||||
gui_tdp=""
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in New Issue