minor cleanup
This commit is contained in:
parent
a6f32f90a8
commit
6676973fe6
@ -107,29 +107,30 @@ function configure {
|
|||||||
|
|
||||||
# Populate search criterias for known CPUs
|
# Populate search criterias for known CPUs
|
||||||
if (echo "$sensorsOutput" | grep -q "coretemp-"); then
|
if (echo "$sensorsOutput" | grep -q "coretemp-"); then
|
||||||
# Intel CPU
|
# Intel CPU
|
||||||
# Prompt user for which temperature to use
|
# Prompt user for which temperature to use
|
||||||
read -p "Do you wish to display all cores [Y] or package temp (averge, single temperature)[n]? (Y/n): " choice
|
read -p "Do you wish to display all cores [Y] or package temp (averge, single temperature)[n]? (Y/n): " choice
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
# Set temperature search criteria
|
# Set temperature search criteria
|
||||||
[yY]|"")
|
[yY]|"")
|
||||||
if (echo "$sensorsOutput" | grep -A 10 "coretemp-" | grep -q "Core "); then
|
if (echo "$sensorsOutput" | grep -A 10 "coretemp-" | grep -q "Core "); then
|
||||||
CPU_ITEM_PREFIX="Core "
|
CPU_ITEM_PREFIX="Core "
|
||||||
CPU_TEMP_CAPTION="Core"
|
CPU_TEMP_CAPTION="Core"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
[nN] )
|
[nN] )
|
||||||
if (echo "$sensorsOutput" | grep -A 10 "coretemp-" | grep -q "Package id "); then
|
if (echo "$sensorsOutput" | grep -A 10 "coretemp-" | grep -q "Package id "); then
|
||||||
CPU_ITEM_PREFIX="Package id"
|
CPU_ITEM_PREFIX="Package id"
|
||||||
CPU_TEMP_CAPTION="Package"
|
CPU_TEMP_CAPTION="Package"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# If the user enters an invalid input, print an error message and exit the script with a non-zero status code
|
# If the user enters an invalid input, print an error message and exit the script with a non-zero status code
|
||||||
err "Invalid input. Exiting..."
|
err "Invalid input. Exiting..."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
elif (echo "$sensorsOutput" | grep -q "k10temp-"); then
|
elif (echo "$sensorsOutput" | grep -q "k10temp-"); then
|
||||||
|
# AMD CPU
|
||||||
CPU_ITEM_PREFIX="Tccd"
|
CPU_ITEM_PREFIX="Tccd"
|
||||||
CPU_TEMP_CAPTION="Temp"
|
CPU_TEMP_CAPTION="Temp"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user