Jump to content

BetterTouchTool Workflow


dnnsmnstrr

Recommended Posts

I made a workflow that allows searching and running named triggers with the most recent version of BetterTouchTool.

 

Here is the GitHub repository: https://github.com/dnnsmnstrr/alfred-btt

 

The only dependency is obviously BTT at version 4.034 or higher.

 

Screenshots:

Searching for named triggers (the Spotify triggers are not built, these are user-created)

image.png.5c372c344d11507eb71ab490bb636029.png

Predefined Actions (These are part of BTT)

image.thumb.png.056f86da9f674a66ceedc8a80c77fea7.png

Link to comment
Share on other sites

@vitor Thanks!

 

The hardcoded ID is how the search for named triggers works, see here: https://community.folivora.ai/t/get-a-list-of-available-named-triggers/30390/3?u=dnnsmnstrr

 

I was able to reproduce the error you got by changing the name of the function called in BetterTouchTool, which leads me to believe that your version of BTT is not fully up to date. Could you check what version of BetterTouchTool you are using? If it is not the most recent, the get_triggers function might not yet be supported. In that case, I guess it might be acceptable if only the predefined actions work and the script filter returns an empty array, so I added a try/catch to the script filter, in hopes that will avoid the script from crashing.

Link to comment
Share on other sites

It works, I can see it can show named triggers.

But if I input named triggers with English names, it can filter it well. But if I input named triggers with Chinese names, it doesn't work. Maybe it doesn't work with unicode chars? 

Link to comment
Share on other sites

@cartern I have some named triggers with emoji in them that do get output, so I think Unicode shouldn't be the problem. Could you give me an example of the text you used?

 

When I create a named trigger with a random Chinese character, it does show up in Alfred, so I'm not sure what is going on, but the filtering is handled by Alfred, so if the data is passed correctly from the script filter, I don't think there's much I can do. 

 

image.png.f2a1012cfaac63004ccf62cbdc476a9f.png

Link to comment
Share on other sites

Thanks a lot. I checked it further and find the issue is not about Chinese, but that I can't search based on any chars after the 1st char.

For example, I have a named trigger "Baidu Search", I can search it with "b" successfully like below.

image.thumb.png.2458c164eb097dd1e587558a598785d6.png

 

But if I search it with "a", it failed.

image.thumb.png.83d79ee14aedf31ed9b8a5bf145a45d3.png

 

 

Link to comment
Share on other sites

@dnnsmnstrr Now the Script Filter is working. But I’ve found issues in the List Filter:

  • This more of a suggestion: Would you separate the names in List Filter? Names are smooshed together like HideAllWindows, LeftClick, DoubleClick. If they’re separated (Hide All Windows, Left Click, Double Click) one can for example search for click and find all matching actions. As it is, the user has to know the exact option name.
  • This is broken: Some of them have weird Subtitles and Args which don’t work. Check e.g. Home and End. Maybe you’ve imported a CSV which wasn’t well formatted?

Link to comment
Share on other sites

@vitor Great! I actually didn't know the filtering works that way, so I agree that it makes sense to add spaces in the titles. The CSV you mentioned is based on a list of actions from the BTT forum, that I adapted and apparently made some mistakes with, which should now be fixed: https://github.com/dnnsmnstrr/alfred-btt/releases/tag/1.0.2

 

Another issue might be that some of the actions don't really work without additional parameters, but that could be added in the future after some reverse engineering / asking for more documentation. 

Link to comment
Share on other sites

Good call on adding the BTTFullName on the subtitles. I still found some with connected names, but they’re a handful so you could probably fix manually:

  • Move WindowLeft
  • Move WindowRight
  • Max WindowLeft
  • Max WindowRight
  • Show/Hide SpecificApp
  • Toggle TrueTone

 

Other than that, pretty much good to go.

Link to comment
Share on other sites

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...