yuuiko / AquaTouch

Dynamic Custom Macros for your MacBook TouchBar! (Supports 40+ Apps and Websites)
https://community.folivora.ai/t/1704
177 stars 8 forks source link

Bug: Quickstrip has 'Show in any open Touch Bar Group' option on #63

Closed wonjoonSeol closed 4 years ago

wonjoonSeol commented 4 years ago

Hey yuuiko! It's great to see you still actively maintaining AquaTouch! Got a minor bug here: Quickstrip has 'Show in any open Touch Bar Group' option on. Please see the picture below.

Screenshots

Touch Bar Shot 2020-06-01 at 1 40 45 AM

By the way, AQT is starting to eat fair amount of CPU due to all the script runners it uses. (18 threads, ~ 5% CPU, 2 ~ 11 energy impact on 16in MBP).

In my own fork, I have deleted some app scripts that I don't use and increased time interval for some scripts. This is something you may want to look into when you have time?

Nonetheless, I appreciate your dedication and the craftsmanship that went into AQT :) Thanks a lot 👍 !

Details:

yuuiko commented 4 years ago

Interesting, not happening here. Did you mess up some CAG configurations during your edits?

If possible I'm very very interested in how you optimised AQT, because I really, really want to optimise it. Would you mind saving me some time and showing me what you optimised if you can?

(also plan to convert some of the scripts to BTT's new javascript as apparently it's much more efficient... LOTS of work to do for that though)

Thanks in advance!

itsnandy commented 4 years ago

Has there been any progress with this yet? Just curious 😅

yuuiko commented 4 years ago

@itsnandy Not much progress so far as my semester is ending and I'm pretty busy. I think I can get more done come semester break!

wonjoonSeol commented 4 years ago

@yuuiko, quite possibly.

As for the script, I have gone back to my modification of v3.5.1 as I don't need many features the current version presents. (While it is surely excellent for many other people) My main usages for the touch bar is for storing hotkeys that I don't want to remember all the time and the window tile management.

My optimization for the current version was rather rudimentary, so I am not sure if you can apply them as it is:

  1. For instance I deleted many scripts and apps that I don't use or is deprecated (For instance, game mode, itunes, apple music etc) - that made the whole process much lighter.

  2. Second, when I watch youtube or listen to soundcloud I don't need a script to run every second to check its url. I have removed these too or increased the refresh time.

I don't know much about Apple script, but it would be good to look into the scripts that has 'run in background' and 'always run when the widget is visible' options on.

If I can come up with better refactored script Ill let you know but no guarantee because I have started a new dev job just a few days ago and I am busy learning their code base. Javascript sounds promising though.

yuuiko commented 4 years ago

@wonjoonSeol sorry for the ping but I'd like to know how you got those "18 threads, ~ 5% CPU, 2 ~ 11 energy impact on 16in MBP" stats for AquaTouch, would be pretty helpful to my optimisation work

wonjoonSeol commented 4 years ago

Sure thing, I used activity monitor for that one but any process viewer would do such as htop.

If you want to, you can see the "cut-down" version of the Aquatouch in my repo. I basically removed as much script and the apps I don't use as much as possible (so it wouldn't work for general users.. unfortunately)

When I cut down the scripts I checked "Scripting BTT" tab in the preference to minimise persistent values as much as possible. I wish there was an option to search scripts in BTT to find these variables quickly.

I am quite happy with the current "watered-down" setup - I no longer get "BTT is using significant energy" in the battery tab and the CPU usage is halved.

I mainly use BTT for keyboard shortcut (window management) nowadays. I got myself HHKB so i'm using the macbook in docked mode and I no longer use the touchbar, unless I am on the move.

yuuiko commented 4 years ago

Not seeing this anymore in 3.6, and also optimised a lot!