-
Posts
8,479 -
Joined
-
Last visited
-
Days Won
707
vitor last won the day on April 22
vitor had the most liked content!
About vitor
vitor's Achievements
Advanced Member (5/5)
2.2k
Reputation
-
sepulchra reacted to a post in a topic: Adding line numbers to selected text
-
Welcome @ryoppippi, One simple solution is to have a workflow that goes through your ~/Downloads directory and trashes all the workflows files. I’ve made a quick one for you. Call it with the cleanworkflows keyword. Feel free to inspect and modify it at will, you’ll see it’s done entirely without code. Make sure you have the Automation Tasks installed.
-
vitor reacted to a post in a topic: Importing large .csv file of snippets
-
solved Adding line numbers to selected text
vitor replied to sweetgrass's topic in Workflow Help & Questions
I’ve now added an Automation Task to output text with line counts. -
2024.5 New Tasks: Clipboard Save and RestoreNew Task: Number linesMerge to PDF: Show CG_PDF logging
-
One approach you can take is to make it so pressing ↩ appends the line to a file (tell the connection to not close on actioning) and then on ⌘↩ read the File Contents (there’s an Automation Task for that), split it on newlines, then Action in Alfred and Send to Trash (another Automation Task) the file.
-
gatto reacted to a post in a topic: ChatGPT / DALL-E - OpenAI integrations
-
@gatto It is indeed possible. See the second post for instructions on how to accomplish that.
-
Importing large .csv file of snippets
vitor replied to kltjlt6458's topic in Workflow Help & Questions
You can also invoke Alfred and type csvsnip then the name of your CSV file to import. There are several ways to this. The Usage instructions in your screenshot (and the Gallery) explain the different methods. -
Tapback Message — Add a tapback reaction to the current message
vitor replied to vitor's topic in Share your Workflows
Go to messages and click Edit → Tapback [Last] Message… Then press a number on your keyboard between 1 and 6. Messages will send the reaction according to the position in the bubble. So “thumbs up” is 2 while the question mark is 6. That’s what the workflow triggers. The flash you’re seeing is the animation being triggered then dismissed. -
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.