Invisible Widget Generator

Hi folks, I wrote a script that generates “invisible” widgets – aka, widgets that blend in with your iOS home screen background. Before you start, enter wiggle mode on your home screen and scroll to the empty page on the right, then take a screenshot. That’s the input for the script. (Edit: Note that if you have Perspective Zoom on, where your background moves slightly as you move your phone, the effect won’t work as well.)

When you run the script from the Scriptable app, it leads you through the steps to create the widget background. You can then add any existing widget code to the the script to display things on top of your background!

You can use this to make “floating” widget content, or even use it as part of a themed home screen — you can see two examples in my screenshot. (Note: I’ve only tested this on two different iPhones, so please let me know if there are pixel errors on your device.)

17 Likes

This is art! Gonna try this approach for my new widgets, thanks for sharing!

1 Like

That is extremely cool! I just made my first invisible widget using this :smiley:

I tweaked the script a bit to make it export either to the Files app or Photos. I shared the updated script in a comment to your Gist.

4 Likes

@simonbs Would it be possible to add copySmall(), copyMedium() , and copyLarge() functions to widgets?

(If those would copy the widget as an image to the pasteboard, instead of presenting it on screen, that would make sharing a preview of a widget -in this thread?- easier)

1 Like

Ahh yay I’m glad you like it! And yeah, the hard coded path is just a trick to allow the script to be used as a widget itself – but I also like the addition of the document picker which I didn’t know about either!

This is awesome, thank you! What code did you add for the first screenshot to show your calendar?

1 Like

There’s been a fun thread on Reddit where I’ve worked a bit more on this script. This new version allows you to change all kinds of settings at the top of the script. (It’s been so inspiring and fun to see how many different directions people have gone with the calendar code!)

2 Likes

I’m having issues with the Calendar access. When I run with Test Mode set to tru it works fine. When I do it with Test Mode set to false it just opens the calendar app. I have checked my Privacy=>Calendar=>Scriptable settings and permission is granted. Am I doing something wrong?

The reason it opens the calendar app is so if you choose “Run Script” from the widget settings menu, it will go directly to the calendar.