It is currently May 26th, 2020, 9:46 am

Round 4 Core CPU Meter

Post your work-in-progress and completed skins to share and discuss.
User avatar
DavidRGreen
Posts: 11
Joined: May 5th, 2020, 10:19 am

Round 4 Core CPU Meter

Post by DavidRGreen »

This Widget, designed to sit discretely in a corner of the desktop reflects the CPU core usage as an arc per core, outer being #1 through to inner being #4. The line colour will change depending on the CPU core usage; length of arc, starting at a green colour though to red (for "red lining").

The percentile value at the bottom reflects the whole CPU average.

Image

As this was my first (significant) widget developed, I had a little help from balala in sorting out some of the code. (Thanks!)
Round CPU Meter_1.0.rmskin
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 10587
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Round 4 Core CPU Meter

Post by balala »

Looking good, congratulations. However there is a small improvement, which you could easily do and me personally at least, definitely recommend it.
Since not all processors have four cores, you should achieve the skin to show the appropriate number of Roundline meters, depending on the number of cores. You should choose a number of cores up to which the skin should show the correct number of meters. Not to modify too much the code, starting from the size of the existing meters, this number should be 8. If you want more, you have to increase the diameter of the Roundline meters.
Interested? If you are and you don't know how to achieve it, please let me know, for assistance.
User avatar
DavidRGreen
Posts: 11
Joined: May 5th, 2020, 10:19 am

Re: Round 4 Core CPU Meter

Post by DavidRGreen »

Thanks balala,

Actually, your suggestion is not totally unexpected. And I already have an idea on an implementation solution that will not impact its dimensions.
Ironically, when I first built this widget, many years ago, I only had a dual-core computer, but built it for a quad, and it was still 'good to go' when I upgraded to a quad-core machine.

Of course, Octo-core is all very well, but after that? Visualisation after that may become an overkill… Maybe…

Stay tuned for Updates :)
User avatar
balala
Rainmeter Sage
Posts: 10587
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Round 4 Core CPU Meter

Post by balala »

DavidRGreen wrote:
May 24th, 2020, 3:20 am
Of course, Octo-core is all very well, but after that? Visualisation after that may become an overkill… Maybe…
Yep, but you could increase the diameter of the skin or whatever. It's up to you, you being the author.
DavidRGreen wrote:
May 24th, 2020, 3:20 am
Stay tuned for Updates :)
Alright.
User avatar
DavidRGreen
Posts: 11
Joined: May 5th, 2020, 10:19 am

Round 4, 6 & 8 Core CPU Meter

Post by DavidRGreen »

Okay, now we have 4, 6 & 8 Core CPU meters.

Image

I don't actually have an 8 core CPU on my computer, so my first thought was, "What are those extra lines doing there?"
I did check my system specs, and yes, I only have four, so them I checked the log, and all was revealed… Instead on yielding a return value of zero for non-existant cores (like it used to under XWidget), Rainmeter is populating the empty core values with the average (ie. Core 0).

I'd prefer a zero (or -1) for a null core, a -1 value would be detectable and actioned accordingly, but anyway…
Round CPU Meter_2.0.rmskin
So there it is, up to 8 cores, and still the same size, discrete and unimposing on desktop acreage.
You do not have the required permissions to view the files attached to this post.