a better script for both brightness 'display/kb' that updates the value regardless of how u change the brightness through (currently tested on Monterey)
how to:
- create a script btn for each
- copy each json > select a btn > paste the json "cmnd + v"
[
{
"BTTWidgetName" : "Display Brightness",
"BTTTriggerType" : 639,
"BTTTriggerTypeDescription" : "Apple Script \/ JavaScript Widget",
"BTTTriggerClass" : "BTTTriggerTypeTouchBar",
"BTTPredefinedActionType" : -1,
"BTTPredefinedActionName" : "No Action",
"BTTEnabled2" : 1,
"BTTRepeatDelay" : 0,
"BTTUUID" : "05926A9B-C25C-417D-8BA7-ABB45DBC2B2B",
"BTTNotesInsteadOfDescription" : 0,
"BTTEnabled" : 1,
"BTTModifierMode" : 0,
"BTTOrder" : 6,
"BTTDisplayOrder" : 0,
"BTTMergeIntoTouchBarGroups" : 0,
"BTTTriggerConfig" : {
"BTTTouchBarAppleScriptString" : "tell application \"BetterTouchTool\"\r\tset brightval to word 10 of (do shell script \"\/usr\/libexec\/corebrightnessdiag status-info | grep -w DisplayServicesBrightness\")\r\t\r\treturn (((round (brightval * 100)) as string) & \"%\")\rend tell",
"BTTTouchBarItemPadding" : -10,
"BTTTouchBarButtonColor" : "0.000000, 0.000000, 0.000000, 255.000000",
"BTTTouchBarIconInvert" : false,
"BTTTouchBarItemPlacement" : 0,
"BTTTouchBarAppleScriptStringRunOnInit" : true,
"BTTTouchBarAlwaysShowButton" : false,
"BTTTouchBarButtonHoverColor" : "248.880000, 146.115000, 128.010000, 181.050000",
"BTTScriptType" : 0,
"BTTTouchBarButtonHeight" : 15,
"BTTTouchBarButtonWidth" : 100,
"BTTTouchBarScriptUpdateInterval" : 5,
"BTTTouchBarItemIconHeight" : 30,
"BTTTouchBarItemSFSymbolDefaultIcon" : "sun.max.fill",
"BTTTouchBarButtonTextAlignment" : 0,
"BTTTouchBarAlternateBackgroundColor" : "206.000003, 35.000002, 43.000001, 255.000000",
"BTTTouchBarAppleScriptUsePath" : 0,
"BTTTBWidgetWidth" : 400,
"BTTTouchBarItemIconType" : 2,
"BTTTouchBarColorRegex" : "^0",
"BTTTouchBarBorderColor" : "255.000000, 255.000000, 255.000000, 255.000000",
"BTTTouchBarItemIconWidth" : 22,
"BTTTouchBarLongPressActionName" : "gesture - openDisplayBrightnessGroup",
"BTTTouchBarButtonName" : "Display Brightness",
"BTTTouchBarButtonFontSize" : 12,
"BTTTouchBarIconTextOffset" : 5,
"BTTTouchBarFreeSpaceBeforeButton" : 0,
"BTTTouchBarOnlyShowIcon" : false,
"BTTTouchBarFreeSpaceAfterButton" : 5,
"BTTTouchBarItemSFSymbolAlternateIcon" : "sun.min"
}
}
]
[
{
"BTTWidgetName" : "KB Brightness",
"BTTTriggerType" : 639,
"BTTTriggerTypeDescription" : "Apple Script \/ JavaScript Widget",
"BTTTriggerClass" : "BTTTriggerTypeTouchBar",
"BTTPredefinedActionType" : -1,
"BTTPredefinedActionName" : "No Action",
"BTTEnabled2" : 1,
"BTTRepeatDelay" : 0,
"BTTUUID" : "F519062B-B436-4787-BAC1-DF153EF0C067",
"BTTNotesInsteadOfDescription" : 0,
"BTTEnabled" : 1,
"BTTModifierMode" : 0,
"BTTOrder" : 7,
"BTTDisplayOrder" : 0,
"BTTMergeIntoTouchBarGroups" : 0,
"BTTTriggerConfig" : {
"BTTTouchBarAppleScriptString" : "tell application \"BetterTouchTool\"\r\tset brightval to word 10 of (do shell script \"\/usr\/libexec\/corebrightnessdiag status-info | grep -w KeyboardBacklightBrightness\")\r\t\r\treturn (((round (brightval * 100)) as string) & \"%\")\rend tell",
"BTTTouchBarItemPadding" : -10,
"BTTTouchBarButtonColor" : "0.000000, 0.000000, 0.000000, 255.000000",
"BTTTouchBarIconInvert" : false,
"BTTTouchBarItemPlacement" : 0,
"BTTTouchBarAppleScriptStringRunOnInit" : true,
"BTTTouchBarAlwaysShowButton" : false,
"BTTTouchBarButtonHoverColor" : "248.880000, 146.115000, 128.010000, 181.050000",
"BTTScriptType" : 0,
"BTTTouchBarButtonHeight" : 15,
"BTTTouchBarButtonWidth" : 100,
"BTTTouchBarScriptUpdateInterval" : 5,
"BTTTouchBarItemIconHeight" : 30,
"BTTTouchBarItemSFSymbolDefaultIcon" : "light.max",
"BTTTouchBarButtonTextAlignment" : 0,
"BTTTouchBarAlternateBackgroundColor" : "206.000003, 35.000002, 43.000001, 255.000000",
"BTTTouchBarAppleScriptUsePath" : 0,
"BTTTBWidgetWidth" : 400,
"BTTTouchBarItemIconType" : 2,
"BTTTouchBarColorRegex" : "^0",
"BTTTouchBarBorderColor" : "255.000000, 255.000000, 255.000000, 255.000000",
"BTTTouchBarItemIconWidth" : 22,
"BTTTouchBarLongPressActionName" : "gesture - openKBBrightnessGroup",
"BTTTouchBarButtonName" : "KB Brightness",
"BTTTouchBarButtonFontSize" : 12,
"BTTTouchBarIconTextOffset" : 5,
"BTTTouchBarFreeSpaceBeforeButton" : 0,
"BTTTouchBarOnlyShowIcon" : false,
"BTTTouchBarFreeSpaceAfterButton" : 0,
"BTTTouchBarItemSFSymbolAlternateIcon" : "light.min"
}
}
]