Widget Examples

I‘m looking for a widget that displays the status of several servers. The best way would be that the script calls a predefined URL of each server which will deliver its health status. If this is to complex then we could also call one server which will collect the data from others.

It should automatically up, however, clicking on it should run a refresh.

I know, it’s not a request board here, but before I start looking into it, I wanted to see if anybody might have worked on a similar solution already.

Thanks…

I’ve created a widget that loads information from a few of my SmartThings devices and shows their status as icons. When you click on the widget it loads in Scriptable which causes it to reload the device status. I think this is similar to what you are looking for.

Here is the gist for what I have done. I need to find some new icons for a few devices. You can use this and modify it to match the URLs you need to call. I can provide details for making this SmartThings widget work as well (it requires another module and a SmartThings API token).

1 Like

Over the weekend I posted a widget on twitter that I made by taking portions of Max Zeryck’s “transparency” widget and ImGamez “Weather Forecast” widget. Someone asked me to post it here, so I generalized it and am posting it below.

Here is a script that I am using to create a large widget with the Day, Date, Forecast, and Toggl Active Timer.
Beware, that the Forecast will shrink if you put lots of text above and below it, which can become a problem if you have too much text in the widget.

Note: I hope I attributed everyone correctly. If not, I apologize. I am a first time poster and am not sure exactly what I am doing!
I also don’t really know javascript, so I’m sure there is some incorrect syntax and “non-best practices.”

I am using a hack for getting my Toggl Timer, by starting it with Shortcuts and creating a reminder in Reminders, that I can access from the API in Scriptable. I pulled that code from the Gist, because it is very specific and only works with my hacky shortcuts.

4 Likes

That Frankenstein widget.

3 Likes

I think my new widget is ready. Ever since the iOS 14 public beta, the top of my home screen has looked like this:

But I never loved the wasted space in between the two widgets and on the right side of the weather widget. Inspired by many of you, but especially by @egamez’s amazing weather line script (which was the original basis for this code), I set out to make a combined weather/calendar widget.

Without directly writing code, you can set the column widths and alignment, and define what elements are displayed in what places. I’ve had a bunch of fun messing around with it. And of course I love how they look with the “transparent” background.

I am certain there are bugs (I’ve only tested this on an 11 Pro Max) so I would love feedback. Happy scripting!

14 Likes

Using space more wisely is a key reason I’m experimenting with widgets. (If I don’t make them compact they take up too much space; If I do they will save me space.)

1 Like

Are you using 11 pro max? I tried adjusting the width but it’s still blurry,

Hi everyone, I have question about batteryLevel.

It is possible to obtain information about batteryLevel on my Apple Watch? It would be very useful for me if I could display this information below iPhone batteryLevel in Widget.

Thanks

4 Likes

That’s a really beautiful and clean widget, great work! Above all, I like that it’s build modularly and lets the user rearrange elements.
On my device, I added a battery indicator instead of the greeting message, which is may more useful for me. If anyone’s interested: https://gist.github.com/anga83/ffbdf6d0f544a01203aa1f093167460e

3 Likes

thank you. looks great!

Here is a simple widget to display the bin collection schedule for South Cambridgeshire (England). No fancy layout or graphics…

3 Likes

Ahoj, můžeš mi prosím sdílet kód. Díky

Oh nice, I was actually planning to add battery next! I was thinking of doing it “Apple Watch” style like the high/low temperatures, but I love the clever use of SFSymbols!

I recreated Greg Joswiak’s widget that counts down to the Apple Event on October 13th :smiley:

Get the script here: https://gist.github.com/simonbs/8dd0735d0cdffb7616b812d849cfc695

7 Likes

Continuing the discussion from Widget Examples:

Hi - can you share your script for this please? I’m learning Swedish and would find this useful. Thanks!

How do I use refreshAfterDate? My widget basically just needs a single refresh after midnight.

Getting this error when trying to use this code.

Error on line 109:29: TypeError: undefined is not an object (evaluating ‘weatherData.current.weather’)

I added my api key and long and lat etc. is there something else I am missing?

When did you claim your API key? For me it took several hours for it to start working, and I didn’t get a notification or anything unfortunately.

It was just about 25 min ago. I will wait and give it some time. Thanks

Hey, I’m getting this error, any idea why?

1 Like