Simple Clock Widget
Last updated
Last updated
Select the menuitem "Create Widget..." from RainWidget's tray menu, it will auto create a new blank widget from template and open the widget's folder ,then you can see all the files of the new widget is "index.html" , "widget.json", we can modify them to build our own widgets.
You can modify the widget folder name "NewWidget" to any other you want,for excample "MyClock".
Open the widget file "widget.json" with Notepad or Notepad++ , then you can see all the widget information and you can modify the name,author,widget size width/height to any other you want.
Found the "measures" json node in file "widget.json"
Add a node code with this code and save and close this file:
Open the widget file "index.html" with Notepad or Notepad++
save and close this file
Add this widget to your desktop or reload it (Select menuitem "reload" from RainWidget's tray menu), then you can see the widget display current time on your desktop.
Add this widget to your desktop
right click the widget and select menuitem "Settings" to open the widget setting window
Switch to the "DateTime" tab page of setting window, config the datetime with 12-Hour-Clock , Zero-Prefix,TimeZone etc...
Click "Apply" or "OK" button to save settings, the widget will auto update.
Modify the text between <div id="widget"> and </div> to " {{ datetime1.timeSec }} " ,the "timeSec" is one of the datetime measure data tags, you can find all the data tag of datetime from