After finding the minimalistic LEXIS calendar, I decided to have a play and try and minimise the code as much as possible, just for fun really. But now, I have found it to be a useful addition, so am attempting to condense it as much as possible.
Btw, I have looked at the manual but am not any the wiser about what the formula is doing or what TimeStamp actually does in this formula.
A couple of things I am stuck on: 1. What does this do, and why does it require the - #dayshift# variable?
Code:
[Variables]dayShift=1[mDay]Measure=TimeTimeStamp=[mDate0:Timestamp]Format=%u; with 7 IfConditions...[mDate1]Measure=TimeTimeStamp=([mDate0:Timestamp] - ([mDay:] - #dayShift#) * 86400) <- Specifically this is what I am confused about.Format=%dGroup=DateDynamicVariables=1
I don't understand why the date being retrieved is actually showing the day before when I remove the - #dayshift# variable.
2. When creating a bar, which is already a part of the skin I wish to add this calendar to, how do you get the full monthly value and how does it change the total value of the bar? For example, imagine every month the recycle bin changed it's total capacity, how would the bar know the total capacity? Is it an automatic thing that just works?
Full calendar code:
Code:
[Rainmeter]Update=60000AccurateText=1DefaultUpdateDivider=-1SkinWidth=150BackgroundMode=2SolidColor=0,0,0,100MiddleMouseUpAction=[!Refresh][Metadata]Name=LEXIS Calendar Mod, Monday StartAuthor=sl23Information=Linear calendar for one week. | Originally designed by Alex Lareo (iNote Tablet UI concept design: https://lexpictura.wordpress.com/2010/01/26/unlock-screen/) and implemented by Kenz0 (LEXIS: http://kenz0.s201.xrea.com/portfolio/skins/lexis.html). Pure code updated version by PineYellow.Version=1.0License=CC BY-NC-SA 4.0[Variables]Aqua=65,146,160Orange=255,128,0White=200,200,200Yellow=255,255,0Day=#Aqua#,238Date=#White#,153Highlight=#White#,238Date1=MoDate2=TuDate3=WeDate4=ThDate5=FrDate6=SaDate7=SuShadeH=30; -------- Constants --------dayShift=1========================================; STYLES========================================[sGlobalText]MeasureName=m#CURRENTSECTION#FontFace=Trebuchet MSFontWeight=700StringAlign=CenterCenterFontSize=9FontColor=#Date#Text=[#[#CURRENTSECTION]]#CRLF#%1InlineSetting=Color | #Day#InlinePattern=(Mo|Tu|We|Th|Fr|Sa|Su)AntiAlias=1DynamicVariables=1Group=DateX=20rY=0r========================================; MEASURES========================================[mDate0]Measure=TimeFormat=%DOnChangeAction=[!UpdateMeasure mDay][!UpdateMeasureGroup Date][!UpdateMeterGroup Date][!UpdateMeter Shape]UpdateDivider=1[mDay]Measure=TimeTimeStamp=[mDate0:Timestamp]Format=%uIfCondition=#CURRENTSECTION#=1IfTrueAction=[!SetOption Date1 InlinePattern (Tu|We|Th|Fr|Sa|Su)][!SetOption Date1 FontColor #Highlight#][!SetOption Shape X "([Date1:X])"]; IfFalseAction=[!SetOption Date1 FontColor ""]IfCondition2=#CURRENTSECTION#=2IfTrueAction2=[!SetOption Date2 InlinePattern (Mo|We|Th|Fr|Sa|Su)][!SetOption Date2 FontColor #Highlight#][!SetOption Shape X "([Date2:X]-2)"]; IfFalseAction2=[!SetOption Date2 FontColor ""]IfCondition3=#CURRENTSECTION#=3IfTrueAction3=[!SetOption Date3 InlinePattern (Mo|Tu|Th|Fr|Sa|Su)][!SetOption Date3 FontColor #Highlight#][!SetOption Shape X "([Date3:X]-1)"]; IfFalseAction3=[!SetOption Date3 FontColor ""]IfCondition4=#CURRENTSECTION#=4IfTrueAction4=[!SetOption Date4 InlinePattern (Mo|Tu|We|Fr|Sa|Su)][!SetOption Date4 FontColor #Highlight#][!SetOption Shape X "([Date4:X]-1)"]; IfFalseAction4=[!SetOption Date4 FontColor ""]IfCondition5=#CURRENTSECTION#=5IfTrueAction5=[!SetOption Date5 InlinePattern (Mo|Tu|We|Th|Sa|Su)][!SetOption Date5 FontColor #Highlight#][!SetOption Shape X "([Date5:X]-1)"]; IfFalseAction5=[!SetOption Date5 FontColor ""]IfCondition6=#CURRENTSECTION#=6IfTrueAction6=[!SetOption Date6 InlinePattern (Mo|Tu|We|Th|Fr|Su)][!SetOption Date6 FontColor #Highlight#][!SetOption Shape X "([Date6:X]-1)"]; IfFalseAction6=[!SetOption Date6 FontColor ""]IfCondition7=#CURRENTSECTION#=7IfTrueAction7=[!SetOption Date7 InlinePattern (Mo|Tu|We|Th|Fr|Sa)][!SetOption Date7 FontColor #Highlight#][!SetOption Shape X "([Date7:X]-1)"]; IfFalseAction7=[!SetOption Date7 FontColor ""]DynamicVariables=1[mDate1]Measure=TimeTimeStamp=([mDate0:Timestamp] - ([mDay:] - #dayShift#) * 86400)Format=%dGroup=DateDynamicVariables=1; OnChangeAction=[!UpdateMeasureGroup Date][mDate2]Measure=TimeTimeStamp=([mDate1:Timestamp] + 86400)Format=%dGroup=DateDynamicVariables=1[mDate3]Measure=TimeTimeStamp=([mDate2:Timestamp] + 86400)Format=%dGroup=DateDynamicVariables=1[mDate4]Measure=TimeTimeStamp=([mDate3:Timestamp] + 86400)Format=%dGroup=DateDynamicVariables=1[mDate5]Measure=TimeTimeStamp=([mDate4:Timestamp] + 86400)Format=%dGroup=DateDynamicVariables=1[mDate6]Measure=TimeTimeStamp=([mDate5:Timestamp] + 86400)Format=%dGroup=DateDynamicVariables=1[mDate7]Measure=TimeTimeStamp=([mDate6:Timestamp] + 86400)Format=%dGroup=DateDynamicVariables=1========================================; METERS========================================[Shape]Meter=ShapeShape=Rectangle 0,0, 20,#ShadeH# | Fill LinearGradient GradationPattern | StrokeWidth 0GradationPattern=270 | #Orange#,30 ; 0.0 | #Orange#,120 ; 0.48 | #Orange#,120 ; 5.0 | #Orange#,30 ; 1.0DynamicVariables=1[Date1]Meter=StringMeterStyle=sGlobalTextX=12Y=(#ShadeH#/2)[Date2]Meter=StringMeterStyle=sGlobalText[Date3]Meter=StringMeterStyle=sGlobalText[Date4]Meter=StringMeterStyle=sGlobalText[Date5]Meter=StringMeterStyle=sGlobalText[Date6]Meter=StringMeterStyle=sGlobalText[Date7]Meter=StringMeterStyle=sGlobalText
Thanks.
Statistics: Posted by sl23 — Yesterday, 10:33 am — Replies 21 — Views 335