It is currently March 28th, 2024, 6:59 pm

Help with achieving a simple skin

Get help with installing and using Rainmeter.
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

Well, that clears everything :)

New Meters Skin Code :

Code: Select all

[Rainmeter]
Update=1000
Background=#@#bg_small.png

LeftMouseUpAction=["taskmgr.exe"]

---------------

[Variables]

[MeasureCPU]
Measure=CPU
IfCondition=(#CURRENTSECTION#<60)
IfTrueAction=[!SetOption MeterCPUBar BarColor "185,250,160"][!UpdateMeter "MeterCPUBar"][!Redraw]
IfCondition2=((#CURRENTSECTION#>=60)&&(#CURRENTSECTION#<80))
IfTrueAction2=[!SetOption MeterCPUBar BarColor "255,255,153"][!UpdateMeter "MeterCPUBar"][!Redraw]
IfCondition3=(#CURRENTSECTION#>=80)
IfTrueAction3=[!SetOption MeterCPUBar BarColor "205,175,180"][!UpdateMeter "MeterCPUBar"][!Redraw]

[MeasureRAM]
Measure=PhysicalMemory
MinValue=0
MaxValue=[MeasureRAMTotal]
DynamicVariables=1

[MeasureRAMTotal]
Measure=PhysicalMemory
Total=1

[MeasureRAMPercent]
Measure=Calc
Formula=( 100 * MeasureRAM / MeasureRAMTotal)
IfCondition=(#CURRENTSECTION#<80)
IfTrueAction=[!SetOption MeterRAMBar BarColor "185,250,160"][!UpdateMeter "MeterRAMBar"][!Redraw]
IfCondition2=((#CURRENTSECTION#>=80)&&(#CURRENTSECTION#<90))
IfTrueAction2=[!SetOption MeterRAMBar BarColor "255,255,153"][!UpdateMeter "MeterRAMBar"][!Redraw]
IfCondition3=(#CURRENTSECTION#>=90)
IfTrueAction3=[!SetOption MeterRAMBar BarColor "205,175,180"][!UpdateMeter "MeterRAMBar"][!Redraw]

[MeasureMaxTemp]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=MaxTemperature
IfCondition=(#CURRENTSECTION#<75)
IfTrueAction=[!SetOption MeterMaxTempBar BarColor "185,250,160"][!UpdateMeter "MeterMaxTempBar"][!Redraw]
IfCondition2=((#CURRENTSECTION#>=75)&&(#CURRENTSECTION#<90))
IfTrueAction2=[!SetOption MeterMaxTempBar BarColor "255,255,153"][!UpdateMeter "MeterMaxTempBar"][!Redraw]
IfCondition3=(#CURRENTSECTION#>=90)
IfTrueAction3=[!SetOption MeterMaxTempBar BarColor "205,175,180"][!UpdateMeter "MeterMaxTempBar"][!Redraw]

[MeasureMaxTempPercent]
Measure=Calc
Formula=( 100 * MeasureMaxTemp / 105)
MinValue=0
MaxValue=100

---------------

[MeterCPUSmallText]
Meter=STRING
UpdateDivider=-1
X=68
Y=20
FontColor=220,220,220
FontSize=7
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=CPU

[MeterCPU]
Meter=STRING
MeasureName=MeasureCPU
X=68
Y=33
FontColor=220,220,220
FontSize=12
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=%1%

[MeterCPUBar]
Meter=Bar
MeasureName=MeasureCPU
X=73
Y=22
W=97
H=12
SolidColor=150,150,150,100
BarOrientation=Horizontal

---------------

[MeterRAMSmallText]
Meter=STRING
UpdateDivider=-1
X=68
Y=53
FontColor=220,220,220
FontSize=7
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=RAM

[MeterRAM]
Meter=STRING
MeasureName=MeasureRAMPercent
X=68
Y=66
FontColor=220,220,220
FontSize=12
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=%1%

[MeterRAMBar]
Meter=Bar
MeasureName=MeasureRAM
X=73
Y=55
W=97
H=12
SolidColor=150,150,150,100
BarOrientation=Horizontal

---------------

[MeterMaxTempSmallText]
Meter=STRING
UpdateDivider=-1
X=68
Y=86
FontColor=220,220,220
FontSize=7
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=TEMP

[MeterMaxTemp]
Meter=String
MeasureName=MeasureMaxTemp
X=68
Y=99
FontColor=220,220,220
FontSize=12
FontFace=Segoe UI
StringStyle=BOLD
StringEffect=Shadow
StringEffectColor=0,0,0
StringAlign=RightCenter
AntiAlias=1
Text=%1°C

[MeterMaxTempBar]
Meter=Bar
MeasureName=MeasureMaxTempPercent
X=73
Y=88
W=97
H=12
SolidColor=150,150,150,100
BarOrientation=Horizontal
No more questions I guess ! :17denial :D
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:No more questions I guess ! :17denial :D
Ok. Feel free to come back if you have any. :great:
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

Well, actually I *do* have one more question, lol. This may be a tricky one. ;)

I have been using the weather skin, and its behaviour bothers me a bit. Let me explain :
  • During the day, we can see [Today] / [Tomorrow] / [Day after] :thumbup:
  • On the evening, [Today]'s icon turns to "night", but we can still see [Tomorrow] / [Day after] :thumbup:
  • During the night (after midnight), [Today]'s icon remains on "night", but since after midnight we are not on the same day anymore, [Tomorrow] becomes [Day After] and [Day after] becomes [Day after 2] ! Which means that we can't see [Tomorrow] (well, [Today] since we're after midnight :D ) anymore. That's unfortunate when you go to sleep after midnight and you want to know next morning's weather ! O.O
To give a clear example, yesterday (monday) :
  • During the day : Day / Tuesday / Wednesday
  • During the evening : Night / Tuesday / Wednesday
  • During the night : Night / Wednesday / Thursday ! (no Tuesday anymore :( )

Here's a screen cap taken @ 3AM, to show the inconsistency : https://image.ibb.co/bDpHvU/11_09_2018_03_06_01.jpg

The "ideal" behaviour for me would be that [Tomorrow] and [Day after] don't change until the morning, when [Today]'s icon switches to "day" again. So again, with yesterday's example :
  • During the day : Day / [Tomorrow] / [Day after]
  • During the evening : Night / [Tomorrow] / [Day after]
  • During the night (after midnight) : Night / [Today] / [Tomorrow]
  • Only at the end of the night (morning) : Day / [Tomorrow] / [Day after]
This would be a more consistent behaviour. Unfortunately I have no idea yet on how to achieve this... Any clues ? :)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:Any clues ? :)
This is how weather.com works. I'm not sure there could be anything to be done, but will take a look. Let's see what can we achieve.
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

Of course, I wasn't planning on modifying weather.com, but rather on modifying the skin's behaviour with some IF conditions. Something like :
  • IF time > midnight AND time < morning, then display : [night] [today] [tomorrow]
  • IF time > morning AND time < evening, then display : [today] [tomorrow] [day after]
  • IF time > evening AND time < midnight, then display : [night] [tomorrow] [day after]
I guess morning and evening times can be provided by weather.com (I suppose they are already used for displaying the [night] icon)

That could work, right ? :) (well, theoretically :D )

Worst case scenario, if we can't do that (for example if we can't access weather.com's [today] info from midnight till morning), then :
  • In the last update before midnight (so if 23:15 < time < midnight, because Update = 900 and UpdateRate = 3000 which makes a web parsing rate of 2700 s = 45 min ;) ) : store [tomorrow] info (icon name and temperature value) in some [XXX] variable
  • From midnight till morning : display [night] [XXX] [tomorrow] (instead of displaying [night] [tomorrow] [day after])
I hope that at least conceptually it makes sense :)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:Of course, I wasn't planning on modifying weather.com, but rather on modifying the skin's behaviour with some IF conditions. Something like :
  • IF time > midnight AND time < morning, then display : [night] [today] [tomorrow]
  • IF time > morning AND time < evening, then display : [today] [tomorrow] [day after]
  • IF time > evening AND time < midnight, then display : [night] [tomorrow] [day after]
I guess morning and evening times can be provided by weather.com (I suppose they are already used for displaying the [night] icon)

That could work, right ? :) (well, theoretically :D )

Worst case scenario, if we can't do that (for example if we can't access weather.com's [today] info from midnight till morning), then :
  • In the last update before midnight (so if 23:15 < time < midnight, because Update = 900 and UpdateRate = 3000 which makes a web parsing rate of 2700 s = 45 min ;) ) : store [tomorrow] info (icon name and temperature value) in some [XXX] variable
  • From midnight till morning : display [night] [XXX] [tomorrow] (instead of displaying [night] [tomorrow] [day after])
I hope that at least conceptually it makes sense :)
Probably I'll check it and see what can be done, just on weekend. I'm sorry, but in week time I can't wait until midnight, to check what's going on. :confused:
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

Of course my friend, I understand, take your time :) But you don't need to wait until midnight ! I think I can safely tell you what's going on :
1. The skin polls info from weather.com every 2700 sec (45 min)
2. It always displays [Current] / [Tomorrow] / [Day after]
3. So the first time it polls info after midnight, we have a problem (the skin author probably didn't think of that)

Ex : Monday
- Before midnight's update : [Current] / [Tuesday] / [Wednesday]
- After midnight's update : [Current] / [Wednesday] / [Thursday], so we lose [Tuesday]
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:Of course my friend, I understand, take your time :) But you don't need to wait until midnight ! I think I can safely tell you what's going on :
1. The skin polls info from weather.com every 2700 sec (45 min)
2. It always displays [Current] / [Tomorrow] / [Day after]
3. So the first time it polls info after midnight, we have a problem (the skin author probably didn't think of that)

Ex : Monday
- Before midnight's update : [Current] / [Tuesday] / [Wednesday]
- After midnight's update : [Current] / [Wednesday] / [Thursday], so we lose [Tuesday]
Yes, understood, but I need the code of the weather.com as it is AFTER midnight, to see how does it change. That's why I have to wait until then.
User avatar
Jose Hidalgo
Posts: 58
Joined: September 7th, 2018, 4:47 pm

Re: Help with achieving a simple skin

Post by Jose Hidalgo »

Well, if you're still up for it, it looks like tonight and tomorrow night are the right moments for you my friend. Good luck ! :thumbup:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help with achieving a simple skin

Post by balala »

Jose Hidalgo wrote:Well, if you're still up for it, it looks like tonight and tomorrow night are the right moments for you my friend.
Yes, I definitely am. I'll take a look tonight, to see what can I figure out from this.