yambar-sensors is a user module for the yambar modular status panel that provides access to sensor data from libsensors. It allows users to display various hardware sensor readings (such as temperature, fan speed, and voltage) in their yambar status panel.
- yambar (https://codeberg.org/dnkl/yambar)
- lm-sensors (https://github.com/lm-sensors/lm-sensors)
- libsensors (part of lm-sensors)
- C compiler
- make
-
Clone this repository:
git clone https://github.com/rufusutt/yambar-sensors.git cd yambar-sensors
-
Build the project:
make
-
Install the module:
sudo make install
-
Ensure that lm-sensors is properly configured on your system:
sudo sensors-detect
-
Add the yambar-sensors module to your yambar configuration file (usually
~/.config/yambar/config.yml
):- script: path: /usr/local/bin/yambar-sensors args: ["coretemp-isa-0000", "15"] content: - string: {text: "CPU: "} - string: {text: "{temp1_input:.0}°C"}
In this example the chip name is
coretemp-isa-1000
and the CPU temperature input istemp1_input
. -
Restart yambar to apply the changes:
killall yambar yambar &
Configuration is provided as arguments.
chip
: The name of the sensor chip to monitor (required)interval
: Polling interval in seconds (required)
The module provides access to all readable sensors from the specified chip. Use the sensor names as variables in your yambar configuration. Common sensor names include:
temp1_input
,temp2_input
, etc.: Temperature sensorsfan1_input
,fan2_input
, etc.: Fan speed sensorsin0_input
,in1_input
, etc.: Voltage sensors
Run the sensors -u
command to see available sensors for your system.
If you encounter issues:
- Ensure lm-sensors is correctly configured, run
sensors
- Check that the specified chip name is correct
- Verify that yambar is running with the correct configuration file
- Check yambar stderr for any error messages