It is currently April 25th, 2024, 10:19 am

Gadgets 7.6.1 - inspired by AddGadgets.com Sidebar Gadgets

A package of skins with a "theme" or by a single author
User avatar
SilverAzide
Rainmeter Sage
Posts: 2605
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 7.4.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by SilverAzide »

DangerousMinds wrote: October 7th, 2022, 9:28 pm Ok for the temperatures point, that sounds like I have to live with the actual layout. That's sad because I know nothing about Lua so I can't try this out. :-( It is how it is :lol:
If you want to try adjusting the skin layout, don't let this discourage you. Just keep the existing measures and meters intact and don't change their names, especially the meters [MeterCore1] to [MeterCore64]. If you can do that, I can give you the instructions on what to change in the Lua script. You will need to add additional meters to show the temperatures, but the Lua won't need to be adjusted for that.
Gadgets Wiki GitHub More Gadgets...
DangerousMinds
Posts: 17
Joined: October 7th, 2022, 5:53 pm

Re: Gadgets 7.4.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by DangerousMinds »

SilverAzide wrote: October 7th, 2022, 11:32 pm If you want to try adjusting the skin layout, don't let this discourage you. Just keep the existing measures and meters intact and don't change their names, especially the meters [MeterCore1] to [MeterCore64]. If you can do that, I can give you the instructions on what to change in the Lua script. You will need to add additional meters to show the temperatures, but the Lua won't need to be adjusted for that.
Good morning. Ok that sounds good. I would love to get the instruction from you and give it a try. Have a nice weekend!
User avatar
SilverAzide
Rainmeter Sage
Posts: 2605
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 7.4.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by SilverAzide »

DangerousMinds wrote: October 8th, 2022, 5:16 am Good morning. Ok that sounds good. I would love to get the instruction from you and give it a try. Have a nice weekend!
OK... For now, you just need to make one change to the Lua script to get started. Open the CpuMeter.ua file and find the line that reads "configure temperature meters" (line 485). Change the entire block of text below that line like this:

Code: Select all

      -- configure temperature meters
      --if nHideTempBar == 1 then
      --  -- single temp bar hidden; temps are per core (e.g. for Intel CPUs)
      --  SKIN:Bang("!SetOption", "MeterCore" .. i, "Text", (nCoreIndex + 1) .. " [[" .. aMeasureNames[i] .. ":0]°#TempUOM#]")
      --  SKIN:Bang("!SetOption", "MeterCore" .. i, "DynamicVariables", "1")
      --else
      --  -- single temp bar shown (e.g., for AMD CPUs)
        SKIN:Bang("!SetOption", "MeterCore" .. i, "Text", "Core " .. (nCoreIndex + 1))
        SKIN:Bang("!SetOption", "MeterCore" .. i, "DynamicVariables", "0")
      --end
What you are doing is commenting out all the lines of code except for line 492-493.

When you do this, you will no longer see temperatures. This is because there are no dedicated meters to show temps; the temps are shown as part of the core number meter. Your job is to add all the meters to show temperatures in the location you want.

The temperature meters you add will need to look roughly something like this (consider this pseudo-code, as I did not try it). Note that this code assumes you are using HWiNFO, it cannot switch monitoring tools on the fly like the skin normally does, but that can be fixed later in the Lua once you get it all working. Also note that the first meter is slightly different than meters #2 through #64.

Code: Select all

[MeterTempCore1]
Meter=String
MeterStyle=StyleTextBar
FontColor=#PaletteColor1#
StringAlign=Right
Text="[MeasureHWiNFOCpu1:0]°#TempUOM#"
X=...fix this as needed...
Y=...fix this as needed...
Hidden=(#HideCoreBars# || [CalcNoTempMonitorInUse:])
DynamicVariables=1

[MeterTempCore2]
Meter=String
MeterStyle=StyleTextBar
FontColor=#PaletteColor2#
StringAlign=Right
Text="[MeasureHWiNFOCpu2:0]°#TempUOM#"
X=0r
Y=(12 * (((#HideCoreBars# || (#TotalCores# < 2)) + 1) % 2))r
Hidden=(#HideCoreBars# || (#TotalCores# < 2) || [CalcNoTempMonitorInUse:])
DynamicVariables=1

...

[MeterTempCore64]
Meter=String
MeterStyle=StyleTextBar
FontColor=#PaletteColor64#
StringAlign=Right
Text="[MeasureHWiNFOCpu64:0]°#TempUOM#"
X=0r
Y=(12 * (((#HideCoreBars# || (#TotalCores# < 64)) + 1) % 2))r
Hidden=(#HideCoreBars# || (#TotalCores# < 64) || [CalcNoTempMonitorInUse:])
DynamicVariables=1
This should be enough to get you started. You can save some typing by creating your own style for these meters and eliminate the repeated StringAlign, DynamicVariables, etc. on all these meters.
Gadgets Wiki GitHub More Gadgets...
DangerousMinds
Posts: 17
Joined: October 7th, 2022, 5:53 pm

Re: Gadgets 7.4.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by DangerousMinds »

Today I have some time, so I thought I will give your instruction a chance :)

The first thing I've tried was to change the CPU logo what perfectly worked.
The second thing was the temperature point. I did everything what you said and it's working fantastic. The only thing is that the skin is not wide enough that it will look good.

After this I tried to get the MHz to show and I also get this to work, but also something went wrong and instead of the temperature for each core it shows the MHz for each core. After some time I found the problem. Somehow the ID for the core temperature had change so I had to also change it in the HWINFO.inc. Now it's working half ok :lol:
The issue is that from [MeterTempCore6] the cores are not showing on the correct spot. I take your code and put it in the CpuMain.inc and changed the Numbers for every Core like this:
[MeterTempCore2]
Meter=String
MeterStyle=StyleTextBar
FontColor=#PaletteColor2#
StringAlign=Right
Text="[MeasureHWiNFOCpu2:0]°#TempUOM#"
X=0r
Y=(12 * (((#HideCoreBars# || (#TotalCores# < 2)) + 1) % 2))r
Hidden=(#HideCoreBars# || (#TotalCores# < 2) || [CalcNoTempMonitorInUse:])
DynamicVariables=1

[MeterTempCore3]
Meter=String
MeterStyle=StyleTextBar
FontColor=#PaletteColor3#
StringAlign=Right
Text="[MeasureHWiNFOCpu3:0]°#TempUOM#"
X=0r
Y=(12 * (((#HideCoreBars# || (#TotalCores# < 3)) + 1) % 2))r
Hidden=(#HideCoreBars# || (#TotalCores# < 3) || [CalcNoTempMonitorInUse:])
DynamicVariables=1

[MeterTempCore4]
Meter=String
MeterStyle=StyleTextBar
FontColor=#PaletteColor4#
StringAlign=Right
Text="[MeasureHWiNFOCpu4:0]°#TempUOM#"
X=0r
Y=(12 * (((#HideCoreBars# || (#TotalCores# < 4)) + 1) % 2))r
Hidden=(#HideCoreBars# || (#TotalCores# < 4) || [CalcNoTempMonitorInUse:])
DynamicVariables=1

[MeterTempCore5]
Meter=String
MeterStyle=StyleTextBar
FontColor=#PaletteColor5#
StringAlign=Right
Text="[MeasureHWiNFOCpu5:0]°#TempUOM#"
X=0r
Y=(12 * (((#HideCoreBars# || (#TotalCores# < 5)) + 1) % 2))r
Hidden=(#HideCoreBars# || (#TotalCores# < 5) || [CalcNoTempMonitorInUse:])
DynamicVariables=1
etc. I did not change anything else beside the things we are talking about, so I don't know why this is happening. You can see what I mean on the picture. Did you have an idea what went wrong? I see that also the text is not bold like the others.

Image

One question beside the actual things. I have 10 Cores and 20 Threads, but I only want to show the 10 Cores. Is that possible because I can't find settings to do that.
This should be enough to get you started. You can save some typing by creating your own style for these meters and eliminate the repeated StringAlign, DynamicVariables, etc. on all these meters.
I used the code like you gave it to me because I'm not good enough to changed it in "my style" :lol:
I tried to delete the DynamicVariables, but then the temperature is not showing correct. It's only showing 0°C than. So I will leave everything like it is :lol:

I hope you can help me with figuring out what the problem with the temperature position is. And I hope for more instruction for changing the wideness of the Gadget :)
User avatar
SilverAzide
Rainmeter Sage
Posts: 2605
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 7.4.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by SilverAzide »

DangerousMinds wrote: October 9th, 2022, 3:56 pm The only thing is that the skin is not wide enough that it will look good.
...And I hope for more instruction for changing the wideness of the Gadget :)
The width of the skin is controlled by a variable. At the top of the file, look for BgWidth=160. Change this value to whatever width you want. When you do this, you'll notice some meters will move because they are positioned relative to the width (i.e., right side of the skin), so you will need to move things around.
DangerousMinds wrote: October 9th, 2022, 3:56 pm The issue is that from [MeterTempCore6] the cores are not showing on the correct spot. I take your code and put it in the CpuMain.inc and changed the Numbers for every Core like this:

etc. I did not change anything else beside the things we are talking about, so I don't know why this is happening. You can see what I mean on the picture. Did you have an idea what went wrong? I see that also the text is not bold like the others.
You didn't post the code for the [MeterTempCore6] meter, which is the one where things have gone wrong. Check that meter again carefully, you changed something improperly so it no longer works like the one before it (#5). Check for typos, particularly in the MeterStyle value. You might see errors in the Log, so check there too. (Also, please use code tags when posting code, not spoiler tags. You can do both by putting spoiler tags around code tags if you want.)
DangerousMinds wrote: October 9th, 2022, 3:56 pm One question beside the actual things. I have 10 Cores and 20 Threads, but I only want to show the 10 Cores. Is that possible because I can't find settings to do that.
Don't even go there, LOL. Your CPU has 20 "logical cores" or "logical processors". That is what Windows sees, and that is how Windows treats your CPU. Windows doesn't care about "physical cores". CPU utilization is monitored by logical core, so if you try to limit this to physical cores, then your CPU percent utilization will no longer be possible to monitor, because Windows doesn't track it this way.
Gadgets Wiki GitHub More Gadgets...
DangerousMinds
Posts: 17
Joined: October 7th, 2022, 5:53 pm

Re: Gadgets 7.4.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by DangerousMinds »

I did it! Holy moly :lol:

There is only one thing that I can't figure out. What do I have to change for the position of the text of "CPU-Auslastung" and the percentage? I want both more in the center.

Image
User avatar
SilverAzide
Rainmeter Sage
Posts: 2605
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 7.4.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by SilverAzide »

DangerousMinds wrote: October 9th, 2022, 10:40 pm I did it! Holy moly :lol:

There is only one thing that I can't figure out. What do I have to change for the position of the text of "CPU-Auslastung" and the percentage? I want both more in the center.
Excellent job! Congratulations! :thumbup:

To center the title, find the meter [MeterTitleText], and change the formula for the X value. For example, X=(#BgWidth# / 2) will center the title.

After moving the title, you might find you don't need to move the usage percentage. But if you want to move it, I would not combine the title and the percentage into a single meter, because the changing percentage numbers will bounce around annoyingly. But you can nudge the percentage value over so it is closer to the title. Just find the meter [MeterCPUUsage] (it is the one below the title mentioned above). Change the X value again to move the entry as needed. For example, take the existing option X=(#BgWidth# - (#TextPosX# + 2)) and just increase the "2" to something larger to nudge it to the left. You can temporarily change the Text option to Text="100%" to ensure you have left enough space after the title.
Gadgets Wiki GitHub More Gadgets...
DangerousMinds
Posts: 17
Joined: October 7th, 2022, 5:53 pm

Re: Gadgets 7.4.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by DangerousMinds »

SilverAzide wrote: October 9th, 2022, 11:01 pm Excellent job! Congratulations! :thumbup:

To center the title, find the meter [MeterTitleText], and change the formula for the X value. For example, X=(#BgWidth# / 2) will center the title.

After moving the title, you might find you don't need to move the usage percentage. But if you want to move it, I would not combine the title and the percentage into a single meter, because the changing percentage numbers will bounce around annoyingly. But you can nudge the percentage value over so it is closer to the title. Just find the meter [MeterCPUUsage] (it is the one below the title mentioned above). Change the X value again to move the entry as needed. For example, take the existing option X=(#BgWidth# - (#TextPosX# + 2)) and just increase the "2" to something larger to nudge it to the left. You can temporarily change the Text option to Text="100%" to ensure you have left enough space after the title.
That was working very good for me. Now I have only one little thing. It's not important, but I would like to have it. Is there a way to add a little Text to the skin? You can see in the picture what I mean. I want to add the "Temp" text to it, and I also want it in red color.

Image
User avatar
SilverAzide
Rainmeter Sage
Posts: 2605
Joined: March 23rd, 2015, 5:26 pm

Re: Gadgets 7.4.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by SilverAzide »

DangerousMinds wrote: October 10th, 2022, 1:55 pm That was working very good for me. Now I have only one little thing. It's not important, but I would like to have it. Is there a way to add a little Text to the skin? You can see in the picture what I mean. I want to add the "Temp" text to it, and I also want it in red color.
Sure... just add a new meter after the RAM percentage, just like you did earlier with the temps. You can use the same logic as the temperature meters you added, but instead of displaying a value from a measure, just display the text "Temp". The color red is "255,0,0".
Gadgets Wiki GitHub More Gadgets...
DangerousMinds
Posts: 17
Joined: October 7th, 2022, 5:53 pm

Re: Gadgets 7.4.0 - inspired by AddGadgets.com Sidebar Gadgets

Post by DangerousMinds »

Yes Baby, I'm finally done :D

Now I have the temp text on position Y=70 and it seems a little bit to high but when I put it to Y=69 it is a little too low. For me that is absolute fine because you can only see that in the image. On the PC screen it looks perfect.

Image

Thank you so, so much for your help SilverAzide!!! And of course thanks a lot for this amazing Gadgets ♥ :rosegift: