Jump to content
Mingwei

Alfred + BetterTouchTool touch bar integration

Recommended Posts

Posted (edited)

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

Share this post


Link to post
12 hours ago, Mingwei said:

Using BTT to setup a keyboard shortcut that simultaneously activates the Alfred search bar (via applescript) and a touch bar group

 

Very clever.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...