Building Custom Jigs With Alfred

note: I’m giving away some Alfred licenses!

Because I love Alfred so darn much, I’m giving away Alfred Powerpack licenses to some lucky readers. If you want to enter, you should own a Mac, since you’ll need one to actually use Alfred!

To enter, do one of the following:

  • follow me at @harpaa01
  • Subscribe to icanthascheezburger via email
  • Subscribe via RSS at the link above and leave a comment with your email address (I won’t publish the comment)

If you also mention one of these posts on Twitter or Mastodon or Micro.blog and mention me you’ll double your chances.

I’ll pick winners next Wednesday, September 2, 2020!


I like to watch experienced craftspeople do woodworking from time to time, and the more I watch good ones doing their work, the more I realize it has a lot in common with software development as a craft.

One such similarity is that woodworkers will often see opportunities to make themselves more productive by building little custom tools for themselves such as jigs to help hold a piece of wood in place, or to help make consistent cuts when doing some repetitive work.

Here’s a common enough use case: I have a projects folder where I keep all my programming projects. I very commonly want to just open one of the folders in that projects folder with my editor of choice.

Alone, Alfred makes this not too difficult:

alfred accessing a project folder

That isn’t bad.

But we can do it faster with a workflow.

This workflow has two components: a script filter input and an action that runs a script.

This is the script filter:

script filter

The code for the script filter:

I’m not that good at Bash scripting and I lifted this code from some other Alfred workflow years ago. But to customize it, you’ll want to change the directory where it says cd ~/projects to match the directory you keep your projects in. You can also customize the text to say whichever editor you plan to have projects open in.

The action script is set up like so:

script action

The script reads simply /usr/local/bin/mate ~/projects/{query}. Your editor will be a different binary. If you use VS Code and you’ve set it up to launch from the command line the path to the binary will be /usr/local/bin/code instead.

With everything set up, let’s see how it looks:

alfred script filter workflow in action

Not bad!

Leave a Reply

Your email address will not be published. Required fields are marked *