If you change a widget's icon to a local file through applescript (with widget text disabled), the widget disappears and either never comes back, or spawns back in a second later, incrementally like a webpage loading. It will never come back if you put exactly the same code in the actual widget (where it auto updates every X seconds).
However if you enable text, the button performs exactly as expected (with no lag).
This seems related to the "always run when widget becomes visible" checkbox in the overall widget "widget specific" tab under "Widget Specific Config:". Disable it, and it fixes it (somewhat??)
- Create an applescript widget
- Give it a "run applescript async" trigger
- Give it a name too, doesn't matter
- Check "Show icon only, no text"
- Give it a default icon
- In the trigger code, put:
tell application "BetterTouchTool"
update_touch_bar_widget "4F00D1EA-3277-4BE6-8BA1-02433145E086" icon_path "/Users/user/Documents/Touchbar/play.png"
update_touch_bar_widget "4F00D1EA-3277-4BE6-8BA1-02433145E086" icon_path "/Users/user/Documents/Touchbar/pause.png"
But obviously use your own existing files and UUIDs.
- Press the button.
- Type of Mac: MacBook Pro (15-inch, 2017)
- macOS version: 10.13.4 (17E199)
- BetterTouchTool version: 2.835
Seems pretty similar to this: