It is currently December 7th, 2019, 8:42 pm

Custom Display?

Help with creating, editing & fixing problems with skins
JerualemFriend
Posts: 2
Joined: August 7th, 2019, 12:26 pm

Custom Display?

JerualemFriend » August 7th, 2019, 12:28 pm

I'd love to set things up so that I have Current time(with seconds), Gregorian Date, Hebrew Date, and maybe even weather.

How is this accomplished please?

Or. To put it another way.

http://prntscr.com/opjmgz
I'd like to add Hebrew Calendar to Time Display, and lose the Welcome to rainmeter window.
User avatar
jsmorley
Developer
Posts: 19850
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Custom Display?

jsmorley » August 7th, 2019, 1:09 pm

Converting between Gregorian and Hebrew dates is not a trivial thing to do in code. I think the best thing is to use WebParser to go after one of the many online sites that can do this for you.

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[Variables]

[MeasureConvert]
Measure=WebParser
URL=https://www.hebcal.com/converter/
RegExp=(?siU)<meta name="description" content="Convert between Gregorian/civil and Hebrew/Jewish calendar dates.*= (.*)"
DynamicVariables=1

[MeasureHebrewDate]
Measure=WebParser
URL=[MeasureConvert]
StringIndex=1

[MeterHebrewDate]
Meter=String
MeasureName=MeasureHebrewDate
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1

1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19850
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Custom Display?

jsmorley » August 7th, 2019, 1:26 pm

So to kinda brute-force integrate this into illusto\Clock, allowing the website to detect the current date, you can edit the Clock.ini file and change it to:

Code: Select all

; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
; Contains basic information of the skin.
Name=Clock
Author=poiru
Information=Displays the current date and time.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205

; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------

[measureTime]
; This measure returns the time in a 24-hour format (i.e. HH:MM).
Measure=Time
Format=%H:%M
; For a 12-hour clock, change the Format option above to: %I:%M %p
; Refer to the Rainmeter manual for other format codes.

[measureDate]
; Returns the date as DD.MM.YYYY
Measure=Time
Format=%d.%m.%Y

[measureDay]
; Returns the current day
Measure=Time
Format=%A

; ----------------------------------
; New sections to convert date to Hebrew
; ----------------------------------

[MeasureConvert]
Measure=WebParser
URL=https://www.hebcal.com/converter/
RegExp=(?siU)<meta name="description" content="Convert between Gregorian/civil and Hebrew/Jewish calendar dates.*= (.*)"
DynamicVariables=1

[MeasureHebrewDate]
Measure=WebParser
URL=[MeasureConvert]
StringIndex=1

; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleSeperator]
SolidColor=255,255,255,15

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
MeasureName=measureTime
X=100
Y=12
W=190
H=18
Text=%1
; %1 stands for the value of MeasureName (measureTime in this case).

[meterDay]
Meter=String
MeterStyle=styleLeftText
MeasureName=measureDay
X=10
Y=40
W=190
H=14
Text=%1

[meterDate]
Meter=String
MeterStyle=styleRightText
MeasureName=measureDate
X=200
Y=0r
; r stands for relative. In this case, the Y postition of meterValueCPU is 0 pixels
; below the Y value of the previous meter (i.e it's the same as in meterLabelCPU).
W=190
H=14
Text=%1

[MeterHebrewDate]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureHebrewDate
X=200
Y=0R
; r stands for relative. In this case, the Y postition of meterValueCPU is 0 pixels
; below the Y value of the previous meter (i.e it's the same as in meterLabelCPU).
W=190
H=14
Text=%1

2.jpg


To get rid of the Welcome panel, just right click it and say "Unload skin".
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19850
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Custom Display?

jsmorley » August 7th, 2019, 1:38 pm

There is no Weather skin included with the default illustro.

I think to have what you want, and keep the look and feel of illustro, you might look at getting eclectic-tech's improved / expanded illustra suite from:

https://www.deviantart.com/eclectic-tech/art/Illustra-770620313

That has the weather, and maybe he would like to weigh in on how best visually to add the Hebrew date to his existing clock skin. Perhaps have it "toggle" between Gregorian and Hebrew date formats every 10 seconds or something.
JerualemFriend
Posts: 2
Joined: August 7th, 2019, 12:26 pm

Re: Custom Display?

JerualemFriend » August 7th, 2019, 2:30 pm

jsmorley wrote:
August 7th, 2019, 1:09 pm
There is no Weather skin included with the default illustro.

I think to have what you want, and keep the look and feel of illustro, you might look at getting eclectic-tech's improved / expanded illustra suite from:

https://www.deviantart.com/eclectic-tech/art/Illustra-770620313

That has the weather, and maybe he would like to weigh in on how best visually to add the Hebrew date to his existing clock skin. Perhaps have it "toggle" between Gregorian and Hebrew date formats every 10 seconds or something.
Rather like the sound of that 10 second toggle. Thank you very much!!!
User avatar
jsmorley
Developer
Posts: 19850
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Custom Display?

jsmorley » August 7th, 2019, 3:15 pm

I will leave it to eclectic-tech to work out how to best integrate it into his skin, but I might suggest the toggle might be something like this:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[Variables]
0=MeasureHebrewDate
1=MeasureGregorianDate

[MeasureToggle]
Measure=Calc
Formula=1-MeasureToggle
UpdateDivider=10

[MeasureGregorianDate]
Measure=Time
Format=%B %#d, %Y

[MeasureConvert]
Measure=WebParser
URL=https://www.hebcal.com/converter/
RegExp=(?siU)<meta name="description" content="Convert between Gregorian/civil and Hebrew/Jewish calendar dates.*= (.*)"
DynamicVariables=1

[MeasureHebrewDate]
Measure=WebParser
URL=[MeasureConvert]
StringIndex=1

[MeterToggledDate]
Meter=String
MeasureName=[#[&MeasureToggle]]
X=200
StringAlign=Right
FontSize=11
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3632
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Custom Display?

eclectic-tech » August 9th, 2019, 3:23 am

Here is code for a new "illustra/clock" variant that can optionally toggle Hebrew/Gregorian dates approximately every 10 seconds.
You can toggle the date change action from an option added to the Context menu. It is similar to the solution posted by JSMorley, but variables were changed and added to allow pausing the toggle measure.

I would recommend saving this with a new name in "Skins\illustra\Clock" folder. That way you still have the original if something goes awry :)

Code: Select all

; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
AccurateText=1
DynamicWindowSize=1
Group=#RootConfig#

SkinWidth=(198*#Scale#)
SkinHeight=((42*#Scale#)+(#ItemLines#*22)*#Scale#)

MiddleMouseUpAction=[!ToggleConfig "#RootConfig#\Options" "Options.ini"]
MouseScrollDownAction=[!ShowGroup "#RootConfig#"]
MouseScrollUpAction=[!HideGroup "#RootConfig#"][!Show "#CurrentConfig#"]

ContextTitle="12 Hour"
ContextAction=[!WriteKeyValue MeasureTime Format "%I:%M %p"][!Refresh]
ContextTitle2="24 Hour"
ContextAction2=[!WriteKeyValue MeasureTime Format "%H:%M"][!Refresh]
ContextTitle3="Toggle Hebrew Date (~10 Sec)"
ContextAction3=[!WriteKeyValue Variables Hebrew (1-#Hebrew#)][!Refresh]
; ----------------------------------

[Metadata]
; Contains basic information of the skin.
Author=Eclectic Tech Website: http://eclectic-tech.deviantart.com/
Name=Clock
Information=Displays the current date and time.
License=Creative Commons BY-NC-SA 4.0
Version=1.2019.03.23

; ----------------------------------

[Variables]
; Include allow the addition of an external file with code that can be used in multiple skins
@includeVariables=#@#Variables.inc

; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
; They will overwrite any identical variables from the @includeVariables file

; Sets the skin height based on the number of items 
ItemLines=1

Hebrew=0
1=MeasureHebrewDate
0=MeasureDate

; Include allow the addition of an external file with code that can be used in multiple skins
@includesystemColors=#@#includes\SysColors.inc

; ----------------------------------
; MEASURES return some kind of value

[MeasureToggle]
Measure=Calc
Formula=1-MeasureToggle
UpdateDivider=10
Paused=(1-#Hebrew#)
DynamicVariables=1

[measureTimeStamp]
Measure=Time

[measureTime]
; This measure returns the time in a 24-hour format (i.e. HH:MM).
Measure=Time
Format=%I:%M %p
; For a 12-hour clock, change the Format option above to: %I:%M %p
; Refer to the Rainmeter manual for other format codes.

[measureDate]
; Returns the date as DD.MM.YYYY
Measure=Time
Format=%d.%m.%Y
; Alternate date as MM.DD.YYYY
; Format=%m.%d.%Y

[measureDay]
; Returns the current day
Measure=Time
Format=%A

; ----------------------------------
; New sections to convert date to Hebrew
; ----------------------------------

[MeasureConvert]
Measure=WebParser
URL=https://www.hebcal.com/converter/
RegExp=(?siU)<meta name="description" content="Convert between Gregorian/civil and Hebrew/Jewish calendar dates.*= (.*)"
DynamicVariables=1

[MeasureHebrewDate]
Measure=WebParser
URL=[MeasureConvert]
StringIndex=1

; ----------------------------------
; STYLES are used to "centralize" options

[styleTitle]
StringAlign=CENTER
InlineSetting=Face | #fontName#
InlineSetting2=Size | 10
InlineSetting3=Weight | 900
InlineSetting4=Color | #textColor#
InlineSetting5=Case | UPPER
StringEffect=SHADOW
FontEffectColor=#AccentColor#,50
AntiAlias=1
ClipString=2
ClipStringW=180
DynamicVariables=1
; Scale Center 
TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]/2));((1-#Scale#)*([#CURRENTSECTION#:Y]))
ToolTipWidth=(150*#Scale#)

[styleLeftText]
StringAlign=LEFT
; Meters using styleLeftText will be left-aligned.
InlineSetting=Face | #fontName#
InlineSetting2=Size | #textSize#
InlineSetting3=Weight | 900
InlineSetting4=Color | #textColor#
StringEffect=SHADOW
FontEffectColor=#AccentColor#,20
AntiAlias=1
ClipString=1
DynamicVariables=1
; Scale Left 
TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*([#CURRENTSECTION#:X]));((1-#Scale#)*([#CURRENTSECTION#:Y]))
ToolTipWidth=(150*#Scale#)

[styleRightText]
StringAlign=Right
; Meters using styleRightText will be right-aligned.
InlineSetting=Face | #fontName#
InlineSetting2=Size | #textSize#
InlineSetting3=Weight | 900
InlineSetting4=Color | #textColor#
StringEffect=SHADOW
FontEffectColor=#AccentColor#,20
AntiAlias=1
ClipString=1
DynamicVariables=1
; Scale Right
TransformationMatrix=#Scale#;0;0;#Scale#;((1-#Scale#)*([#CURRENTSECTION#:X]+[#CURRENTSECTION#:W]));((1-#Scale#)*([#CURRENTSECTION#:Y]-[#CURRENTSECTION#:H]/32))
ToolTipWidth=(150*#Scale#)

[styleSeperator]
SolidColor=#colorBar#
DynamicVariables=1
X=(9*#Scale#)
Y=-1R
W=(181*#Scale#)
H=(1*#Scale#)

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=#MenuTextColor#
DynamicVariables=1
X=(9*#Scale#)
Y=-1R
W=(181*#Scale#)
H=(1*#Scale#)

; ----------------------------------
; METERS display images, text, bars, etc.

[MeterBackground]
Meter=Shape
DynamicVariables=1
X=5
Y=5
Shape=Rectangle 0,0,190,(36+(#ItemLines#*22)),2 | Fill Color #fillColor# | StrokeWidth (1*#Scale#) | Stroke Color [#darkColor] | Scale #Scale#,#Scale#,0,0

[MeterBackgroundTop]
Meter=Shape
DynamicVariables=1
X=(5*#Scale#)
Y=(5*#Scale#)
Shape=Rectangle 3,3,184,25,2 | Fill Color #headerColor# | StrokeWidth 0 | Stroke Color [#darkColor] | Scale #Scale#,#Scale#,0,0

[meterTitle]
Meter=STRING
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
MeasureName=measureTime
X=((198*#Scale#)/2)
Y=(12*#Scale#)
W=(190*#Scale#)
H=(18*#Scale#)
Text=%1
; %1 stands for the value of MeasureName (measureTime in this case).
; Opens Win10 calendar
SolidColor=0,0,0,1
LeftMouseUpAction=[shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.calendar]
TooltipText="Left-click to open Win10 Calendar#CRLF#Scroll Up to Show illustra Skins#CRLF#Scroll Down to Hide illustra Skins"

[meterDay]
Meter=String
MeterStyle=styleLeftText
MeasureName=measureDay
X=(9*#Scale#)
Y=(38*#Scale#)
W=100
H=14
Text=%1

[meterDate]
Meter=String
MeterStyle=styleRightText
MeasureName=[#[&MeasureToggle]]
;measureDate
X=(189*#Scale#)
Y=([MeterDay:Y])
W=100
H=14
Text=%1

[meterTimeBarBack]
Meter=IMAGE
MeterStyle=styleSeperator
SolidColor=#MenuTextColor#
Y=([MeterDate:Y]+[MeterDate:H]*#Scale#-1)

[meterTimeBar]
Meter=IMAGE
MeterStyle=styleSeperator
Y=r
W=(181*(([MeasureTimeStamp:]%86400)/86400)*#Scale#)
Copy all of this code and paste it into a new file in your teext editor. Save it as "Skins\illustra\Clock\clockhebrew.ini". Refresh Rainmeter and then load this variant.