Jump to content

Alfred + BetterTouchTool touch bar integration


Recommended Posts

TLDR: Use this BetterTouchTool preset to display touch bar buttons for triggering Alfred workflows when the Alfred search bar is activated with a keyboard shortcut. 

Inspired by: 

 

 

Here's what it looks like (workflows not included):

IMG_9916-min.jpg.45ff8d1f80a0ec4285587e4a006f9a1e.jpg

 

1677016580_TouchBarShot2019-04-15at6_29_40pm.thumb.png.0e07e43d9013ed71f9432edb1d539603.png

 

It works by:

  1. Using BTT to setup a keyboard shortcut that simultaneously activates the Alfred search bar (via applescript) and a touch bar group
  2. Setting up an external applescript trigger for the workflows in Alfred and creating buttons for triggering those workflows in the touch bar group
  3. Using BTT to create an escape key that also closes BTT touch bar groups

 

It works this way because there's no way to detect the Alfred search bar itself. This does cause some problems:

  1. This wouldn't work for you if you don't want the escape key to close groups. A possible workaround is to have the Alfred workflows group to close on a timer instead (see: https://community.folivora.ai/t/auto-closing-touch-bar-groups/5935/3)
  2. Left clicking anywhere outside the Alfred search bar when it is open closes the search bar, but not the workflows touch bar group.

 

On the whole though I find that it works quite smoothly.

 

Installation:

Edited by Mingwei
Link to comment
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...