Alfred Alias Hack 08 Feb 2024
I live by Alfred as a launcher and all around insta-utility thing. I also live by whatever terminal I am currently using. Switching from Terminal.app
to iTerm.app
was easy enough in Alfred, just need to hit the down arrow after trying to launch it 2-3 times and it picks up that ⌘-spc t e r
means iTerm.app
not Terminal.app
and we're off to the races. This works as iTerm nicely has t e r
in it, so Alfred picks it up as I type t e r
.
Ghostty.app
does not include t e r
so I have been launching iTerm, quitting iTerm, launching Ghostty, on repeat, all the time. So, the hack to convince Alfred that ⌘-spc t e r
means "launch ghostty" (as I have given up on reprogramming my fingers) is as follows:
Create an app alias (in the Finder, right click on Ghostty.app -> Make Alias) and name it "Ter Ghostty.app". This makes a special "MacOS Alias file", not a symlink. Fire up Alfred Preferences and tell it to also search com.apple.alias-file
files. This is buried in Default Results -> Advanced
. You can drag and drop the newly created alias file into the list to do it, or type carefully.
At that point, Alfred will see the alias and start showing it for default results, and with a few iterations will pick up on th efact that ⌘-spc t e r
means Ter Ghostty.app
not iTerm.app
or so forth:
This is also useful for any other case where you want to change a default your fingers have memorized (Chrome -> Safari, Vim -> Emacs, Notes -> Obsidian, and maybe someday, Emacs -> Zed).