Skip to content

Added sysfs monitoring bar variables#2285

Open
mfluhr wants to merge 2 commits intobrndnmtthws:mainfrom
mfluhr:hwmonbar
Open

Added sysfs monitoring bar variables#2285
mfluhr wants to merge 2 commits intobrndnmtthws:mainfrom
mfluhr:hwmonbar

Conversation

@mfluhr
Copy link
Copy Markdown
Contributor

@mfluhr mfluhr commented Nov 24, 2025

Description

I used "hwmon" for years now to monitor my CPU core temps, but needed to fallback to an execbar to have those values shown as bar nearby. Since doing so for all cores is quite heavy, I added some sysfs bar variables (hwmonbar, i2cbar and platformbar) that basically fill this gap. Doing so, spared me some CPU usage.

The code should not affect existing conky configurations, since it is new variables addition.

I tested this using the "hwmonbar" variable to monitor my AMD CPU core package temps, replacing this
${execbar sensors -u k10temp-pci-00c3 | grep temp1_input | awk '{print $2}' | cut -d '.' -f1}
with this
${hwmonbar k10temp temp2 1 1.0 0.0}

One important note: Due to the bar scaling when calling setup_bar(), the factor and offset should be adjusted properly so that the value is always inside a 0-100 range.

@netlify
Copy link
Copy Markdown

netlify bot commented Nov 24, 2025

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit ed021ea
🔍 Latest deploy log https://app.netlify.com/projects/conkyweb/deploys/6925803f5f24480008c2a384

@github-actions github-actions bot added documentation suggests documentation changes or improvements sources PR modifies project sources os: linux related exclusively to Linux (not BSD/MacOS) labels Nov 24, 2025
@mfluhr mfluhr changed the title Hwmonbar Added sysfs monitoring bar variables Nov 24, 2025
@mfluhr mfluhr force-pushed the hwmonbar branch 2 times, most recently from c3b6f5c to ed021ea Compare November 25, 2025 10:09
@brndnmtthws brndnmtthws added enhancement suggests alteration of existing functionality to better support different use cases feature suggest addition of new functionality that isn't currently supported in any way labels Jan 16, 2026
Copy link
Copy Markdown
Owner

@brndnmtthws brndnmtthws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the addition. I think there are a couple issues to fix before merge:

  1. platformbar is wired to parse_i2c_bar, so it uses the i2c sysfs path and will not find platform devices. It should call parse_platform_bar. (src/core.cc)
  2. sysfs_sensor_barval clamps negative values to 100.0 instead of 0.0, so a negative value shows a full bar. (src/data/os/linux.cc)

Please address these and I’m happy to re-review.

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 16, 2026

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit beeaa54
🔍 Latest deploy log https://app.netlify.com/projects/conkyweb/deploys/697260f2ca46a70008dbe5bc

@mfluhr
Copy link
Copy Markdown
Contributor Author

mfluhr commented Jan 16, 2026

Whoops.... Those were 2 very dumb mistakes!
I just fixed them and amended the initial commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation suggests documentation changes or improvements enhancement suggests alteration of existing functionality to better support different use cases feature suggest addition of new functionality that isn't currently supported in any way os: linux related exclusively to Linux (not BSD/MacOS) sources PR modifies project sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants