A standard set of responsive, energy efficient widgets (volume / brightness / calendar / timer / world clock / git)

Thanks! I agree—I wish some of the Control Strip widgets were available out-of-the-box with BetterTouchTool, but I’m thankful BTT has the flexibility to support such widgets regardless.

Check out my latest update, I got the dynamic volume button working with no external helpers :slightly_smiling_face: GoldenChaos-BTT: A complete Touch Bar UI replacement preset

Nice! The the volume service isn’t really for managing the dynamic appearance though—that’s the responsibility of the controller shell script—but instead to instantaneously update the icon whenever there’s a volume event.

I also have grave concerns about the power consumption of running AppleScript routines frequently. I’m planning on doing some empirical tests this weekend to see the actual power draw, but I’d wager (based on nothing whatsoever) that it reduces battery life by at least thirty minutes.

Interesting on the battery life, curious to see what you find!

I also have concerns about continually running scripts.

FWIW I update the volume icons (and all other icons when applicable) by simply doing the 'attach additional action' to run a script that refreshes the UUID through BTT ie:

tell application "BetterTouchTool"
refresh_widget "2D4B88AC-9244-4054-9CA9-33E87B84613C"
end tell

I put the script to run every 0 seconds so it only refreshes on press. It works pretty well. The only problem I've had is when unplugging/plugging in headphones since the volume sometimes changes or mutes in the background.

1 Like

Compiled some preliminary battery life results here:

I think I am doing something wrong, i am new too BTT but something seems to go wrong. I followed your installation and configuration step carefully. I edited my .bash_profile to include those env variables but it keeps looking weird. The buttons do work but they are heavily overlapping en not positioned correctly.

Any tips? Sorry if this is a stupid question. I am just really intrigued to get it to work and see if it enhances my dev workflow!

Hey, thanks for trying out the preset. I’m guessing you’re using the very recently released 2.6x version of BTT which isn’t 100% backwards compatible. I created the preset on BTT v2.536, which you can find here as btt2.536.zip: https://bettertouchtool.net/releases/

You might also need to manually set the Touch Bar settings if BTT didn’t import/export them properly. This is what mine looks like:

I am using the version you suggested and the layout problems are fixed but it the volume/brightness controls don't seem to work.

Here is a screenshot of the TouchBar. I have hidden the items not part of the control strip for clearance.

As you see above the volume up icon is not there (weird).

So far this is what works:

  • Hold volume down to mute
  • Hold brightness down to lock screen

what does not work:

  • single press to turn volume/brightness up or down (option + shift press same thing)
  • option press brightness buttons to open display preference
  • options press volume buttons to play system feedback sound

So in conclusion only the long press actions seem to work. I hope this feedback can help you fix these bugs.

side note: I am using MacBook Pro 13 inch 2017

It sounds like you didn’t download and/or install the controllers. Can you confirm that you installed the controllers to ~/bettertouchtool?

Sure, I followed your instructions and read a bit trough the bash scripts. Below is a screenshot of my home folder with the bettertouchtool folder inside

What do you get when you run this command in Terminal?

btt_usr_root=${BTT_USR_ROOT:-~/bettertouchtool}; "${btt_usr_root}/control-strip/controlstrip-service" --type=volume --direction=0 --volume-feedback=1

It turns my volume down and when I change direction to 1 it goes up. When I change volume to brightness it turn the brightness up/down depending on direction. So it works for that.

Ok, so when you downloaded BTT v2.536 did you completely re-import the preset, or did you use the previously imported set?

If you select the “Volume Down” widget entry and click the gear next to “Predefined Action”, what shows up in the text field?

This turns up:

It is the same command you send and thus the one that works inside the terminal.

edit: I also re-imported the settings as I moved versions because they were not there.

Figured it out. It’s because you probably misnamed ~/.bash_profile (notice the dot before the bash_profile which makes it a system file). If this is the case, the following Terminal command should work to rename it:

mv ~/bash_profile ~/.bash_profile

That is not the case, I named it correctly

inside of my .bash_profile

Ah that’s your problem. You set BTT_USR_ROOT to the string literal "~/bettertouchtool". If you remove the quotes (or remove the line altogether) it’ll work.

Edit: To start the services now that the controller path is fixed (for calendar, git, etc), you can either toggle the app region visibility by tapping the time twice, or simply restart BTT.

Ah YES! That did it. I can't believe I made such a little (and stupid) mistake. Thank you for having the patience to help me. I will put some time into studying the code and maybe learning a bit and helping you in return.

Got any last tips on were to begin with objective-c on MacOS?

Thanks in advanced.

1 Like

Glad we could solve the issue :slight_smile:

Most of my Obj-C experience comes from iOS actually, but if you’re new to the language or frameworks Stanford’s course(s) is always a good place to start.