Mpco Posted September 12, 2018 Share Posted September 12, 2018 (edited) This workflow can list documents and apps opened recently. Especially, it can list files opened recently by the foremost app. System: macOS 10.11+ Github: https://github.com/mpco/Alfred3-workflow-recent-documents Usage You can press Enter to open the file in result, or press ⌘CMD-Enter to reveal it in Finder. Tap rr to list files opened recently by the foremost app. For example: Recent folders will be listed when Finder is foremost. Recent rtf, text files will be listed when TextEdit app is foremost. Recent *.sketch files will be listed when Sketch app is foremost. Recent *.xcodeproj project files will be listed when Xcode app is foremost. The subtitle of each result consists of ⏱modified time and ?path of the file. Tap rf to list recent folders. Opening recent folders is very common in use. Tapping rf is a more efficient way, even though you can activate Finder and then tap rr. Tap rd to list recent files. These files were recently opened by user, not like rr which is just for the foremost app. Tap ra to list apps opened recently. Exclude folders from the results. You can add private folder pathes separated by colon : to the Workflow Environment Variable ExcludedFolders. The results will not show private folders and any files inside them. For example: ~/privateFolder1/:/Users/G/privateFolder2/ Edited September 12, 2018 by QqzgpCAo Southgirl, bikeNik, Tsunami and 3 others 6 Link to comment
Tsunami Posted September 15, 2018 Share Posted September 15, 2018 (edited) Amazing! I've been looking for such a workflow for a while. Edit: For Sublime Text 3, the Auto Save Session.sublime_session file doesn't always exist. It would be nice if it could fall back to Session.sublime_session. Edited September 16, 2018 by Tsunami Link to comment
Southgirl Posted September 20, 2018 Share Posted September 20, 2018 Awesome workflow, works beautifully! Link to comment
evanfuchs Posted September 21, 2018 Share Posted September 21, 2018 (edited) Cool workflow. Thank you! Can I change the date from dd/mm to mm/dd? Edited September 21, 2018 by evanfuchs Link to comment
Mpco Posted October 26, 2018 Author Share Posted October 26, 2018 On 9/21/2018 at 10:02 PM, evanfuchs said: Cool workflow. Thank you! Can I change the date from dd/mm to mm/dd? I have changed the date format from dd/mm to mm-dd. You can update it from Github. Link to comment
evanfuchs Posted November 16, 2018 Share Posted November 16, 2018 (edited) On 10/25/2018 at 9:13 PM, QqzgpCAo said: I have changed the date format from dd/mm to mm-dd. You can update it from Github. Right on. Thanks! Edited November 16, 2018 by evanfuchs Link to comment
arunkarnati Posted April 29, 2022 Share Posted April 29, 2022 Thanks for the workflow. It works flawlessly. 🙏🏽 Link to comment
wellerpond Posted August 3, 2022 Share Posted August 3, 2022 Hi 2018! Is there an Alfred 5 version of this? Thank you! Link to comment
vitor Posted August 4, 2022 Share Posted August 4, 2022 (edited) @wellerpond The Workflow works on Alfred 5, the last release was in March. Edited August 4, 2022 by vitor Link to comment
pubay Posted October 12, 2022 Share Posted October 12, 2022 For some reason this extremely useful workflow has stopped working for me. For example, when I type “rr” I get “Restart Apple Remote Server” and when I type “rr + Space” I get “Search Google for 'rr'.” I am using the latest versions of Alfred and Monterey. Link to comment
vitor Posted October 12, 2022 Share Posted October 12, 2022 Just now, pubay said: I am using the latest versions of Alfred and Monterey. Debugging tip: never say “latest” but always the exact version. “Latest” isn‘t specific enough (latest beta, stable, pre-release?), can be wrong (auto-updater hasn’t kicked in), and makes it impossible for anyone to know if their version matches the report. To receive informed help, it is imperative to provide precise information. For anyone to have a hint of what may be going wrong, open the debugger, set the log output to “All Information”, perform the failing action, and post the output. Link to comment
pubay Posted October 12, 2022 Share Posted October 12, 2022 I am using Alfred 5.0.3 and Monterey 12.6. Here is the output from the Debugger: [09:51:40.833] Recent Documents / Apps[Script Filter] Queuing argument '(null)' [09:51:41.303] Recent Documents / Apps[Script Filter] Script with argv '(null)' finished [09:51:41.303] Recent Documents / Apps[Script Filter] {"items": [{"title": "None Recent Record for the foremost app","subtitle": "(*´・д・)?"}]} [09:51:54.466] Recent Documents / Apps[Script Filter] Queuing argument '(null)' [09:51:55.364] Recent Documents / Apps[Script Filter] Script with argv '(null)' finished [09:51:55.364] ERROR: Recent Documents / Apps[Script Filter] Code 69: You have not agreed to the Xcode license agreements, please run 'sudo xcodebuild -license' from within a Terminal window to review and agree to the Xcode license agreements. [09:51:56.557] Recent Documents / Apps[Script Filter] Queuing argument '(null)' [09:51:57.319] Recent Documents / Apps[Script Filter] Script with argv '(null)' finished [09:51:57.320] ERROR: Recent Documents / Apps[Script Filter] Code 69: You have not agreed to the Xcode license agreements, please run 'sudo xcodebuild -license' from within a Terminal window to review and agree to the Xcode license agreements. [09:56:00.602] Logging Started... Do I need to run 'sudo xcodebuild -license' in the Terminal? Link to comment
vitor Posted October 12, 2022 Share Posted October 12, 2022 Just now, pubay said: Do I need to run 'sudo xcodebuild -license' in the Terminal? Yes. You probably updated Xcode recently but haven‘t opened it yet. Link to comment
pubay Posted October 13, 2022 Share Posted October 13, 2022 I ran the command in Terminal, and now I get the following output from the Debugger (with Mellel as the foremost application): [08:49:15.307] ERROR: Recent Documents / Apps[Script Filter] Code 1: Traceback (most recent call last): File "/Users/rolfgiebel/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.29AF8104-0541-463F-AD11-1D034CDF5812/main.py", line 215, in <module> allItemsLinkList.extend(itemsLinkList) TypeError: 'NoneType' object is not iterable [08:49:15.308] Recent Documents / Apps[Script Filter] #ERROR: [Errno 1] Operation not permitted: '/Users/rolfgiebel/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.redlex.mellel5.sfl2' [08:49:15.308] ERROR: Recent Documents / Apps[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0. in JSON: #ERROR: [Errno 1] Operation not permitted: '/Users/rolfgiebel/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.redlex.mellel5.sfl2' File Search is also not working – it reverts to “Search Google for……” Link to comment
noisyneil Posted May 30 Share Posted May 30 This is my most used workflow and it stopped working for me a few months ago. I wish the Alfred team would incorporate something similar into the base features. It's so good when it works! Link to comment
Stephen_C Posted May 30 Share Posted May 30 You know that there's a Universal Action for recently opened files, don't you? If you search in Alfred for the name of an app then use your Universal Action hotkey (⌘/ by default) you should find Recent Documents… in the list. Stephen noisyneil 1 Link to comment
noisyneil Posted May 30 Share Posted May 30 (edited) Hi Stephen. Yes, and thanks for the reply. It's specifically the recent docs for the front app feature that I miss. I think it's to do with the fact that the workflow expects `.sfl2` files, but the extension seems to have been changed to `.sfl3`, which has probably also thrown the parsing off. I've had a look at `main.py`, but it's a bit over my head to be honest. EDIT: Wait, "Alfred includes over 60 default actions, such as copying to your Clipboard, saving as a Snippet, searching the web, showing recent documents for an app or extracting URLs from a block of text." I had no idea about that! I thought it was just a general recent docs thing. Unfortunately it still doesn't work for the front app; you have to explicitly action an app and then see its recent docs. Still, I might be able to use that as part of a Keyboard Maestro macro... Edited May 30 by noisyneil Link to comment
noisyneil Posted May 30 Share Posted May 30 YES! I can use that with Keyboard Maestro! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now