Recently I started to use rainmeter again to spice up my desktop.
I missed a minimal weather widget and everything I found did not work or was not a visual style I particularly liked. So naturally I decided to write my own:
;Elegance
;Clean Weather Skin
;Created by kopis.de
[Rainmeter]
Update=900
DynamicWindowSize=1
AccurateText=1
;BackgroundMode=2
;SolidColor=255,0,0,255
[Metadata]
; Contains basic information of the skin.
Name=CleanWeather
Author=kopis.de
Information=Displays the current weather
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0
[Variables]
api_key=YOUR_API_KEY_GOES_HERE
city=YOUR_CITY_GOES_HERE
;-----------MEASURES------------
[MeasureWeather]
Measure=WebParser
URL=https://api.openweathermap.org/data/2.5/weather?q=#city#&appid=#api_key#
RegExp=(?siU)"description":"(.+)","icon":"(.+)"
FinishAction=[!SetOption MeasureImage URL "https://openweathermap.org/img/wn/[MeasureIcon].png"][!EnableMeasure MeasureImage]
[MeasureDescription]
Measure=WebParser
URL=[MeasureWeather]
StringIndex=1
[MeasureIcon]
Measure=WebParser
URL=[MeasureWeather]
StringIndex=2
[MeasureImage]
Measure=WebParser
URL=
Download=1
Disabled=1
;-----------METERS------------
[MeterImage]
Meter=Image
MeasureName=MeasureImage
W=40
H=40
X=0
[MeterWeather]
Meter=String
MeasureName=MeasureDescription
X=42
StringStyle=Normal
FontFace=Calibri
FontSize=24
FontColor=255,255,255,255
;FontWeight=Light
AntiAlias=1
It took me a while to get the weather icon to display, which has to do with the child WebParser measures not firing a FinishAction but I finally managed to work around that. The update of the icon still is a bit delayed, which I might fix later by providing a dummy icon when nothing was downloaded previously.
But for the moment it is useable, it matches the visual style I’m going for and it works good enough for me to use it. Feel free to copy the code, get your own API key for openweathermap.org and try it out yourself.