Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temperature: use JSON output (-j) of sensors and add inputs whitelist #811

Merged
merged 3 commits into from
Aug 23, 2020

Conversation

arraypad
Copy link
Contributor

It looks like JSON output has been available since 2017 so seems safe:
lm-sensors/lm-sensors#21

Also I've found the inputs whitelist useful to ignore irrelevant values. For example here's my block config:

[[block]]
block = "temperature"
collapsed = false
interval = 10
format = "CPU temp: {average}°"
chip = "nct6798-isa-0290"
good = 30
idle = 40
info = 50
warning = 65
inputs = ["CPUTIN"]

@ammgws
Copy link
Collaborator

ammgws commented Aug 23, 2020

LGTM.

It looks like JSON output has been available since 2017 so seems safe

I used to use Ubuntu 18.04 as a baseline but that seems to be on lm-sensors 3.4. However since 20.04 is out now I think we can say this is OK.

@ammgws
Copy link
Collaborator

ammgws commented Aug 23, 2020

Can you update the docs as well?

@arraypad
Copy link
Contributor Author

Sure, I've updated blocks.md, but after running man/generate.sh I'm seeing lots of unrelated changes in the output, e.g.:

@@ -87,9 +86,9 @@ Show brightness for a specific device:
 .nf
 \f[C]
 [[block]]
-block = \[dq]backlight\[dq]
-device = \[dq]intel_backlight\[dq]
-\f[R]
+block\ =\ "backlight"
+device\ =\ "intel_backlight"
+\f[]

I'm not familiar enough with pandoc / man formatting to know if this is a problem. The output in man looks fine to me though. Would you like me to commit that too?

@ammgws
Copy link
Collaborator

ammgws commented Aug 23, 2020

Yeah there's always something going on with it. Commit it for now

@ammgws ammgws merged commit 25807c8 into greshake:master Aug 23, 2020
@ammgws
Copy link
Collaborator

ammgws commented Aug 23, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants