Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.78k stars 710 forks source link

Add an option to search for name in hwmon directory for the temperature module #3706

Open ico277 opened 1 month ago

ico277 commented 1 month ago

I added a way to specify the hwmon path by using the name file in the /sys/class/hwmon/hwmonX/ and input-filename.

It iterates though /sys/class/hwmon/ and checks if every folder has a name file then chooses the first one where the contents match the hwmon-by-path config variable.

Example config snippet:

"temperature": {
    "hwmon-by-name": "k10temp",
    "input-filename": "temp1_input",
    "critical-threshold": 75,
    "format-critical": "CRIT:{temperatureC}°C",
    "format": "{temperatureC}°C"
}