Multiple TZ clocks#
In Kustom every layer can have a different location or timezone, changing this parameter affects all the items inside the layer. If you change the location both weather, location, air quality and time data will change, if you just change the timezone only the clock will be modified. You can change default locations in the app settings
Tutorial#
Steps#
First of all add a Widget (or a wallpaper or any other Kustom item)
Switch an image or layout if day or night (or by time)
Switch an image or layout if day or night (or by time)#
Showing an image based on a condition is pretty simple, to switch between one image and another based on day/night status you can do the following:
- Create an OverlapLayer that will contain both images
- Add an Image object to the layer just created and pick the night image
- Select the “Opacity” property and switch it to “formula” mode using the calculator icon
- Click it and enter following code
$if(ai(isday), 0, 100)$this will set opacity to 0 during the day and to 100 in the night - Add another Image object to the layer and pick the day image
- Switch Opacity to formula as above and enter
$if(ai(isday), 100, 0)$ - Done!
This approach can be used also with text (using the color property) or with entire layers using a formula in the “visibility” property of the layer tab and returning either ALWAYS or NEVER.