Jump to content

Listing directories opened with Alfred

Recommended Posts

I find the 'Recent Places' list (in the drop-down menu of save dialogs) very useful. However, I'd like to extend it to include directories I've recently opened with Alfred. To do so I need to know which directories Alfred has opened.


Is there either:

1) An 'on directory open' hook in Alfred that I could tap into, or 

2) A list of directories recently opened by Alfred somewhere that I can read?


Please note I only want directories opened with Alfred, not ones opened by double-clicking in the Finder.

Edited by sirdavidoff
Link to comment
48 minutes ago, sirdavidoff said:

Is there either


No and no. Depending on how you open folders with Alfred, you might be able to make your own list with a workflow (for example, I almost always use a Filter Filter with keyword f for folder search, so I could easily add an additional element to save the path).


But even assuming that's viable for you, how are you going to get the directory paths out of your list and into the Recent Places list?


You can't just add them to ~/Library/Preferences/.GlobalPreferences.plist. That doesn't work.

Link to comment

Ah, but you can edit the Recent Places list!

defaults write -g NSNavRecentPlaces = '("/test","/test2","/test3")'


However, it seems that even a file filter wouldn't work if I then navigate the filesystem with the arrow keys in Alfred, which I do quite a lot :(

Edited by sirdavidoff
Link to comment

No, I mean exactly the same thing.


On my system, changes to NSNavRecentPlaces from a terminal are not seen by running apps, which is exactly the behaviour I would expect to see, as you're always told to quit running apps before messing with their settings, or the changes won't be noticed.

Link to comment

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