Conditionally Activated TouchBar Widget (Power draw issues, help please!)

hi @Andreas_Hegenberg again!

I've found out that a lot of my script widgets are simple check variables/check if app is open type scripts which simply toggle on and off depending on a variable.

These scripts seem to be drawing a lot of power, which I'm currently trying my best to optimise over at AQT. (several widgets seem to be sucking up heaps of power when showing.)

BTT's CAGs seem to have enough features to be able to be used instead of applescript in these cases, but are very finicky to use as of now as triggers will be spread over so many CAGs.

It would be so good if some kind of new widget could be made that works just like conditional activation groups, except in a widget!

Extra requests:

  • Change colour if another set of conditions is met.
  • Another Condition "If Menubar Item is {Checked / Inactive / Active / Exists}
  • Calendar and reminders based conditions

I think @GoldenChaos would find this useful too as I see him using a heap of CAGs with only like two triggers within them.

The thing is, CAGs are only power saving because there are not as many of them as you'd have widgets or buttons. If I'd add all of the CAG functionality to single widgets, they all would have to constantly reevaluate the conditions, causing severe performance hits (and make everything much more complicated).

However there are a few things that could be done in a performant way, like checking the state of a variable. I'll check whether I can add them on a per widget basis.

But I feel that checking variables via Apple Script shouldn't have a big performance hit even now, are you sure that's the issue?

Thats understandable, maybe add a single variable widget would suffice, or a way to make a conditional activation ruleset and have triggers use one ruleset, though thats pretty complicated..

Two of the big hits are checking iCalBuddy (e.g. for reminders or calendars in the next week) or and checking menubar menus for stuff like:


Another Condition "If Menubar Item is {Checked / Inactive / Active / Exists}

Side note: BTT's reminders functionality isn't complete enough to replace iCalBuddy in AQT for now. I think i made a post about it not too long ago.