Laptop gets hot while compiling, the fan is no longer distinguishable from a hairdryer?
This waybar module lets you to tune down the maximum allowed frequency.
It relies on the setuid bit to be able to write to /sys/devices/system/cpu/cpufreq.
Example waybar config:
"custom/cpufreq": {
"exec": "/path/to/plugin/cpufreq/cpufreq get",
"interval": "once",
"exec-on-event": true,
"return-type": "json",
"format": "{icon} {percentage}%",
"format-icons": ["π’", "π", "π"],
"tooltip-format": "CPU-Throttle: {percentage}%",
"smooth-scrolling-threshold": 1.5,
"on-scroll-down": "exec /path/to/plugin/cpufreq/cpufreq down",
"on-scroll-up": "exec /path/to/plugin/cpufreq/cpufreq up"
},