GoldenChaos hides constantly and I have to click on "Your custom touchbar is currently hidden" in BTT to re-enable it. Is this normal behavior?
Definitely not normal, but I genuinely have no idea why that would be happening o_O perhaps @Andreas_Hegenberg knows.
I am riding the struggle bus with GC enabled. My battery drains at a ridiculous rate.
the AVG energy usage is never below 30 (whatever units thats being mesured in). Its so bad I have to disable BTT basically when I am not tethered to the power cord any thoughts?Is this on the latest experimental version? If not, give it a shot - lots and lots of optimizations that aren't yet in the stable release. It's pretty stable so I recommend giving it a shot, I'm just working out the final features and polish!
Yes, sorry I didn’t mention this. I am on latest experimental for both GC and BTT. I have been carrying over my settings since last stable basically. I tried doing a full reset of GC yesterday and redid my settings but still nada and seeing the avg of 30 energy impact
Audio AirPlay devices
This is super easyCheck out the C3 version of my preset, you'll find an "AirPlay" (Audio only) group there.
The group opens through a button that displays the current output device, and if this is an AirPods Device displays the battery status in the line below.
The Script to find the connected device (used by myself to open the group)
--GET STORED NAME
tell application "BetterTouchTool"
--attempt to get variable
try
set LclAirPodsName to get_string_variable "AirPodsWg_DevceName"
end try
end tell
--END GET STORED NAME
set returnValue to {}
tell application "iTunes"
set AirPlayName to name of the first AirPlay device whose selected is true
if AirPlayName contains LclAirPodsName then
set returnValue to (AirPlayName & (checkBattery() of me)) as string
else if AirPlayName contains "Computer" then
set returnValue to (AirPlayName & (checkStatus() of me)) as string
else
set returnValue to AirPlayName
end if
return returnValue
end tell
on checkStatus()
--GET STORED NAME
tell application "BetterTouchTool"
--attempt to get variable
try
set LclAirPodsName to get_string_variable "AirPodsWg_DevceName"
end try
end tell
--END GET STORED NAME
--set myString to button returned of (display dialog "Connected?" buttons {"Yes", "No"})
--set myString to "name: DR-BT101 Connected: " & myString
(*uncomment line below when done testing*)
set myString to do shell script "system_profiler SPBluetoothDataType"
--initial check if it's not even there
if myString does not contain LclAirPodsName then
return " "
else
--find out if connected/disconnected
set AppleScript's text item delimiters to "name:"
set myList to the text items of myString --each item of mylist is now one of the devices
set numberOfDevices to count of myList
set counter to 1
repeat numberOfDevices times --loop through each devices checking for Connected string
if item counter of myList contains LclAirPodsName then
if item counter of myList contains "Connected: Yes" then
return checkBattery()
else if item counter of myList contains "Connected: No" then
return " "
else
display dialog "Error Parsing" --this shouldn't happen
end if
end if
set counter to counter + 1
end repeat
end if
end checkStatus
on checkBattery()
set OUTPUT1 to do shell script "
OUTPUT1='';
BLUETOOTH_DEFAULTS=$(defaults read /Library/Preferences/com.apple.Bluetooth);
SYSTEM_PROFILER=$(system_profiler SPBluetoothDataType);
MAC_ADDR=$(grep -b2 \"Minor Type: Headphones\"<<<\"${SYSTEM_PROFILER}\"|awk '/Address/{print $3}');
CONNECTED=$(grep -ia6 \"${MAC_ADDR}\"<<<\"${SYSTEM_PROFILER}\"|awk '/Connected: Yes/{print 1}');
BLUETOOTH_DATA=$(grep -ia6 '\"'\"${MAC_ADDR}\"'\"'<<<\"${BLUETOOTH_DEFAULTS}\");
BATTERY_LEVELS=(\"BatteryPercentCombined\" \"HeadsetBattery\" \"BatteryPercentSingle\" \"BatteryPercentRight\");
if [[ \"${CONNECTED}\" ]];
then
for I in \"${BATTERY_LEVELS[@]}\";
do
declare -x \"${I}\"=\"$(awk -v pat=\"${I}\" '$0~pat{gsub (\";\",\"\"); print $3}'<<<\"${BLUETOOTH_DATA}\")\";
[[ ! -z \"${!I}\" ]] &&
OUTPUT1=\"${OUTPUT}$(awk '/BatteryPercent/{print substr($0)}'<<<\"${I}\")${!I}%\";
done;
printf \"%s\" \"${OUTPUT1}\";
fi"
set OUTPUT2 to do shell script "
OUTPUT2='';
BLUETOOTH_DEFAULTS=$(defaults read /Library/Preferences/com.apple.Bluetooth);
SYSTEM_PROFILER=$(system_profiler SPBluetoothDataType);
MAC_ADDR=$(grep -b2 \"Minor Type: Headphones\"<<<\"${SYSTEM_PROFILER}\"|awk '/Address/{print $3}');
CONNECTED=$(grep -ia6 \"${MAC_ADDR}\"<<<\"${SYSTEM_PROFILER}\"|awk '/Connected: Yes/{print 1}');
BLUETOOTH_DATA=$(grep -ia6 '\"'\"${MAC_ADDR}\"'\"'<<<\"${BLUETOOTH_DEFAULTS}\");
BATTERY_LEVELS=(\"BatteryPercentCombined\" \"HeadsetBattery\" \"BatteryPercentSingle\" \"BatteryPercentLeft\");
if [[ \"${CONNECTED}\" ]];
then
for I in \"${BATTERY_LEVELS[@]}\";
do
declare -x \"${I}\"=\"$(awk -v pat=\"${I}\" '$0~pat{gsub (\";\",\"\"); print $3}'<<<\"${BLUETOOTH_DATA}\")\";
[[ ! -z \"${!I}\" ]] &&
OUTPUT2=\"${OUTPUT}$(awk '/BatteryPercent/{print substr($0)}'<<<\"${I}\")${!I}%\";
done;
printf \"%s\" \"${OUTPUT2}\";
fi"
return & "
" & "Ⓛ" & OUTPUT2 & " Ⓡ" & OUTPUT1
end checkBattery
--Code by @Caliguvara and @Zikade from MacTechNews.de
Script to display an AirPlay Device (needs to be repeated *n* times, returns the names of the devices)
tell application "iTunes"
set listOfAirPlayNames to (get name of every AirPlay device)
set AirPlayDevice to the first item of listOfAirPlayNames
return AirPlayDevice
end tell
--code by @Caliguvara
You have to change the third line to second item
, third item
,… n times.
Only bugger for now, I return a variable, not a string, so the Widget won't be able to tell you if several AirPlay Devices are connected. More information in this MacTechNews.de discussion.
Script to connect to a desired AirPlay Device
tell application "iTunes"
set listOfAirPlayNames to (get name of every AirPlay device)
set chosenAirPlayName to the second item of listOfAirPlayNames
set current AirPlay devices to AirPlay device chosenAirPlayName
end tell
--code by @Caliguvara
Of course you have to change the third line to second item
, third item
in order to adjust them to their respective widget.
Take a look into it! Would be happy to hear your opinion about it
Another question halfway OT - do you know a mail program that works with apple script? My idea is to use the email notifications of Folivora to display notifications from the community in the Touch Bar without spamming my main mail app…
For sure
Are there issues with the settings dialog in the latest GC experimental build in BTT 2.854? None of the toggles work for me anymore. There's a pressed state, but they don't move.
I think I might have broken it WIll upload a fixed version in a minute.
// fixed in BetterTouchTool v2.862 which is currently uploading
Excellent, all good again. Thanks for the quick fix
Hey, I think I've made an OmniFocus tasks group similar to the Things tasks group, but how do you make the right side buttons go away after you open a new group, also how can I contribute what I've made? Do you take PRs anywhere?
If you paste the code for your widgets in a new thread in this subforum (you can title it "OmniFocus Support" or something similar), I'll tidy things up and add it to the next release!
That also goes for anything else you'd like to contribute I know it's not as simple as a pull request but it works, haha.
Is it possible to add "reopen" command to dock items?" This allows the app to come to the front even when the app has been minimized.
example:
else
tell application "Messages" to reopen
tell application "Messages" to activate
end if
Which version of GoldenChaos are you using?
latest experimental of both GC and BTT
Is the Touch Bar supposed to change when different applications are being used? I set it up and the toucher always shows the same icons.
Yes, with this preset, the touchbar should always stay the same, unless you hold down command, alt, or control.
@wowthatisrandom will add this when I go through and update my badges with @yuuiko's improved handoff detection
@Dylan_Bertwell what @alex-w-k said! I'll add that one of the fundamental design principles of GC-BTT is that a keyboard's layout should be consistent and reliable, only changing with explicit user input (explicitly tapping the Touch Bar or using a keyboard shortcut). I think the constantly changing nature of the built-in Touch Bar is what makes it so infuriating to use, because it prevents you from developing muscle memory for the key positions.