Today as I was preparing emails with different bunches of attachments for my 2025 financial statements, I looked into faster directory navigation via Finder, so that I could use Dropover more effectively.

Long story short:

  • Fortunately Alfred App on macOS, which I’ve been a paying customer of for a few years now, has a zoxide workflow which is really great, since I have zoxide hooked up to my zsh and also to my lf file manager
  • Using this, one can do zoxide fuzzy searches through your frecently (haha) visited directories, and then either invoke terminal on that dir, or invoke Finder, or copy to clipboard
  • For the terminal flow, Alfred requires a custom Apple Script to invoke anything that’s not the standard terminal.
  • These days I am using kitty, for which it turned out that the easiest is to send it the keystrokes, as demonstrated in this github comment.
  • If you are also a macOS kitty user, you can use the slightly modified form below in your Alfred | Preferences | Features | Terminal
-- slightly modified from https://github.com/kovidgoyal/kitty/issues/4460#issuecomment-2677434820
on alfred_script(q)
    -- set qq to quoted form of q
    
    --Check if Kitty is running
    tell application "System Events"
        set isKittyRunning to (exists (processes where name is "kitty"))
    end tell
    
    tell application "kitty"
        activate
        
        delay 0.5
        
        -- Create a new tab only if Kitty is already running
        if isKittyRunning then
            tell application "System Events"
                keystroke "t" using command down
            end tell
            delay 0.5
        end if
        
        -- Send as keystroke
        tell application "System Events"
            keystroke q
            keystroke return
        end tell
    end tell
end alfred_script