r/iOSsetups • u/mzeryck • Sep 29 '20
Automatically create "transparent" widgets with Scriptable (details in comments)
19
u/LawVol92 Sep 29 '20
Where exactly would I insert other code to be like your calendar script?
16
u/mzeryck Sep 29 '20 edited Sep 30 '20
There's a comment near the top of the script that says "You can your own code here" - you can add any Scriptable widget code there, and it should work.
...but I also made a customizable calendar version of this widget. The settings are all at the very top of the widget code for alignment, text color, what events to show, etc: https://github.com/mzeryck/Transparent-Scriptable-Widget/blob/master/mz_transparent_widget.js (edited with the new link with more options!)
1
u/abhaysawhney Sep 29 '20 edited Sep 29 '20
Hi u/mzeryck,
This is my current formatcurrent format, can you help put it in the below format.
Date (29) Month (SEP) Day (eg: TUE) TIME hh:mm a (09:25 PM/AM)
I’m sorry but I’m not equipped with coding skills.
3
u/mzeryck Sep 29 '20
If you're trying to get rid of that second 29 underneath the date format, you can delete or comment out* these lines of code:
let dateNumber = widget.addText(date.getDate().toString())
dateNumber.font = provideFont(fontName,dateNumberSize)
widgetText.push(dateNumber)* Just put two slashes in front like this: //
2
u/abhaysawhney Sep 29 '20
Thanks, you’re awesome!! 😊
Any way to add line breaks between day and date and time??
2
u/mzeryck Sep 29 '20
Thank you! And yes - anytime you see a line of code with "widget.addText" in it, that's where the text is actually being displayed onto the widget. So, you can add a line of code right after it to add a spacer, like so:
widget.addSpacer(12)
You can play around with the number in the parentheses to see what spacing you like. If you remove the number altogether, it becomes a flexible space that expands to fill the space.
7
u/Alexread94 Sep 29 '20
great work! is it possible to make a “transparent” weather widget?
5
u/mzeryck Sep 29 '20
Thank you! It is possible, although it would be a bit more complex. Maybe I'll look at it after work today.
4
u/siriusdad Sep 29 '20
This is great! Sorry for a beginner question, but how would I get the widget from Scriptable to Wodgetsmith?
3
u/mzeryck Sep 29 '20
If you use the original version of the script (or this iOS shortcut) in the last popup, tap "Export to Photos". It will save the image to your camera roll, so you can use it in Widgetsmith! There is a minor bug in Widgetsmith right now for some widget sizes though, you might see a small white line on the right of the widget.
→ More replies (3)2
u/graphic_blandishment Sep 29 '20
You’d add one of Scriptable’s own widgets and set it to display this script; Widgetsmith’s not involved at all.
2
1
2
u/Rangbang Sep 29 '20
How do I change what calendar it pulls from? It works when I add stuff to the icloud calendar, but not events in my google calendar.
3
u/mzeryck Sep 29 '20
Scriptable can only directly access calendars that have been added to the built-in Calendar app. If you add your Google calendar in Settings > Calendar > Accounts, it should work.
1
u/Rangbang Sep 29 '20
Yeah thats what I assumed, but its not, no idea why because I have the Google account linked
1
u/mzeryck Sep 29 '20
Huh, that's weird. Are your Google events all-day events maybe? I chose not to display all-day events, so they wouldn't show up without a small modification.
1
u/Rangbang Sep 29 '20
That was it I think, working now. Thanks buddy!
Any way to make It say the next event if there are none today?
2
1
u/mzeryck Sep 29 '20
No problem! And yep, that's something I want to add, but I did come up with a quick hack for it in another comment somewhere: https://www.reddit.com/r/iOSsetups/comments/j1o6v4/automatically_create_transparent_widgets_with/g735m41/?utm_source=reddit&utm_medium=web2x&context=3
2
2
u/----NSA---- Sep 29 '20
I've been looking everywhere for something like this. Thank you so much man!
2
2
u/topphopplopp Sep 29 '20
Fuckin amazing! But - How do I add the month full name after date number?
2
u/mzeryck Sep 29 '20
I was thinking of adding that to the settings later today. There isn't an easy way to copy in some code like I've done in some other comments, unfortunately.
1
1
u/Jealous-Procedure Sep 29 '20
Is there anyway you can make a quick video on how to edit the dates and time as well as calander updates, I can't seem to modify the script to make it work
2
u/mzeryck Sep 30 '20
I took a clip of me editing some of the settings. Note that I had testMode = true, which is how I got the little widget preview to show up: https://imgur.com/a/bvSriPc
2
u/jezza21 Sep 30 '20
This just keeps getting better and better! Another suggestion that might be useful, have an option to have the date appear on the left, and the events on the right. Would look great especially for the medium style widget, as well as allow you to show more events!
1
u/mzeryck Sep 30 '20
In the current version of Scriptable, it's not possible to position elements side-by-side - but it's being worked on in the TestFlight beta! Riverwolf in the Scriptable forum created a nice calendar widget with some more complex formatting.
1
2
u/caspload Oct 01 '20
Love this, using a slightly modified version of your script. Thanks you much!
Would it be possible to add the ordinal ending for the date (1st, 2nd, 3rd) and so on?
2
u/mzeryck Oct 01 '20
Yes, it would. Scriptable currently doesn't expose this functionality in the iOS API, but it's fairly easy in Javascript. You would need to add a function to the bottom of the file (I like this answer from nick on Stack Overflow). Then, you would add
+ getDaySuffix (date.getDate())to the end of your string.So for example if you're using
"EEEE, MMMM d"as your date format, you could find the line of codelet dateText = widget.addText(df.string(date))and change it tolet dateText = widget.addText(df.string(date) + getDaySuffix(date.getDate()))1
u/caspload Oct 01 '20
I've given it a go and can't work it out as I'm using a different date format. I'm using
"EEEE, d MMMM"so when I add the rest you've suggested it shows 'Octoberst'. I understand why it's doing that, but unsure how to fix itI've added the section from Stack overflow to the very bottom on the scriptable file and that works correctly. Where do I add the other bit to get the suffix to show correctly?
2
u/mzeryck Oct 01 '20
Ah, got it! Basically, you'll just need to make 2 formatted date strings and join them together. So something like this:
df.dateFormat = "EEEE, d"let dateLeft = df.string(date)df.dateFormat = "MMMM"let dateRight = df.string(date)let dateString = dateLeft + getDaySuffix(date.getDate()) + " " + dateRightlet dateText = widget.addText(dateString)1
u/DanMumford Oct 05 '20
Hey, I'm trying to get the ordinal after the date as well, in the same format (Monday 5th October)
I added the extra script above but it doesn't change anything, it's still showing as the standard format? (also, is it possible to have 'of' between the date and the month?) Thanks!
1
u/mzeryck Oct 06 '20
You would need to copy the code above and completely replace this part of the script:
df.dateFormat = dateDisplaylet dateText = widget.addText(df.string(date))formatText(dateText, dateSize)Adding 'of' is easy - just change "MMMM" to "of MMMM"
→ More replies (1)
2
2
u/Thenerdyminded Oct 24 '20
Now that the iPhone 12 is out, do you know why it would say the screen shot is not taken from an iPhone? I assume it has something to do with other the image size or zoom.
3
u/mzeryck Oct 24 '20
It's because I didn't get an iPhone 12, so I didn't have a way to measure the screenshots. Luckily, someone helped me out - the newest version of the code now supports it!
2
2
8
1
Sep 29 '20
I use an iPhone 8 Plus but when I try to upload a screenshot of my last page, I get a notification that the screenshot I uploaded was not from an iPhone or that my iPhone is not supported. Any help please?
1
u/mzeryck Sep 29 '20
The Plus was the hardest device for me to deal with - if you (or anyone reading this) is willing to help troubleshoot, please message me!
1
1
u/elevengreenfishes Sep 29 '20
I absolutely need these wallpapers.
3
u/mzeryck Sep 29 '20
The image on the left is this Unsplash photo by David Billings. The image on the right is an edited version of this painting by John Paul Brammer.
1
u/jezza21 Sep 29 '20
This is great, thanks mate! Is there any way to display a message if there are no events for the day?
3
u/mzeryck Sep 29 '20 edited Sep 30 '20
I just updated the code to include that feature! (edited with new link)
2
1
Sep 29 '20
Now if we could just get rid of app labels...
3
u/mzeryck Sep 29 '20
I know right. There is an app being tested that does that, but I kinda doubt Apple will approve it (who knows though!)
2
u/phoenix_73 Sep 29 '20
I'm using Clear Spaces right now, so liking that it removes the Widget Name. I'd like to do this where possible.
I'm liking the scriptable that you put together too, though I've enough of calendar type widgets for now. My problem is I can't decide where to place them. So much of what people have done on here looks great, just want the balance between a clean, useful yet looking much like a stock type of interface.
I think if I can use your script to put some text together then snapshot the screen, I could then use the background position with the text from scriptable in a static image placed where I'd like it on the screen to form part of the background, that would be good. I'd use Clear Spaces to drop the name from the widget, unless you can think of a better way of doing this?
1
u/mzeryck Sep 29 '20
If I'm following you, I think I get it - basically, make an invisible widget in Scriptable. Then, screenshot it, and use the new screenshot as an input for the script again? I tried, and it works. I'm not using Clear Spaces, but I did go Scriptable > Widgetsmith to get this result: https://imgur.com/a/SHtv28f
→ More replies (1)1
u/pielad Oct 02 '20
Is there anyway to use this to hide ‘Scriptable’ from widgets like your calendar one.
Great job btw!
2
1
Sep 29 '20
Can this only be done with a jailbroke phone?
1
u/mzeryck Sep 29 '20
This is all done on stock iOS 14! The Scriptable app is available in the App Store.
1
u/raffbamm Sep 29 '20
Is there any way it can show my tomorrow’s event on the calendar?
3
u/mzeryck Sep 29 '20
If you find the comment "// Format the text for each event." you can paste this code right above it:
const tomorrowEvents = await CalendarEvent.tomorrow([])for (const event of tomorrowEvents) {if (shownEvents.length == numberOfEvents) { break }if (event.startDate.getTime() > date.getTime() && !event.isAllDay && !event.title.startsWith("Canceled:")) { shownEvents.push(event) }}The only thing is that they'll just show up in the list, it won't say "Tomorrow" like the built-in iOS widget. (Maybe another addition I can make later.)
2
1
1
u/okayeahsurething Sep 29 '20
Is there a way to get the widget to display text based on the time of day? Like Good morning, good afternoon, good evening?
2
u/mzeryck Sep 29 '20
There is, and I was thinking of adding it to the customizable widget later. If you're a bit more comfortable editing code, this post outlines how to do it.
2
u/okayeahsurething Sep 29 '20
I know nothing about code. Your code with the calendar is only thing I’ve been able to use successfully.
1
u/mzeryck Sep 30 '20
I'm glad you've enjoyed using it! Also wanted to let you know that I added this feature.
→ More replies (1)
1
u/stahl80 Sep 29 '20
I get an error that it doesn’t have access to the calendar and I should enable it in the system settings but the app doesn’t show up there (under calender in integrity)
1
u/mzeryck Sep 29 '20
Oh weird. The first time it runs, it's supposed to ask for calendar access. You could try creating a new script and just adding this code:
await CalendarEvent.today([])When you run it, iOS should ask for calendar permission. If that works, the whole Scriptable app should then have access.
1
u/stahl80 Sep 29 '20
And it did when I ran the script in the app :). Just me being stupid :). Thanks!
1
u/epcotlegacy Sep 30 '20
This exactly what I was looking for. You’re godly. Thank you. Is there a way to make it launch calendar when tap on the widget?
1
u/mzeryck Sep 30 '20
Haha thanks! Yes, just change it so testMode = false, and then in the widget settings (tap and hold on the widget) change it to "Run Script": https://imgur.com/a/XZtsFgU
1
u/bassembrace Sep 30 '20
Can’t get it to work on an iPhone XR, it says screenshot is not from an iPhone or iPhone not supported.
2
u/mzeryck Sep 30 '20
Dang, that's weird. If you want, message me with the screenshot you're using and I'd be happy to try and troubleshoot.
1
u/bassembrace Oct 01 '20
It was because of the display zoom that I turned on in settings! I turned it off and it worked :) any chance to have it also work with display zoom on?
1
u/mzeryck Oct 01 '20
Oh fascinating! I had forgotten that the XR's display zoom works differently than all other iPhones. If you're willing to take a screenshot that looks like this (basically, small widgets in a diagonal pattern) with your screen in display zoom, I can measure the pixel values and fix it.
1
u/bassembrace Oct 02 '20
Hey, will that work?
2
u/mzeryck Oct 02 '20
That is perfect, thank you! I just updated both versions of the code - let me know if that works now!
→ More replies (1)1
1
u/w0j3 Oct 01 '20
This is great! Is there anyway to code in weather?
4
u/mzeryck Oct 01 '20
Stay tuned... 👀 https://imgur.com/a/xVmNLCA
1
u/w0j3 Oct 01 '20
Wow! That looks really good...I need to learn JS. Currently in school for Java and c++. How easy would it be to integrate the current weather in a small format here?:https://i.imgur.com/YOajqCM.jpg
1
u/mzeryck Oct 02 '20
Javascript is such a fun language to learn, compared to Java and C++! I recommend it. As for adding the weather there, it will be possible once the current beta of Scriptable is released (it adds support for side-by-side positioning).
→ More replies (1)1
u/w0j3 Oct 04 '20
I was able to get the current beta of scriptable. If you would mind sharing your weather script, I would be greatly appreciative. But if not, no worries. Have a great day 👍
1
u/mzeryck Oct 06 '20
I will probably post it here with some directions soon, but if you want the sneak preview here ya go. (There might be some bugs still.)
→ More replies (3)
1
u/surracha1 Oct 04 '20 edited Oct 06 '20
Wondering if there is a way to add a weather icon to this script as well? Like a temp and weather condition symbol (like on Apple Watch?) I’ve tinkered with adding other scripts to this one buts it’s not working for me! This and an option to have holiday greetings would make it literally perfect!!
2
u/mzeryck Oct 06 '20
I'll probably do a larger post with this code, and I'm not 100% certain it works perfectly, but here you go if you want to try it out early.
1
u/Haiwann Oct 04 '20
Awesome work!
And shout out to OP, for taking the time to reply to everyone here
3
1
u/zhimabao Oct 05 '20
Super aesthetic and easy to use! Thank you so much for taking the time to do this and share it.
I just have one question, how should I edit the code such that the day and date is like the one in your screenshot (line break and caps)?
1
u/mzeryck Oct 06 '20
You're very welcome! To get that effect, change this line of code to match:
const dateDisplay = "iOS"
1
u/aiham-2004 Oct 08 '20
Is it available for ipad
1
u/mzeryck Oct 09 '20
Unfortunately, transparent widgets don't really work due to the current limitations of iPad widgets.
1
u/Peterpit37 Oct 11 '20
Is there a way to create this same thing with the today list of reminders instead of calendar events?
1
u/mzeryck Nov 07 '20
I know you asked this almost a month ago, but in case you're still interested (and since folks are still occasionally commenting here) I wanted to let you know that I've *finally* added reminders to the widget code!
→ More replies (1)
1
u/pghcyclist15131 Oct 12 '20
I have never written code and am very inept at this. It is my understanding dung you can just copy the code and paste it in scriptable. Do I copy and paste everything from your link into scriptable. Thanks for helping a newbie
1
u/mzeryck Oct 12 '20
Yep, exactly! You can grab the code directly from here if it's easier. And then in Scriptable, make a new script and paste it in.
1
u/pghcyclist15131 Oct 12 '20
How do I change up what calendar is attached. When I copied it and pasted and open it just showed holidays
1
1
u/Stickx87 Oct 21 '20
Hey there, i really like your widget! I would love to know what font you used for the right side of the screenshot you posted.
-I cant seem to find how i use a capital on the days in text (friday > Friday). -is there a way to have timestamps on the events ? Like how the left screenshot has?
Thank you for your time
2
u/mzeryck Oct 22 '20
I believe I used "BodoniSvtyTwoOSITCTT-Bold" for the "Friday", and "BodoniSvtyTwoOSITCTT-Book" for the date.
I'd recommend checking out my newer script, which lets you customize a whole lot more (including adding timestamps and end time or duration).
If you do, you can get the all-caps date... scroll alllll the way to line 664, and change it to:
let dateOne = provideText(df.string(currentDate).toUpperCase(), dateOneStack, textFormat.largeDate1)1
u/Stickx87 Oct 22 '20 edited Oct 22 '20
Thank you, this is perfect! How do i keep updated of you have new stuff? Im not very smart with these type of things haha
Edit: how do i activate the greeting? I cant seem to activate it. Also, id like to change the font of the day, but i can only find the smaller text fonts
1
u/mzeryck Oct 22 '20
The easiest way to stay updated is to bookmark the GitHub project, or create a GitHub account and star it.
For the greeting, have you added
greeting,(with the comma) to the layout area?Depending on which date style is displaying, you'll either want to adjust smallDate, largeDate1, or largeDate2 in the textFormat section.
→ More replies (1)
1
u/lucas_ff12 Oct 22 '20
You mentioned at the beginning of the post, that it is possible to export the widget to other apps like Widget Smith. How is it done?
2
u/mzeryck Oct 22 '20
Use this version of the script, and when you get to the end of the options, tap "Export to Photos". Then, you can use that exported photo as a Widgetsmith background!
1
1
Oct 26 '20
This might be dumb, I’ve copied everything to Scriptable and created what I want, how do I get it to actually run on my phone?
2
u/mzeryck Oct 28 '20
If you like how the widget preview looks in Scriptable, then you'd just need to add a Scriptable widget to your home screen (enter jiggle mode, press the + plus sign, and search for Scriptable). Once you add the widget you can select the script to use within that widget!
1
1
Oct 27 '20
Hello! I was just wondering how to add the calendar widget code to the script you already have?
I have 0 knowledge of using code and scripts, but I as really fascinated by this. I hope you can help me.
Thank you so much!
1
1
u/aBluRayCopyof300 Oct 28 '20
Is there a way to change the photo once added because it’s not giving me the option
1
u/mzeryck Oct 28 '20
Near the top of the script, change "const forceImageUpdate = true" and run the script. It'll prompt you for a new photo!
1
u/Peterpit37 Nov 06 '20
Do you know if it would be possible to store two images and have it swap between light/dark mode? Asking to hopefully use this in conjunction with apples new 14.2 wallpapers.
2
u/mzeryck Nov 07 '20
Sadly, Scriptable widgets can't detect if dark mode is on or off. But, I am planning to implement this feature this weekend by allowing a schedule (specific times or sunrise/sunset) to match the system setting.
1
u/Peterpit37 Nov 17 '20
Did you ever get around to doing this? Currently I have two widgets and I just scroll between them when dark/light is activated... so not a huge deal but it’d be awesome if you made it happen!
1
u/mzeryck Nov 19 '20
Lol, I shouldn't commit to specific time periods... but yes, I do still want to do this! It's a lot more daunting than it might seem which is why I haven't gotten to it yet.
→ More replies (1)
1
u/mattiiia Nov 06 '20
How can I make the widget small or medium?
1
u/mzeryck Nov 07 '20
The script will work in any size of widget. To change the size of the in-app preview, you can change
const widgetPreviewnear the top of the script. You'll likely need to add or remove elements from the LAYOUT section though.→ More replies (1)
1
u/Charlyne_chan Nov 11 '20
It doesn’t work for me it says « Error on line 1: SyntaxError: Unexpected keyword 'else' »
1
u/mzeryck Nov 12 '20
I'm wondering if maybe there's something missing from the code? If you give some more info or a screenshot I'd be happy to help.
→ More replies (1)1
1
u/mzeryck Nov 12 '20
If you're using this script, please make sure you copied the entire thing. That error may happen if you only copied the code starting on line 26.
1
u/shadows-in-darkness Nov 27 '20
The code doesn’t work for me it just says “error” everytime
Please help
1
1
Dec 01 '20
Hey, I’m completely new to Scriptable but managed to get this far.
As you can see the alignment with my wallpaper is slightly off. How could I rectify this? Help would be greatly appreciated.
1
u/mzeryck Dec 01 '20
Hmm, which kind of iPhone do you have? And, which version of the transparent background script are you using? :)
1
Dec 01 '20
Hi OP, thanks for getting back to me. I have the iPhone 11 Pro and I think this was the version I used!
1
u/mzeryck Dec 01 '20
No problem! That version is out of date - please try using this one instead. (It also lets you do translucent blur backgrounds too, which is fun.) Let me know if that works better!
→ More replies (1)1
Dec 01 '20
Okay, so tried using this version and uploaded my wiggle screenshot when prompted but can’t seem to get any further. Also, when I select the script to be displayed in the Scriptable widget I’m getting “Alerts are not supported in a widget” in red. Any ideas OP?
1
u/mzeryck Dec 01 '20
That script just generates the background images, you'd then need to use it as the background for another widget like Weather Cal. What happens when you select your screenshot?
→ More replies (2)
1
u/mcnahum Sep 24 '22
I still use the original script (and love it..) Any hope to have it updated to support iPhone 14?
1
u/mzeryck Sep 28 '22
Working on it! Hoping to have an update soon when I can get my hands on a 14 Pro Max screenshot.
2
u/JerichoRamirez Sep 29 '20
well done. How can I reset the script once I set a wallpaper?
3
u/JerichoRamirez Sep 29 '20
if you are too lazy to check the script as I was:
// Change to true to reset the widget background.
const resetWidget = false
1
2
u/LordFoulmouth Sep 29 '20
This is wonderful. Especially for noobs like me. Thank you!
1
u/LordFoulmouth Sep 30 '20
Possible to add time in the widget as well ? I tried to change the script but keeps throwing an error
2
1
1
1
1
1
1
1
1
1
u/Cstonks Jan 14 '21
I figured it out I used this script, it adds the date and time automatically.
https://github.com/mzeryck/Transparent-Scriptable-Widget/blob/master/mz_transparent_widget.js
1
1
u/Both_Willingness_619 Feb 25 '21
Hey I don’t really understand what code to enter where exactly to make your own script ‘‘invisible‘‘
1
1
u/doggylover5667 Jul 24 '23
Hey! Just wondering whether you have the script for the widget on the left?
0
0
Sep 29 '20
[deleted]
4
u/mzeryck Sep 29 '20
The current beta of Scriptable does support more layouts and tappable areas, so it will definitely be possible and easier in the future.
2
u/myrealnameisbagels Sep 29 '20
You might be able to with this app! https://apps.apple.com/us/app/transparent-app-icons/id1533210346 check out thread for how to https://twitter.com/noahsark769/status/1310059780875022337?s=21
0
Oct 01 '20
[deleted]
1
u/mzeryck Oct 01 '20
Yes! Just use the original version of this script. When you get to the end, it'll ask if you want to use in Scriptable or export to Photos. If you export to Photos, you can run the script over and over again as many times as you need. The exported images can be used in any other widget app.
1
0
Oct 07 '20
[deleted]
1
u/mzeryck Oct 07 '20
If you change
const testMode = trueand then run it, you should see a preview of the widget!0
Oct 07 '20
[deleted]
1
u/mzeryck Oct 07 '20
Oh, got it! On your home screen, enter "jiggle mode" and tap the plus button at the top of the screen. Scroll and select Scriptable. When you add it, tap the widget (or press and hold) and select the script in the screen that pops up.
0
Oct 26 '20
[deleted]
1
u/mzeryck Oct 26 '20
Are you using the transparent background script? (And if you are, could you tell me what phone you're using, in case it's a bug in the code?)
As for the spacing issue, I'm happy to say it's an easy fix - you can specify the exact height of the space by adding a number in parentheses, so it looks like this:
space(50),Let me know if that helps!
0
Oct 26 '20
[deleted]
1
u/mzeryck Oct 28 '20
There is wind data, but it's surprisingly complex to implement. If I get other requests I will think about adding it.
For the date, it looked like it was at the very top of the widget in the screenshot - could you show me what you're hoping for?
And yeah it's been fun to have other folks using & enjoying the code so I'm happy to help!
0
Oct 27 '20
[deleted]
1
u/mzeryck Oct 28 '20
I've encountered this as well. When the Scriptable app shows a widget preview like that, it's trying to emulate Apple's widget layout - but it's not perfect. I think the Scriptable preview is slightly smaller than the actual widget size, which is why "Good afternoon" is breaking into 2 lines (pushing everything downwards).
If you use the Shortcuts app, you can create a shortcut that forces the Scriptable widgets on your home screen to refresh. So what I do is update my code in Scriptable, go back to my homescreen & run the shortcut, so then I can see the results in the real widget. Let me know if you'd be interested in this method.
0
Oct 29 '20
[deleted]
1
u/mzeryck Oct 30 '20
0
Oct 31 '20
[deleted]
1
u/mzeryck Nov 01 '20
If you scroll down to the localizedText settings, change "Good afternoon." to "Good\nafternoon."
121
u/mzeryck Sep 29 '20 edited Oct 23 '20
EDIT 2: Since there are still folks referencing this post occasionally, I wanted to update the link to Weather Cal - a script that allows you to customize your widget layout without knowing any JavaScript code. Setup instructions are at that link, and you can even draw your widget with ASCII just for fun. Cheers!
--
There are so many ways you can do this, but I wanted to share one that’s easy and fun. The Scriptable app (free) allows you to create widgets using Javascript. I’ve created a script that automatically uses your existing wallpaper and makes your widget appear transparent.
Once you download Scriptable and copy the script, go into "wiggle mode" on your home screen and take a screenshot of the last page (the empty one). Run the script, and it'll create a perfectly-sized background.
You can export it to other widgets like Widgetsmith, or you can customize to your heart’s content within Scriptable - there’s a comment near the top of the script where you should add your widget code, like I've done with the date and calendar options above.
The script supports all devices that support iOS 14. Happy scripting!