-
Posts
8,471 -
Joined
-
Last visited
-
Days Won
706
vitor last won the day on April 18
vitor had the most liked content!
About vitor
vitor's Achievements
Advanced Member (5/5)
2.2k
Reputation
-
Welcome @guppy16, You have to install the Automation Tasks.
-
Yes. Please follow the steps in the second post.
-
protonymus reacted to a post in a topic: File filter results in grid view
-
JJJJ reacted to a post in a topic: Backup Preferences — Create and restore Alfred Preferences backups
-
Backup Preferences — Create and restore Alfred Preferences backups
vitor replied to vitor's topic in Share your Workflows
That would add a bit of complexity and I worry might lead to foot guns. macOS launchd agents don’t run if your computer is turned off, so I’d hate for someone to not have a backup at a crucial time because the last one happened to be at an unlucky time and then the one they have is two weeks old or more. That’s why a time can be configured. The versioning is a secondary concern, the focus of the workflow is the backup. You could instead reduce the number of backed up versions. If by any reason you need an older version at some point, the last 30 days of them should be available to recover. -
vitor reacted to a post in a topic: Alfred 5.5.2257 remove workflow not working with iCloud
-
sepulchra reacted to a post in a topic: Simple Ideas: chewing the FAT (Universal Actions for files)
-
Simple Ideas: chewing the FAT (Universal Actions for files)
vitor replied to Stephen_C's topic in Workflow Help & Questions
And so incredibly simple. A contender for the shortest code: /bin/cat "${@}". -
vitor reacted to a post in a topic: Simple Ideas: chewing the FAT (Universal Actions for files)
-
Alfred 5.5.2257 remove workflow not working with iCloud
vitor replied to Silas's topic in Bug Reports
It’s important to reiterate that Alfred’s Preferences are essentially a folder bundle of files. Alfred needs those files to be available at all times, and if a sync service is doing something funky to them or purging them, there’s only so much that can be done. iCloud Drive in particular has historically been unreliable (and Sonoma 14.4 in particular brought new bugs) which is why Alfred warns about it when setting it as the sync location. When disabling Optimise Mac Storage, make sure you wait before trying again, because it can take a while to download what you have online. You should also reboot your Mac, because the iCloud daemon can be unreliable. Also note you can backup your preferences with a workflow which allows you to keep you settings local while also periodically saving them to cloud storage. -
Stephen_C reacted to a post in a topic: Simple ideas: opening a frequently used folder
-
Simple ideas: opening a frequently used folder
vitor replied to Stephen_C's topic in Workflow Help & Questions
I’ll ask that we please not bring more separate discussions into this thread, which is supposed to be about one Simple Idea that Stephen is kindly sharing with the community. Words of appreciation and requests for clarifications are certainly welcome, but (especially) since this post is part of a larger collection I’d rather we don’t derail it further. I’ve posted a reply on the other post. -
There is not, by design¹. Think about that interface: you’d be typing something in Alfred and then the whole interface would change from under you to something different, and then you wouldn’t be able to continue typing to something else or go back² or else you would be able to do that but not filter in the view and have the interface going back and forth. The new views are separate paradigms, and to allow their full potential there can’t be ambiguity. That said, while showing all files would have major performance implications, listing a specific file type is more doable. All you need is a Run Script Action before the Grid View set to /usr/bin/swift as the Language with this code (quick adaptation from another workflow): import Foundation // Change this to what you want to search let query = "kMDItemContentType == com.adobe.pdf" // LEAVE UNTOUCHED FROM HERE // Prepare query let searchQuery = MDQueryCreate(kCFAllocatorDefault, query as CFString, nil, nil) MDQuerySetSearchScope(searchQuery, [("~" as NSString).expandingTildeInPath] as CFArray, 0) // Run query MDQueryExecute(searchQuery, CFOptionFlags(kMDQuerySynchronous.rawValue)) let resultCount = MDQueryGetResultCount(searchQuery) // No results guard resultCount > 0 else { print( """ {\"items\":[{\"title\":\"No Results\", \"subtitle\":\"No paths found matching query\", \"valid\":false}]} """ ) exit(EXIT_SUCCESS) } // Prepare items struct ScriptFilterItem: Codable { let uid: String let title: String let subtitle: String let type: String let icon: FileIcon let arg: String struct FileIcon: Codable { let path: String } } let sfItems: [ScriptFilterItem] = (0..<resultCount).compactMap { resultIndex in let rawPointer = MDQueryGetResultAtIndex(searchQuery, resultIndex) let resultItem = Unmanaged<MDItem>.fromOpaque(rawPointer!).takeUnretainedValue() guard let resultPath = MDItemCopyAttribute(resultItem, kMDItemPath) as? String else { return nil } return ScriptFilterItem( uid: resultPath, title: URL(fileURLWithPath: resultPath).lastPathComponent, subtitle: (resultPath as NSString).abbreviatingWithTildeInPath, type: "file", icon: ScriptFilterItem.FileIcon(path: resultPath), arg: resultPath ) } // Output JSON let jsonData = try JSONEncoder().encode(["items": sfItems]) print(String(data: jsonData, encoding: .utf8)!) All you need to do is change the text between quotes at the query line near the top. Currently it’s set for PDFs; PNGs would be public.png. Other file types are left as an exercise to the reader, but here’s a list. ¹ Technically you can, by using something like a Hotkey, but I don’t think that’s what you mean. You could also fudge it with an External Trigger, which I do not recommend at all. ² Because how would Alfred know if you were refining the input in the new view or changing to another one.
-
With the caveat that this isn’t a secure way to encrypt sensitive data (I know you understand that, I just want to hammer the point for people arriving to this issue later), a dead-simple way to do it would be to encode as Base64. Use a Universal Action connected to a Run Script Action connected to a Copy to Clipboard Output set to paste to the frontmost app. Then duplicate all that. You’ll use one set for encoding and the other for decoding. The only change is what the Run Script will contain. In the one to encode, set the code to /usr/bin/base64 <<< "${1}". In the one to decode, set it to /usr/bin/base64 --decode <<< "${1}". Done. You can see the Getting Started Guide for an interactive tutorial on making a workflow.
-
solved Retain User Input After Deselecting Alfred Window
vitor replied to zachbear's topic in Discussion & Help
Welcome @zachbear, What you’re looking for is under Alfred Preferences → Advanced → History. Turn on both options. -
In the app, yes, but not via shortcuts which is what matters for automation. That’s a feature request you have to make to Apple. You can use the Feedback Assistant app on macOS to do so.
-
Alan He reacted to a post in a topic: Paste/Insert text/snippets without using the clipboard in remote desktop (RDP)
-
ebleble reacted to a post in a topic: Regular expressions support for file search
-
ebleble reacted to a post in a topic: Regular expressions support for file search
-
What you seem to be looking for is fuzzy finding. FZF is a community workflow for that.
-
Alan He reacted to a post in a topic: How find snippet in my Collections?
-
That’s not available, but you can copy the output (or just the last answer) with the shortcuts listed at the bottom See the first item in the FAQ.
-
iJemz reacted to a post in a topic: Create a long list of snippets and use fuzzy matching to search them
-
Welcome @ebleble, Alfred uses the Spotlight metadata. You don’t need glob patterns (regular expressions are similar but distinct) and can just type somephrase pdf or pdf.
-
In Alfred Preferences → Features → Snippets, you can add a Hotkey for the Viewer which allows you to search. Alternatively: Alfred Preferences → Features → Clipboard History → Snippets.