lwitzani / homebridgeStatusWidget

MIT License
371 stars 143 forks source link

Scriptable iOS 16 Homescreen widget #50

Closed kolorfilm closed 1 year ago

kolorfilm commented 1 year ago

Hi there,

I'm using the Widget every day. Great work!

Are there any plans for an update that the widget fits to a Home Screen widget? The scriptable app was just updated to allow widget as Home Screen widget.

Thanks!

lwitzani commented 1 year ago

Hey :)

Is this a feature of iOS 16? Actually i still hadn‘t the time to install iOS 16 on my iPhone 😅.

Maybe i should check that out soon 😉 but there are no real „plans“ to adapt something. Can you post a screenshot of what the problem is?

Thanks

kolorfilm commented 1 year ago

Really? You are missing the awesome new Home Screen from iOS. 😄

Well sure here it is. It seems it doesn’t fit the widget as they are small(er).

640D7752-0F4A-43DC-AFB1-0A9E8DE93019

lwitzani commented 1 year ago

okay thanks. I updated my iPhone to iOS 16 today and checked out the widget thingy on the home screen (HS). There is really VERY limited space. I started with refactoring my code and started a support for this small HS Widget. I need to figure out, how to nicely show it. Maybe i just go with the data and drop the charting, something similar as this: IMG_7A0CCC9AB7EB-1

In the small widget mode (which takes up only one widget space) there is even less space because from iOS only the circle area can be filled, so the minimum size will take two of the four slots, that's for sure.

In the mode that takes up 2/4 slots with the font size as shown in the picture i can write about 4-6 lines which is really not much. Need to play around with it more...

kolorfilm commented 1 year ago

Oh wow thanks for the fast update. Yeah there is definitely less space. A only text base version could make sense. Thanks for trying! 🙂

lwitzani commented 1 year ago

What do you think of this state:

D06F6B2A-1F90-48D9-99B4-F92D5AAE444E

Text is a bit small but for a quick look it‘s alright i guess

kolorfilm commented 1 year ago

Looks awesome! Thanks for the try! I would like to try it out.

lwitzani commented 1 year ago

i need to clean the code a bit but maybe tomorrow or after tomorrow i can probably push a new version. Also i did not yet integrate a mechanism that triggers this view. It currently looks like this by forcing this view because on runtime i cannot know if the script is executed as home screen widget or as usual widget. Maybe the developer will add some distinction for that, then i can create a different view depending on that variable. but until then, the user probably needs to have multiple scripts with different configurations. One for the usual widget and an additional one that is only for the home screen widget. Also i will take some time to update the readme/documentation so pls wait a little longer ;)

lwitzani commented 1 year ago

oh actually there might be some distinction. there is a variable runsFromHomeScreen maybe that is what i need. will check it out

edit: no, actually the "home screen" seems to be the screen when the iphone is unlocked and you can see the apps...so if the script would be there in a widget then this would be true. The thing we are talking about is probably the "lock screen". No variable for that yet

lwitzani commented 1 year ago

update: i found the right property. it is called config.runsInAccessoryWidget. based on this i can decide which UI to show. I pushed an update, so please check it out. If you installed the script via scriptdu.de then it should be enough to just run the update via this mechanism.

kolorfilm commented 1 year ago

It seems to work! Thanks a lot for your work! 🚀

image