Add support for multiple AMD temp types (#49)

This commit is contained in:
Meliox 2024-06-16 13:01:46 +02:00 committed by GitHub
parent 3490d3a07e
commit ba3991a3a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,15 +112,27 @@ function configure {
if (echo "$sensorsOutput" | grep -q "$item"); then if (echo "$sensorsOutput" | grep -q "$item"); then
case "$item" in case "$item" in
"coretemp-"*) "coretemp-"*)
CPU_ADDRESS_PREFIX=$item # Intel CPU
CPU_ITEM_PREFIX="Core " # Set temperature search criteria
CPU_TEMP_CAPTION="Core" if (echo "$sensorsOutput" | grep -A 10 "$item" | grep -q "Core "); then
CPU_ADDRESS_PREFIX=$item
CPU_ITEM_PREFIX="Core "
CPU_TEMP_CAPTION="Core"
fi
break break
;; ;;
"k10temp-"*) "k10temp-"*)
CPU_ADDRESS_PREFIX=$item # AMD CPU
CPU_ITEM_PREFIX="Tccd" # Find and set temperature search criteria
CPU_TEMP_CAPTION="Temp" if (echo "$sensorsOutput" | grep -A 4 "$item" | grep -q -e "Tctl" -e "Tccd"); then
CPU_ADDRESS_PREFIX=$item
CPU_ITEM_PREFIX="Tccd"
CPU_TEMP_CAPTION="Temp"
elif (echo "$sensorsOutput" | grep -A 4 "$item" | grep -q "temp"); then
CPU_ADDRESS_PREFIX=$item
CPU_ITEM_PREFIX="temp"
CPU_TEMP_CAPTION="Temp"
fi
break break
;; ;;
*) *)