It uses perisistent command line services (basically small macOS apps) that run in the background and only update the Touch Bar when absolutely necessary. The behavior is as close as possible to the BTT-provided widgets.
Most presets just use a scripting language like AppleScript to repeatedly poll and update the Touch Bar. Scripting definitely can work well and is straightforward to implement and modify, but it comes at the price of battery life impact (usually around 1 hour reduction). Additional empirical data here: (Updated) Testing the battery life impact of AppleScript widgets. In comparison, persistent command line services that push updates will have no battery life overhead apart from simply keeping BTT open.
Hi, glad you figured it out. What version of BTT are you running? The service runner should automatically start whenever BTT launches and then re-checks every minute. Can you take a screenshot of your Touch Bar configuration in BTT?
Looks like the service runner widget is disabled (third entry Shell Script/Task: that isn’t marked as visible). For automatic service management you should make sure that it’s visible. Did you by chance manually hide that widget, or did it import into BTT 2.6xx that way?
Hey @andrewchidden! Nice preset I've been giving it a try and making a few tweaks here and there to match my dev environment, and so far there's only one thing I'm having problems with: the calendar widget.
What's really strange is that the eventkit-service is running, the web server is set up, the port is correct, everything seems to be fine when I debug, the pid is set properly etc. but the status file stays empty. When I launch it myself from my shell however, with the exact same arguments, it works perfectly and updates the widget in real time.
Any idea why it would work when I run it by myself and not when it's ran by BetterTouchTool calling service-runner.sh ? I can make it so that the script is ran at startup of my computer, since that'd fix the problem, but if I can avoid it that'd be great
Let me know!
EDIT: Actually when I launch the service-runner.sh script in my terminal instead of from BTT, it also works So it seems that the problem comes from running the script from BTT.
System folder changed to another path, since I don't like having too much stuff in my home folder
If I killall, remove the sub directory (or the files) and relaunch BTT, the files are recreated, the pid file is properly set, but the status file is empty.
I since removed it and now my fishrc (equivalent to bashrc) simply calls the service-runner every now and then instead, but at the time of writing my previous message yes it was turned on, visible, the services were running with the expected arguments
I just installed everything a few hours before posting this message so yes, latest versions
Also if you're interested I made a few tweaks I could share on your GH repo, such as:
If the string for the next event is more than X characters long (30 in my case), it's printed as "first 15 characters...last 15 characters" to ensure that it always stays pretty much the same size (important for muscle memory)
Added a few color variants so that if there is a git diff it's highlighted in green while no changes is displayed in plain white; and that if an event is coming up in the next 59 minutes it's highlighted in red (I often forget about events despite the notifications)
Sure, if you make some PRs I can take a look at them. However for the colors, can you put it behind an env variable flag?
Regarding the calendar status file, the only thing I can think of that might be causing it is a lack of calendar access permissions for BTT or similar. Try checking in System preferences (ether security or accessibility, can’t remember).
Configurable calendar event truncation (thanks to @Ullaakut)
Calendar widget now ignores all day events
Better performance for all control strip buttons which also lets macOS automatically handle any modifier key behavior
Services are still being unit tested.. apologies to those compiling directly from source.
@devynosborne I looked into updating to 2.6xx, but there’s a bunch of small annoying things I noticed right away that I don’t have time to deal with right now; weirdly bold fonts, unnecessary animation when showing / hiding widget groups, etc. Things did seem to transfer over okay, so importing the preset should (generally) work for those who need to use the latest BTT.
In the interest of cleaning up my settings of mess and unused widgets and presets (thanks to trying several presets in the beginning), I simply decided to start fresh. I deleted BTT (after backing up) and installed v2.536. Then I went straight for your install (I'll add some other faves back later).
I did my best to follow your instructions, but several things are not working. I feel I must be missing something easy, perhaps because I'm not a developer, or maybe it's just late on a Sunday night.
My issue is same / similar to Krotsu above, where brightness and volume controls do not work, except for long press actions.
If I read his / your solution correctly, it has to do with his ".bash_profile". The thing is... I don't even know what that is. :-/
If you could point me in the right direction, or even better tell me the obvious thing I'm missing, I'd be much obliged!
I followed the same steps as Krotau above, getting the same results each time, including your Terminal command getting the volume to work -- and up to and including the point you asked him to see what shows in the "Predefined Action" for "Volume Down". It seems to show the same thing:
Except I never created or named ~/.bash_profile -- and as I said, I don't even know what that is (other than some Google-ing which quickly loses me). So I feel stuck on this part.
Perhaps it's something else entirely, but that's what I got.