r/Scriptable • u/zivi7 • Jan 14 '24
Help Help a noob create an event / reminder counter for the lockscreen
I’m trying to create a lockscreen widget that shows me how many upcoming calendar events and reminders there are left on my agenda for today. Unfortunately, every agenda app widget I come across shows the title or time of just the next event/reminder, not just a total count. I tried using Widgy and the attached result looks nice - but it doesn’t update reliably. Next I wanted to try Scriptable, but I have no idea where to start. All agenda scripts I can find work with event titles where I just need a count. Do you know of scripts that just put out the number of today’s events and reminders? I could try to extract what I need from them then.
•
u/AutoModerator Jan 14 '24
Thanks for the submission!
It looks like you may have not shared the code you want help with.
Please be sure to include that. If you did, then you can safely ignore this comment.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/Mordred666 Jan 15 '24 edited Jan 15 '24
getting all open Reminders is just 1 line of code:
Similarly getting all Events of the day is also 1 line:
1
u/zivi7 Jan 17 '24
I ended up making two small widgets instead of one rectangular one to be able to open different apps for events and reminders. You can find the scripts for both here: https://pastebin.com/M6LjJHv5
Huge shoutout to riverwolf for sharing the code to fetch remaining events and reminders for the day: https://talk.automators.fm/t/calendar-reminders/9236