Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Stat with 0 value does not render #32

Closed
ghost opened this issue Oct 6, 2019 · 3 comments
Closed

Stat with 0 value does not render #32

ghost opened this issue Oct 6, 2019 · 3 comments
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Oct 6, 2019

Hello,

first of all, thx for your great development and widget. I am using it with Ubersicht on my Mac. I only have one problem:

I changed the position to the bottom right corner. I enabled

'cpu.cpu-temp',
'fan.fan-0-speed',
'battery.current-charge'

Of course, normally the fan is not spinning at all, and stays in idle. Due to that, the Current Battery Charge moves to the left and I have a free space on the right as the fan symbol hides itself. I would prefer:

Fan Speed - left
Cpu Temp - middle
Current Battery Charge right

And when the fan is not spinning and hides itself CPU Temp and Battery charge stays in place and the free space is on the left side.

Is there anything I could change in the index.jsx file to make that happen? Or even better, no matter if the fan is idle or not, the symbol stays.

Thanks in advance!

@roele
Copy link
Owner

roele commented Oct 7, 2019

Hello.
I am not aware of any idle fan status as fans on my MacBook Pro never seem to be idle. Given your description i assume that "idle" means that istats does not report the fan at all in this case as otherwise it should be rendered normally with low animation speed.

Note that the order of the stats array is generally respected so putting fan.fan-0-speed at first position should render that stat in the first place. Unfortunately this won't help your use-case much as positioning is still absolute.

A workaround could be to comment out the top, left in the index.jsx and add something like the following in index.css.

.stats {
    display: flex;
    justify-content: flex-end;
    position: absolute;
    bottom: 0px;
    right: 0px;
}

Can you post the output of istats command with idle fans?

@roele roele self-assigned this Oct 7, 2019
@roele roele added the question label Oct 7, 2019
@roele roele changed the title Static position of widget Add support for easy top-left-bottom-right positioning Oct 8, 2019
@ghost
Copy link
Author

ghost commented Oct 10, 2019

Hey, regarding the idle state:

Right now, I woke up my Mac from standby.
screenshot 2019-10-10 um 23 05 53
It stays like this, as long as my CPU temps do not raise above 60Celsius.

Of course thats different on my Mac Pro, where all the different fans are working all the time, but on my MacBook Pro 13" 2017 Non-TouchBar with only one fan, spinning when it is needed, I run into this "issue", I mean cosmetic issue.

@roele roele added bug and removed enhancement labels Oct 13, 2019
@roele roele changed the title Add support for easy top-left-bottom-right positioning Stat with 0 value does not render Oct 13, 2019
@roele roele removed the question label Oct 13, 2019
@roele roele added this to the 2.3.0 milestone Oct 13, 2019
@roele
Copy link
Owner

roele commented Oct 13, 2019

Thanks for the screenshot @misanthrophy. I was able to find the culprit and consider it a bug which will be fixed with next release. Additionally i opened #34 to make it easier to position the widget in one of the corners.

roele pushed a commit that referenced this issue Oct 14, 2019
roele pushed a commit that referenced this issue Oct 14, 2019
@roele roele closed this as completed Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant