Jump to content

Using Marta (or an alternative Finder app) with Alfred

Recommended Posts

Marta is a recently developed file manager for macOS that's oriented for power users. It's very keyboard oriented, and is sort of the finder version of SublimeText if that means anything to you. 


I was wondering if there was a way to get Alfred to open folders via Marta instead of the default Finder app. I know that in some cases like for PathFinder (another popular finder alternative) it's not necessary to do much and I think Alfred opens up the folder automatically in Pathfinder. Is there a way to do it with Marta or any other alternative? 

Link to post

Alfred uses the default file browser from your Mac. Finder is the default, but some alternatives (like Path Finder) add a preference to set them as the default file browser (taking the place of Finder). Therefore, to do what you want, it's not really related to Alfred, but to your computer configuration.


You can set Marta as the default file browser with the command (inserted into the Terminal):

defaults write -g NSFileViewer -string org.yanex.marta;

And revert to Finder with this command (if you want to switch back):

defaults delete -g NSFileViewer


* Note that you would need to restart you computer to make the preference active.


Alternatively, if you don't want to change your computer preferences, you can specify an application to open the folder from the Alfred File Actions menu. When you are selecting a folder from Alfred, just press your File Actions key (the one(s) that you've defined in the Alfred preferences) and use "Open With" action and select the Marta application and it should open your folder in Marta.

Edited by GuiB
Adding alternative with File Action
Link to post

@bivalvegruff, did you restart your computer or session?


If you write in terminal defaults read -g NSFileViewer you get org.yanex.marta as output?


Myself, I'm always opening the files using the Reveal in Finder action (CMD+Enter on a standard search or with the Reveal in Finder file action) and it works great on my side. However, if you open your file using only Enter while doing the file search then it seems that you need to also set another preference to Marta like:


defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandlers -array-add '{LSHandlerContentType="public.folder";LSHandlerRoleAll="org.yanex.marta";}'

This is all the same as what is explained at the Forklift website, so you can have a look here to have some more info: https://binarynights.com/manual#fileviewer


Hope this helps!

Link to post

@GuiB I did restart my computer. defaults read -g NSFileViewer gives output:

The domain/default pair of (kCFPreferencesAnyApplication, NSFileViewer) does not exist

I ran that other command, restarted, and now it works when I open a directory only with Open, but it doesn't work with Reveal in Finder. Still get the output above though. Good enough for me! Thanks!

Link to post

@bivalvegruff, the output you wrote means that the preference is not set on you computer, you should see an output that only mention: org.yanex.marta


Did you sent the second command as well? ( defaults delete -g NSFileViewer ) This one is meant to be use if you want to revert back to Finder and should then give the output that you have now when writing defaults read -g NSFileViewer . You can try again with the first command only ( defaults write -g NSFileViewer -string org.yanex.marta; )


Here is what I get on my side in the Terminal:

$ defaults write -g NSFileViewer -string org.yanex.marta;
$ defaults read -g NSFileViewer


Edited by GuiB
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.

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