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

block: temperature: introduced spacing before digit #1303

Closed
ivankovnatsky opened this issue Sep 7, 2021 · 4 comments
Closed

block: temperature: introduced spacing before digit #1303

ivankovnatsky opened this issue Sep 7, 2021 · 4 comments
Labels
configuration Changes to or issues with configuration files

Comments

@ivankovnatsky
Copy link

ivankovnatsky commented Sep 7, 2021

I think this commit: 12ce584 introduced that.

image

while i looked over the code, still could not understand what caused this (i'm not great at rust, sorry).

already moved to sysfs driver:

[[block]]
block = "temperature"
chip = "coretemp"
collapsed = false
driver = "sysfs"
inputs = ["Package id 0"]
@ivankovnatsky ivankovnatsky changed the title block: temperature: introduced spacing before temperature digit block: temperature: introduced spacing before digit Sep 7, 2021
@GladOSkar
Copy link
Contributor

GladOSkar commented Sep 7, 2021

Pretty sure this is also #1231 and was added with the new formatting system.

Have a look there to see the right way to format the value.

@MaxVerevkin seems to me like the new behavior might not be a very good default, we might want to have a look at that. (See also #1272)

@MaxVerevkin
Copy link
Collaborator

I have a few ideas:

  • We can just change the default "min-width" to 1, however those who relied on defaults might get confused.
  • We can also add "refer to (...) for more info" in the blocks' docs. And perhaps formatting docs can be rewritten in a more clear way?
  • (not an actual option) Maybe not provide the default value for "min-width" at all?

@ivankovnatsky
Copy link
Author

ivankovnatsky commented Sep 8, 2021

ah, got it,

[[block]]
block = "temperature"
chip = "coretemp"
collapsed = false
driver = "sysfs"
inputs = ["Package id 0"]

[block.format]
full = "{max:2^3}" # or really just set min-width to 1. also formatted memory block this way (min-width=1).
short = ""

this looks good to me.

i spotted this only on temperature widget.

updated: i suspect this is a more wider discussion, let me close this issue then?

@ammgws ammgws added the configuration Changes to or issues with configuration files label Sep 8, 2021
@ammgws
Copy link
Collaborator

ammgws commented Sep 8, 2021

Opened new issue

@ammgws ammgws closed this as completed Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
configuration Changes to or issues with configuration files
Projects
None yet
Development

No branches or pull requests

4 participants