I wanted a way to display the number of items in my inbox and items due in the next 24 hours on my touchbar. And most importantly, I did not want Todoist to have to be running. This uses the Todoist Sync API to stay up to date
Nice! I like the look of that. I don't use Todoist, but I will use this as inspiration for other widgets.
You can set variables through BTT (since v2.530) with AppleScript (documentation). You could set the variable with a quick, ad-hoc script. Then each time the widgets run they would get the variable from BTT. I don't know how this affects speed, but I imagine it would be negligible. If you're running a shell script, I believe you can use osascript to run AppleScript and get the value returned. And maybe @Andreas_Hegenberg knows a more direct way to get those variables via shell (I don't know where they're being stored, but now I want to go explore; maybe they're in a plist somewhere?)
There's a built-in way to share presets here on the forum (I can't find it right now, for some reason). It allows readers to preview the preset without downloading and opening the file. If you find that, would you mind sharing it that way, as well, for quick preview?
If you have any questions on the variable scripting, let me know; I'd be happy to help you build that (though I am not an expert...yet).
without knowledge how work with python and terminal, I can't run it. it's a pity.
But thanks a lot!! it's interesting! good base for making script for my own needs
What i need to do:
change print command from 2nd notation to 3rd (only my situation)
after that i should correct first quoter in print calling on both scripts