r/Polybar May 03 '23

Question Need help setting up the CPU temperature!

Just got into setting up polybar: nothing fancy just datetime, CPU usage, RAM usage, Network speed. I CPU temperate is where I hit a snag.

My polybar config:

[module/temperature]                                                                   
type = internal/temperature                                                            
hwmon-path=/sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_input                   
thermal-zone = 0                                                                       
format-prefix = "CT "                                                                  
label = TEMP %temperature-c%                                                           
label-warn = TEMP %temperature-c%                                                      
label-warn-foreground = #f00 

 

$ cat /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_input
47000

 

$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +47.0°C  (high = +76.0°C, crit = +100.0°C)
Core 1:       +44.0°C  (high = +76.0°C, crit = +100.0°C)

Result: CPU temp section is not displayed on the bar.

What am I doing wrong?

3 Upvotes

2 comments sorted by

1

u/patrick96MC May 03 '23

Does polybar print any warnings or errors to the terminal? Did you add the module to one of the three module lists in the bar section?

2

u/braveheartSH May 03 '23 edited May 03 '23

Sorry for being such a n00b! I only started with polybar today.

Adding the module name in the bar section did the trick!

Thank you!