It is currently April 27th, 2024, 7:50 am

adapt my conky on rainmeter

Get help with creating, editing & fixing problems with skins
User avatar
SkaalZealot
Posts: 2
Joined: January 22nd, 2024, 11:42 am

adapt my conky on rainmeter

Post by SkaalZealot »

hello, I would like to adapt my conky on rainmeter

https://www.pling.com/p/2119346/

but I can't find how to add date+1 -1 etc...

on conky you can do it like this

Code: Select all

${execi 1200 date -d -2day +%d}
do we have the equivalent on rainmeter ?
User avatar
SilverAzide
Rainmeter Sage
Posts: 2611
Joined: March 23rd, 2015, 5:26 pm

Re: adapt my conky on rainmeter

Post by SilverAzide »

SkaalZealot wrote: January 22nd, 2024, 11:49 am hello, I would like to adapt my conky on rainmeter

https://www.pling.com/p/2119346/

but I can't find how to add date+1 -1 etc...

on conky you can do it like this

Code: Select all

${execi 1200 date -d -2day +%d}
do we have the equivalent on rainmeter ?
In Rainmeter, dates are just Windows timestamps (number of seconds since...). So you can do math with the number to add/subtract seconds from the timestamp; e.g., add a day to the value by adding "... + (60 * 60 * 24)". See the docs on the Time measure for more info about turning timestamps into formatted text and vice versa.
Gadgets Wiki GitHub More Gadgets...
User avatar
SkaalZealot
Posts: 2
Joined: January 22nd, 2024, 11:42 am

Re: adapt my conky on rainmeter

Post by SkaalZealot »

(Translated from French)

Hello, Thank you for the answer

It's all about knowing what to look for in the docs, which don't have any concrete examples

I am here in my creation but I don't understand why it makes me 12A°c

Image
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: adapt my conky on rainmeter

Post by eclectic-tech »

This may be caused by the way your file is encoded. All Rainmeter skins should be encoded as UTF-16 LIttle Endian.
https://docs.rainmeter.net/tips/unicode-in-rainmeter/

The encoding you want in different text editors:
Unicode (Windows Notepad.exe)
UCS-2 LE BOM (Notepad++)
UTF-16 LE (Sublime Text)
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: adapt my conky on rainmeter

Post by Yincognito »

SkaalZealot wrote: January 23rd, 2024, 8:09 pmIt's all about knowing what to look for in the docs, which don't have any concrete examples
They do have examples at the bottom of these pages, but basic ones, suited for the beginner level. The rest is about using the possibilities offered by the different options in those measures / meters / etc. to do more than just displaying the time today, and that is the user's job (who can ask for help on that at any time, if encountering difficulties that are not covered by the manual at all). But you're right, it's about what to look for, just like when searching for something on Google.

Here's an example based on SilverAzide's advice (added using a variable and scrolling to change the "then" time as a bonus):

Code: Select all

[Variables]
DayOffset=2

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
BackgroundMode=2
SolidColor=47,47,47,255

---Measures---

[Now]
Measure=Time
Format=%a, %d %b %Y, %H:%M:%S

[Then]
Measure=Time
Timestamp=([Now:Timestamp]+60*60*24*#DayOffset#)
Format=%a, %d %b %Y, %H:%M:%S
DynamicVariables=1

---Meters---

[Result]
Meter=String
FontColor=255,255,255,255
FontFace=Consolas
FontSize=16
Padding=5,5,5,5
AntiAlias=1
MeasureName=Now
MeasureName2=Then
Text=The Time Now : %1#CRLF#The Time Then: %2
MouseScrollUpAction=[!SetVariable DayOffset (#DayOffset#+1)][!UpdateMeasure *][!UpdateMeter *][!Redraw]
MouseScrollDownAction=[!SetVariable DayOffset (#DayOffset#-1)][!UpdateMeasure *][!UpdateMeter *][!Redraw]
DynamicVariables=1
I used * meaning "all of the same kind" when updating measures and meters for simplicity - normally you'd update only the relevant sections (measures or meters).

See also using :Timestamp as a parameter for a measure reference (aka "section variable").
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth