Skip to content

Commit 88ba243

Browse files
committed
cpu_temp: support AMD Ryzen
- fixes #66
1 parent 3e18060 commit 88ba243

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/cpu_temp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ print_cpu_temp() {
1111
cpu_temp_format=$(get_tmux_option "@cpu_temp_format" "$cpu_temp_format")
1212
cpu_temp_unit=$(get_tmux_option "@cpu_temp_unit" "$cpu_temp_unit")
1313
if command_exists "sensors"; then
14-
([ "$cpu_temp_unit" == F ] && sensors -f || sensors) | awk -v format="$cpu_temp_format$cpu_temp_unit" '/^Core [0-9]+/ {gsub("[^0-9.]", "", $3); sum+=$3; n+=1} END {printf(format, sum/n)}'
14+
([ "$cpu_temp_unit" == F ] && sensors -f || sensors) | sed -e 's/^Tccd/Core /' | awk -v format="$cpu_temp_format$cpu_temp_unit" '/^Core [0-9]+/ {gsub("[^0-9.]", "", $3); sum+=$3; n+=1} END {printf(format, sum/n)}'
1515
fi
1616
}
1717

0 commit comments

Comments
 (0)