Jump to content


Popular Content

Showing content with the highest reputation since 03/01/2020 in all areas

  1. 4 points
    Paste text sequentially. Each time you invoke the shortcut, the previous clipboard entry will be pasted. After a set number of minutes—configured with the reset_mins Workflow Environment Variable—the shortcut will begin again with the most recent entry. Call :sequentialpasteresetcount for a manual reset. Download | Source
  2. 2 points

    OCR: extract text from snapshot

    Hi there, Just sharing my first workflow. Some OCR workflow already exist but are relying on some obscur chinese API with exposed personal credentials... This one use your system own installation of `tesseract`. Just take a snapshot and paste the text. The script usually takes no more than a few seconds. https://github.com/nicooprat/alfred-ocr PR welcome. Hope it helps!
  3. 2 points


    @codydingy I ask you to not take this the wrong way. My goal here is to help you get the help you’re asking for. Consider this: If I do something for you for free, it’s a favour from which I may bail at any time. But if you introduce $5 to the mix, it becomes a business transaction—an obligation. There’s a threshold (different for everyone) that defines when one is willing to trade freedom for money. While it’s appreciated that you offer to pay for someone’s time, there’s fewer coding tasks one would accept (and not regret) for $5 than for $0. The commitment isn’t worth it1. If you cannot afford more than $5 but would still like to contribute to whoever helps you, you’ll be better asking for it for free and sending the money as a surprise after the fact. So in this case, it may be that your good intention is backfiring. 1. There is one type of task that’s worth it. When the request is so clear and simple that we see the solution in our heads without having to look at the code. As a quick workaround, you may set a Hotkey Trigger (Action: Show Alfred; Argument: Text; Text: r in 30 minutes ). That way, when you press the hotkey you’ll have the text prepopulated and ready to go. Or you may do other connections with different Keyword Inputs, as long as you focus on the same goal. Old bug.
  4. 2 points

    COVID-19 Radar

    Hey guys, I just created a workflow for keeping track of COVID-19 statistics. Stay safe! https://github.com/xilopaint/alfred-covid-19-radar
  5. 2 points

    OCR: extract text from snapshot

    This is some insanely productive and underrated plugin. It made my note taking life 10x easier
  6. 2 points

    Sequential paste

    Done. Download at the same URL. This is a useful Workflow, I might clean it up and release properly (with icon, README, and all that) later on. No promises (busy week), but I’ll try to comment here if I do.
  7. 2 points

    File / folder Interaction

    @vitor these are configured in Alfred's Advanced prefs, you can disable "Action visible results" and also configure the "Reveal in Finder" shortcut which should work in default results and navigation. Cheers, Andrew
  8. 2 points
    I think I've found out what's going on here. Seems Apple's added yet another layer of obfuscation here with a compressed Assets.car file, which can only be read by specialized tools. Here are a few links I found about this: Reverse engineering the .car file format (compiled Asset Catalogs) steventroughtonsmith/cartool: Export images from OS X / iOS .car CoreUI archives iphone - Analysing Assets.car file in iOS - Stack Overflow insidegui/AssetCatalogTinkerer: An app that lets you open .car files and browse/extract their images. I was able to use this beta version of Asset Catalog Tinkerer to extract PNG icons from inside those archives. So now I've got a workflow (I'm dubbing it "Preferences Plus"—will post it shortly) that shows all Prefs, with their proper icons, and uses JSON Script Filter to match on the keyword metadata as well (similar to searching in the System Preferences search box...)
  9. 2 points
    Hi I would love to be able to add exclusion filters in alfred so that alfred dont index any dir named node_modules or any compiled file like*.pyc Thanks
  10. 1 point
  11. 1 point

    open finder folder as tab ??

    Hi, Glad this is still of use to you, almost 5 years later! Yup, as far as I can see from here that was the intended behavior. I just made another version which forces the tab to open in an already open Finder window even if Finder is not focused, which I guess is what you wanted? Get it here. Keyword "ioio".
  12. 1 point

    Recent files in a folder

    New version 4.0: With version 4.0 the configuration was integrated in the Workflow from List Filter. After the upgrade it is required to setup the Folder from scratch! Please ensure to write down (or Screenshot) your current configuration. Download on Git
  13. 1 point
  14. 1 point
    Alfred 4 no longer uses version suffixes on its files, so it would be com.runningwithcrayons.Alfred-Preferences with no number. No idea if what you're trying will work, though.
  15. 1 point

    create new folder

    Hi, I've uploaded it to github, see my post in this thread:
  16. 1 point

    Bluetooth Controller

    It seems bash is not finding your Python3 interpreter, so it is probably located somewhere else than where mine is. I've added a fix to search for logical placement of python interpreter, so hopefully that does it (v.1.2.3). If the fix doesn't work, make sure python3 is working (entering "python3" in terminal should suffice), as well as check where the interpreter lies ("which python"). You could also do a clean install of python3, I had a lot of different versions of python lying around, some by homebrew, and some old; and that eventually caused a lot of trouble, which was straightened out by the clean install.
  17. 1 point
    Hey guys, I've just created this handy GitHub Action to build .alfredworkflow files for your releases: https://github.com/marketplace/actions/build-an-alfred-workflow And this is the repo where I use the action: https://github.com/mperezi/alfred-yaml Hope you find it useful!
  18. 1 point
    I found that you build Icon Generator project, if it could be a workflow, it can work with folderify.
  19. 1 point
    @alfredpleb Sorry for the delay on that. I haven't released PrefsPlus (yet) ... although I am continuing to use it and it's working well (for me). I'd like to share it. Would you mind testing it out to see if it works for you before I release it widely? I could send you a link via PM.
  20. 1 point

    Recent files in a folder

    New version 3.2.2 supports sub-directory search: Download on Git
  21. 1 point
    Have you tried this workflow that can filter Excel files?
  22. 1 point
    It's the way you've set up your workflow and repo. Don't put your Ruby code in the Script box. It's a poor editor and having all your code in info.plist isn't very compatible with git. Use an external script in the workflow directory instead, and put the contents of the workflow in your repo, not just the zipped .alfredworkflow file. That way, people can clone the repo and symlink the src subdirectory to Alfred's workflow directory, making it pretty easy to make PRs.
  23. 1 point
    @Schneppi Thank you! I actually added this feature yesterday but didn't have time to publish it until now. It is now out in 1.2.0. I wish Alfred workflows were easier to collaborate on for developers... I've added the source code in a separate file so that I can take PRs in the future, if you have further improvements please open a PR.
  24. 1 point
    Replace "state" with "Country_Region" and you can search for other Countrys uri = URI("https://services1.arcgis.com/0MSEUqKaxRlEPj5g/arcgis/rest/services/ncov_cases/FeatureServer/1/query?f=json&where=Country_Region%3D'#{encoded_state}'&outFields=Confirmed,Recovered,Deaths") Maybe @atheos can add a fallback search for Country/Region if a search for the state failed? :)
  25. 1 point
    You can "ask" my Firefox workflow for the info. A tiny percentage of Alfred users (<5%).
  26. 1 point

    Alfred env variable for keyword trigger

    @deanishe I'll see what's possible for 4.1
  27. 1 point
    Hi there, is there a way to set "tab" to go to the next result (just as when you type a search into your Google Chrome search bar and then hit tab to scroll through the results) instead of having it be auto-complete? That would make it much easier to use Alfred! Having to move your right hand to reach the arrow keys to do this takes much more time than if one could use the "tab" key.
  28. 1 point
    @luckman212 That's because I haven't fixed it yet
  29. 1 point
    Technically yes, but I’ve just tried it and there’s a severe speed tax due to having to check every file for the hidden flag, so I won’t implement it.
  30. 1 point
    No, you didn't. You copied only the second half of the command. And the second time you copied an invalid part of the command. In fact, you did exactly the same thing as roccitman did on the previous page, and I explained exactly what he'd done wrong. You might have fixed your issue with the Homebrew update (which was included in the full command you were supposed to run). If not, please go back and read and follow Vítor's instructions carefully.
  31. 1 point
    Hmm I'm going to have to investigate why I made it AppleScript only in there, it may just be a completely legacy thing. I'll add a note, and if there is no significant reason, then I could likely add in arbitrary scripting.
  32. 1 point

    Help with shell script workflow

    {query} in the Notification is replaced with whatever you echo from your script. So if you put echo in the loop, it'll show all the destination paths. The simplest solution is probably to put echo -n "${fileName}" after done (the -n tells echo not to add a newline), and then select the "Last path component" option in the Notification's configuration.
  33. 1 point

    Help with shell script workflow

    for theFile in $@; do Make it for theFile in "$@"; do Or arguments may re-split on spaces. Even if Alfred takes that into account, it’s a good idea to do so anyway. outputFile=$"$HOME/Desktop/$fileName.jpg" What’s the first $ for? And use curly braces around variables, like you do in the rest of the script. Also, I recommend you use the long form of flags in scripts (-s → --setProperty), as you’ll understand them better later on. outputFile="${HOME}/Desktop/${fileName}.jpg" Finally, note that with the current implementation you may be overwriting files, which you likely want to avoid. This version will append a random number to end of the file name if the file already exists. for theFile in "${@}"; do fileName="$(basename "${theFile%.*}")" saveDir="${HOME}/Desktop" outputFile="$([[ -f "${saveDir}/${fileName}.jpg" ]] && echo "${saveDir}/${fileName}-${RANDOM}.jpg" || echo "${saveDir}/${fileName}.jpg")" sips --setProperty format jpeg --setProperty formatOptions 100 "${theFile}" --out "${outputFile}" open -a ImageOptim "${outputFile}" done
  34. 1 point
    Glad I’m not the only one having this issue, as it gives another point of reference. I’ve been experiencing something like this for a while, but across all Terminal actions, including inside Workflows. Two important differences from this report: I’m on Mojave. It doesn’t fail every time. I didn’t yet have the chance to do a deep dive and figure out the exact steps to make it fail or succeed, which is why I hadn’t mentioned it yet. Either way, my suspicion was already that the fault lies in iTerm2 itself, which has a Python API as a replacement to AppleScript and thus might not be noticing breakage in the latter. @Andrew I’ve been meaning to ask (I wanted to think a bit more about it first, but since we’re on the subject): on Alfred’s Terminal functionality, could we have other languages available in Custom? It might be wise to consider arbitrary languages due to iTerm’s Python API, but at least JXA would be a huge step. AppleScript-only is a pain, especially when considering the de fact scripts for calling iTerm2 from Alfred still have bugs and the repo is abandoned. I’d like to provide new maintained scripts to the community but it’d be easir for me to leverage the iTerm2 JXA scripts I’ve already built for other purposes.
  35. 1 point

    Hotkeys & Results of Past Queries

    There were a couple deliberate design decisions I made with this behaviour, which you've already noticed: When showing Alfred with the previously typed text, this is highlighted automatically so that it can easily be overtyped. Selection in macOS works by using ⌘C in any app, it doesn't matter the context, e.g. a textual path in Terminal will work as well as a file in Finder. For intrinsic usability, if there is a text selection at any point in Alfred's input field, ⌘C will copy this instead of the highlighted result. The selection in the hotkey you are using is disconnected from and agnostic of the underlying app, which is why it can't work like one of the built-in action modifiers. To clarify, you use the hotkey, it simulates ⌘C and uses the result. It just so happens that this also works within Alfred's own window because Alfred presents the results as copyable. To "work around" this issue, you could always press the left arrow before using your hotkey to select the file. This would move the caret to the left of the typed query (while not invoking the default right arrow actions panel), then there is no selection in the input field, allowing for ⌘C to take the selected result. As for a behaviour change, I'm not overly keen on arrow down automatically clearing the selection as suggested. This wouldn't be consistent behaviour across Alfred, and wouldn't match macOS built-in behaviour (e.g. Spotlight). This would also be inconsistent for the top result (without pressing the down arrow) vs subsequent results after pressing the down arrow and results being cleared. In your workflow, you could setup the following which would achieve what you need: Hotkey > Dispatch left arrow > Dispatch ⌘C > Delay 0.1 > Arg/Var putting {clipboard} into Argument > ... I'll have a bit of a think about some other workarounds to this issue, but it's not a common problem as I can't remember if this has come up before. Cheers, Andrew
  36. 1 point
    This workflow is now on GitHub, here: https://github.com/westerlind/alfred-raindrop-search
  37. 1 point
    It's not there at the moment, but I have been thinking of putting it there, and will probably do so within a few days. Glad you like it!
  38. 1 point
    Agreed. Or give us a shortcut so we can update without having to use the mouse. I hate my mouse... that's why I use Alfred!
  39. 1 point
    Rather then get a notification I would like an option to have Alfred update itself without my intervention.
  40. 1 point
    I've now improved the dropdown sheet for rebuilding the metadata to be more clear on the processes needed, and updated the .Spotlight-V100 path for Catalina instances too.
  41. 1 point
    I created a simple workflow that opens your personal Zoom.us meeting using your Personal Meeting ID. Quickly Launch a Zoom Meeting using your Personal Meeting ID To Get Started 1. Get your Personal Meeting ID ({personalMeetingID}) 2. Paste PMI into personalMeetingID value column ----> 3. Trigger Alfred type `zm` and press `Return` Expected Behavior * Alfred will launch Zoom.app * Alfred will spawn a new tab in Chrome * Alfred navigates to your Zoom Meeting URL * Zoom does it's thing * The Zoom Meeting URL is copied to your clipboard Note I Chose chrome, but it should work with the browser of your choice I haven't tested this without Chrome being open. https://www.dropbox.com/s/jasi3gt243s6o4y/Open Your Zoom Meeting.alfredworkflow?dl=0
  42. 1 point
    I’ve been seeing a lot of workflows that need to interact with a browser via AppleScript (usually to get a page’s url), but most of them seem to settle on a single browser (usually Safari), which is a shame. I can understand — applescript is a pain, and since each browser implements these functions however they want, finding the best way to do it with each one can be difficult, so here’s the code for most of them. The code for this may seem massive, but it is not. Read the comments to understand when to use what. You can find the latest version of this as a gist. -- AppleScript -- -- This example is meant as a simple starting point to show how to get the information in the simplest available way. -- Keep in mind that when asking for a `return` after another, only the first one will be output. -- This method is as good as its JXA counterpart. -- Google Chrome tell application "Google Chrome" to return title of active tab of front window tell application "Google Chrome" to return URL of active tab of front window -- Google Chrome Canary tell application "Google Chrome Canary" to return title of active tab of front window tell application "Google Chrome Canary" to return URL of active tab of front window -- Chromium tell application "Chromium" to return title of active tab of front window tell application "Chromium" to return URL of active tab of front window -- Opera tell application "Opera" to return title of active tab of front window tell application "Opera" to return URL of active tab of front window -- Vivaldi tell application "Vivaldi" to return title of active tab of front window tell application "Vivaldi" to return URL of active tab of front window -- Brave tell application "Brave Browser" to return title of active tab of front window tell application "Brave Browser" to return URL of active tab of front window -- Safari tell application "Safari" to return name of front document tell application "Safari" to return URL of front document -- Safari Technology Preview tell application "Safari Technology Preview" to return name of front document tell application "Safari Technology Preview" to return URL of front document -- Webkit tell application "Webkit" to return name of front document tell application "Webkit" to return URL of front document -- This example will return both the title and URL for the frontmost tab of the active browser, separated by a newline. -- Keep in mind that to be able to use a variable in `tell application` — via `using terms from` — we’re basically requiring that referenced browser to be available on the system. -- That means that to use this on "Google Chrome Canary" or "Chromium", "Google Chrome" needs to be installed. Same for other browsers. -- This method also does not exit with a non-zero exit status when the frontmost application is not a supported browser. -- For the aforementioned reasons, this method is inferior to its JXA counterpart. tell application "System Events" to set frontApp to name of first process whose frontmost is true if (frontApp = "Google Chrome") or (frontApp = "Google Chrome Canary") or (frontApp = "Chromium") or (frontApp = "Opera") or (frontApp = "Vivaldi") or (frontApp = "Brave Browser") then using terms from application "Google Chrome" tell application frontApp to set currentTabTitle to title of active tab of front window tell application frontApp to set currentTabUrl to URL of active tab of front window end using terms from else if (frontApp = "Safari") or (frontApp = "Safari Technology Preview") or (frontApp = "Webkit") then using terms from application "Safari" tell application frontApp to set currentTabTitle to name of front document tell application frontApp to set currentTabUrl to URL of front document end using terms from else return "You need a supported browser as your frontmost app" end if return currentTabUrl & "\n" & currentTabTitle // JavaScript for Automation (JXA) // // This example is meant as a simple starting point to show how to get the information in the simplest available way. // Keep in mind that when asking for a value after another, only the last one one will be output. // This method is as good as its AppleScript counterpart. // Google Chrome Application('Google Chrome').windows[0].activeTab.name() Application('Google Chrome').windows[0].activeTab.url() // Google Chrome Canary Application('Google Chrome Canary').windows[0].activeTab.name() Application('Google Chrome Canary').windows[0].activeTab.url() // Chromium Application('Chromium').windows[0].activeTab.name() Application('Chromium').windows[0].activeTab.url() // Opera Application('Opera').windows[0].activeTab.name() Application('Opera').windows[0].activeTab.url() // Vivaldi Application('Vivaldi').windows[0].activeTab.name() Application('Vivaldi').windows[0].activeTab.url() // Brave Application('Brave Browser').windows[0].activeTab.name() Application('Brave Browser').windows[0].activeTab.url() // Safari Application('Safari').documents[0].name() Application('Safari').documents[0].url() // Safari Technology Preview Application('Safari Technology Preview').documents[0].name() Application('Safari Technology Preview').documents[0].url() // Webkit Application('Webkit').documents[0].name() Application('Webkit').documents[0].url() // This example will return both the title and URL for the frontmost tab of the active browser, separated by a newline. // This method is superior to its AppleScript counterpart. It does not need a "main" browser available on the system to reuse the command on similar ones and throws a proper error code on failure. const frontmost_app_name = Application('System Events').applicationProcesses.where({ frontmost: true }).name()[0] const frontmost_app = Application(frontmost_app_name) if (['Google Chrome', 'Google Chrome Canary', 'Chromium', 'Opera', 'Vivaldi', 'Brave Browser'].indexOf(frontmost_app_name) > -1) { var current_tab_title = frontmost_app.windows[0].activeTab.name() var current_tab_url = frontmost_app.windows[0].activeTab.url() } else if (['Safari', 'Safari Technology Preview', 'Webkit'].indexOf(frontmost_app_name) > -1) { var current_tab_title = frontmost_app.documents[0].name() var current_tab_url = frontmost_app.documents[0].url() } else { throw new Error('You need a supported browser as your frontmost app') } console.log(current_tab_url + '\n' + current_tab_title) Other browsers Firefox Absent since although it’s possible to get the window’s title, it’s not possible to get its URL (it used to be, before version 3.6). It’s possible via hacky ways that consist of sending keystrokes, but those can be unreliable. This bug is being tracked in Bugzilla.
  43. 1 point
  44. 1 point

    OCR: extract text from snapshot

    Mega useful for me. Thnx. p.s. I excluded the warning message by Alfred's utility "Replace" with regex: Warning: Invalid resolution.*?\nEstimating resolution.*?\n
  45. 1 point
    @vitor pretty much sums up the reasoning behind this. Essentially, Alfred is extremely lightweight on a user's Mac, having minimal CPU and battery impact at all times. This is essentially achieved by only running the internal logic paths required which lead to the user's desired result at any one time, not running any unnecessary code. This becomes more significant when [non-native] workflows may take a decent amount of CPU or network traffic. Added to the fact that this is a rarely requested feature, it's unlikely that this will be implemented into Alfred's default results. Having said that, and having a think about this, there is one aspect I would consider. You can already create a workflow and attach it to an input filter (such as a file filter, script filter etc). At this point, it's a 1 to 1 mapping for hotkey to input filter. If there was interest, I'd look at enhancing this so that one hotkey could connect to multiple input filters, and results from all filters would be shown. This would essentially allow you to build a workflow which shows a custom version of Alfred with the specific, highly customised results you'd like. Cheers, Andrew
  46. 1 point

    Alfred with Multiple Screens

    Hi Laurent, launch Alfred's preferences to Appearance > Options and you'll be able to set Alfred to appear on default screen, mouse screen or, if you're using OS X 10.9 Mavericks, on the active screen (where your current active app is). It's all in there Cheers, Vero
  47. 1 point

    create new folder

    This should really be built into Alfred. When you're browsing the filesystem, you should be able to navigate to the directory where you want to create the file/folder and start typing the name of the new file/folder as if you were trying to navigate to it. Instead of that big useless blank space below, it could show "Create new file at <path + what you've typed so far>" as an option. To create a folder, just put a slash at the end and it'll change to say "Create new folder at <path + what you've typed>". Or you could have both options appear below at the same time to avoid having to type the slash. It could also be smart to new nested folders, so you could /just/keeping/typing/your/path and it would create all the necessary new folders.
  48. 1 point

    create new folder

    David was faster! Anyway, here is my approach considering your suggestion: Right now it works as an Alfred File Action only Select the files in Alfred browser, select “To New Folder” action then one of the 3 options below (move, copy or only create a new folder): Downlaod now
  49. 1 point

    NSApplescript vs. Run Script

    It's the latency you may see as different - the 'compiled' option will keep the AppleScript pre-compiled in memory and run immediately... so AppleScript will start to run in a fraction of a second after asking it to. Without compiling (or using Run Script with osascript), it has to compile the script before running it. On modern Macs, this is still pretty fast though.
  50. 1 point
    OK, clear, thanks Andrew! Maybe in the future it would make sense to just let the user explicitly choose this on importing (and maybe showing him which shortcut keys will be created and if there are any conflicts?)
  • Create New...