It is currently April 20th, 2024, 5:02 am

How to show cpu current core speed?

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16147
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to show cpu current core speed?

Post by balala »

swiftord wrote: August 13th, 2019, 6:50 am How to show cpu current core speed?
You might also take a look here: https://forum.rainmeter.net/viewtopic.php?f=27&t=33082#p164557
swiftord
Posts: 4
Joined: August 13th, 2019, 6:45 am

Re: How to show cpu current core speed?

Post by swiftord »

balala wrote: August 13th, 2019, 4:13 pm Ok, let's see if I understood well what would you like. I suppose you'd like to change the CPU loading with the current speed of the CPU, into the Nisekoi\Kirisaki\kirisaki.ini skin. Am I right?
If I am, here is what to do: first add the following measure to your code:

Code: Select all

[MeasureCPUSpeed]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=CpuSpeed
RegExpSubstitute=1
Substitute="^(.*)[^k]$":"\1 M","^(.*)k$":"\1 G"
This measure returns the needed speed.
Now just to can easily turn back to show the CPU load, I recommend to add a Speed variable to the [Variables] section. This variable will control what to be shown: if it's 0, the CPU load will be shown (same way as before), but if it's 1, the speed will be. So, add it:

Code: Select all

[Variables]
...
Speed=1
Now modify the [MeterState] meter, because it is extremely weirdly written. Remove its Text option, because immediately we'll set it through !SetOption bangs and remove the DynamicVariables=1 option as well. It won't be needed anymore. Add the following three options to the same [MeterState] meter: MeasureName=CPUCalc, MeasureName2=MeasureCPUSpeed and AutoScale=2.
And finally you have to add one more measure, which controls what you see: the CPU load or its speed. Add the following measure:

Code: Select all

[MeasureSpeed]
Measure=Calc
Formula=#Speed#
IfCondition=(#CURRENTSECTION#>=1)
IfTrueAction=[!SetOption MeterState Text "%2Hz"][!UpdateMeter "MeterState"][!Redraw]
IfFalseAction=[!SetOption MeterState Text "%1%"][!UpdateMeter "MeterState"][!Redraw]
Now you might use for the Speed variable either 0 (in which case you'll get the CPU loading), or 1, to get the speed.
Please let me know if this is what you wanted and if you've succeeded getting it to work.
This is what I need, and it succeeded work, thank for your help!
User avatar
balala
Rainmeter Sage
Posts: 16147
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to show cpu current core speed?

Post by balala »

swiftord wrote: August 22nd, 2019, 3:05 am This is what I need, and it succeeded work, thank for your help!
Glad to help.