Jump to content


Popular Content

Showing most liked content since 08/23/2017 in all areas

  1. 3 points

    Workflow Library for Python

  2. 3 points
    Updated for Notificator 1.2.0. Also shortened the default update interval to 4 days. If you already use OneUpdater in any Workflow, there’s no need to do anything.
  3. 3 points

    Open Alfred file actioning from CLI

    The Alfred 3.5 pre-release adds new 'browse' and 'action' alongside the 'search' AppleScript commands. Use search to populate Alfred's search field. Use browse to populate Alfred's file system navigation path. Use action to show the actions panel for the given file. Cheers, Andrew
  4. 2 points


    AwGo — A Go library for Alfred workflows Full-featured library to build lightning-fast workflows in a jiffy. https://github.com/deanishe/awgo Features Easy access to Alfred context, such as data and cache directories. Straightforward generation of Alfred JSON feedback. Support for all applicable Alfred features up to v3.5. Fuzzy sorting/filtering. Simple API for caching/saving workflow data. Catches panics, logs stack trace and shows user an error message. Workflow updates API with built-in support for GitHub releases. Built-in logging for easier debugging. "Magic" queries/actions for simplified development and user support. macOS system icons. Installation & usage Install AwGo with: go get -u github.com/deanishe/awgo/... Typically, you'd call your program's main entry point via Run(). This way, the library will rescue any panic, log the stack trace and show an error message to the user in Alfred. program.go: package main import "github.com/deanishe/awgo" // Package is called aw func run() { // Your workflow starts here aw.NewItem("First result!") aw.SendFeedback() } func main() { aw.Run(run) } In the Script Filter's Script box (Language = /bin/bash with input as argv): ./program "$1" Documentation Read the docs on GoDoc. Check out the example workflows (docs), which show how to use AwGo. Use one as a template to get your own workflow up and running quickly. Running/testing The library, and therefore the unit tests, rely on being run in an Alfred-like environment, as they pull configuration options from environment variables (which are set by Alfred). As such, you must source the env.sh script in the project root or run unit tests via the run-tests.sh script (which sources env.sh then calls go test). Licensing & thanks This library is released under the MIT licence. The icon is based on the Go Gopher by Renee French.
  5. 2 points
    @nikivi Alfred doesn't know when your script will return with results, and any change to the default behaviour will inevitably cause undesirable behaviour. Don't forget that you have full control over dynamic configuration of objects though... why not add a JSON Config utility between the hotkey trigger and the script filter to just set the titles to nothing. For example, something like this: You'll probably want to pass through the arg too... set the configuration as something like this: { "alfredworkflow" : { "arg" : "{query}", "config" : { "title" : "", "runningsubtext" : "", "subtext" : "", }, } } Cheers, Andrew
  6. 2 points
  7. 2 points

    Browse Reddit

    Well, that was easier than expected. v1.6 supports multireddits properly (i.e. it remembers them) and user multis. User multis work like this: r/u/<username>/m/<multi>/[<query>]
  8. 2 points

    Browse Reddit

    Oo. It even expands to search for threads inside the subreddit. That's so awesome. Much speed.
  9. 2 points
    Done. Should now be much faster for filtering subreddits (though not fetching posts).
  10. 2 points
    Would it take a lot of work to include other chromium-based browsers (I'm a happy Vivaldi user)? Thanks for this excellent workflow anyway.
  11. 2 points
    A JXA-based workflow for Alfred 3 users to quickly switch between or close iTerm windows, tabs and panes based on title and tty, or trigger your preferred ssh workflow when no open session is found (supports both isometry/alfred-ssh and deanishe/alfred-ssh). GitHub: https://github.com/isometry/alfred-tty Latest Release: https://github.com/isometry/alfred-tty/releases/latest Usage Trigger the workflow with the keyword tty or via hotkey followed by some characters from the title of an open window, tab or pane; press Enter to activate the selected window/tab/pane, Alt-Enter to close it, or Cmd-Enter to trigger your ssh workflow. For example, enter tty as3 to switch to a tab with the title user@azure-server-03. If no active terminal matches, or you use the Cmd-modifier, trigger your preferred ssh workflow, e.g. ⇄ ssh as3. By default, the ssh workflow is assumed to be net.isometry.alfred.ssh (i.e. isometry/alfred.ssh, version 2.3+). Override by setting the ssh_workflow and ssh_trigger variables; for deanish/alfred-ssh, set the ssh_workflow variable to net.deanishe.alfred-ssh. In order to make working with more than one window/tab/pane with the same title easier, the tty is displayed beneath the result, and can be provided as a second argument to the trigger. For example, enter tty lo 3 to select the the session with title localhost running on /dev/ttys003. To select by tty alone, use two spaces between the trigger and the tty number. For example, tty 4 will select /dev/ttys004. Optionally associate a hotkey trigger to further accelerate operation, e.g. Ctrl+Cmd+T, or change the trigger word via the keyword variable. Combine with an iTerm2 profile configured as ssh protocol handler (e.g. Name:=$$USER$$@$$HOST$$, Command:=$$ and Schemes handled:=ssh) and an alfred-ssh workflow to make opening and jumping between remote sessions across many windows, tabs and panes easy.
  12. 2 points
    Great. v1.2 is now released with extra snappy.
  13. 2 points

    Menu Search

    Hi guys. I've created a new version of this workflow with some improvements. * Instead of a keyword I'm using a hotkey to trigger the workflow. I prefer CMD+SHIFT+SPACE but this is configurable. * Instead of filtering in ruby I'm using Alfred's Script Filter. * I've upgraded menudump to support Alfred's Script Filter JSON Format (https://github.com/ascandroli/menudump) * I'm using the new "match" field to match against parent menus too. (requires Alfred 3.5) Using Alfred's Script Filter JSON Format makes this workflow very fast. Please take a look and let me know what you think: https://github.com/ascandroli/menudump/releases/download/1.8.0/Menu.Bar.Search-v1_8.alfredworkflow Cheers. Alejandro.
  14. 2 points

    Open Alfred file actioning from CLI

    @GuiB Yep no probs, I've updated it to accept one or more files for the next release Also, interesting what @deanishe said - For some reason, I was fully resolving paths and symlinks on the receiving code. I've changed that to just standardise paths instead (i.e. resolve ~/).
  15. 2 points
    If you update to the 3.5 pre-release, you'll find the new Bookmarks feature in Alfred's Feature preferences. Note that at this point, Google Chrome is default profile only. Let me know how you get on Cheers, Andrew
  16. 2 points
    Version 7.4 is now available with Spotify Connect support 🎉, see http://alfred-spotify-mini-player.com/articles/spotify-connect/ (premium users only)
  17. 2 points
    That seems an excessively complex solution. Can't you just use /usr/local/bin/insect? FWIW, whether or not your shell can find insect isn't super helpful. Alfred doesn't use your shell's environment. The best solution is to bundle the dependencies in your workflow. This isn't a perfect solution with Node-based workflows, as you still have to install Node, but the workflow will at least "Just Work" for people who have Node installed without them having to install an extra bunch of stuff just for your workflow. On every Mac they have. Also, installing dependencies globally is a fundamentally bad idea, and should be avoided if possible.
  18. 2 points
    @GuiB gave some solutions, but didn't explain what the root cause of the problem is. (Excuse me if this explanation comes across as for-idiots or patronising: I'm aiming to explain this just once and link to it in future, so I'm writing this for total noobs.) macOS is basically a UNIX system with Cool Apple Shit layered on top. Alfred itself exists in the Cool Apple Shit layer, but workflows are at the lower UNIX level. This means they must, essentially, be UNIX programs. As such, an External Script element can only run a UNIX executable, which is to say something you can run from a shell. Concretely, that means the execute bit must be set (run chmod +x /path/to/script in a shell), but also that it must be a UNIX program or a script with a shebang. AppleScript, as the name implies, belongs to the higher Cool Apple Shit layer (though AppleScript is pretty damn far from cool), and as a result you can't run it directly via the UNIX subsystem. Fortunately, Apple has written a bunch of programs to access the Cool Apple Shit from the underlying UNIX layer. As @GuiB explained, the one you need to run AppleScript scripts from the UNIX layer is osascript. But there are other super-cool ones, like security, which provides access to the macOS Keychain, and mdfind, which lets you run Spotlight queries from the command line/scripts/workflows.
  19. 1 point
    @derBingle That method seems fine, but I won’t add it to the list because it’s a bit hackish. For it to be added to the gist, it needs to be part of the app’s AppleScript dictionary and have both URL and page title support.
  20. 1 point
    Looks like you might benefit from EVE more than from your current setup. But if you still want to go with your original idea, what you can do is save a .txt file and then tell Alfred to quicklook it. A Run Script with qlmanage -p /path/to/your/file should suffice.
  21. 1 point
    @Xavez I just noticed in the metadata that it's marked as a system file which Alfred ignores by default. Try this workflow with keyword 'ishare' which should find system files in the shared folder. I've tested it and it seems to work as expected: https://www.dropbox.com/s/6vmv9ofusqzb6gh/Search Shared iCloud.alfredworkflow?dl=0 Cheers, Andrew
  22. 1 point
    @Mike Outram Nothing out of the ordinary in that respect (as far as I can recall setting up, at least!) Perhaps pop by the official IPBoard forum to see whether anything can be done to increase the session time. Cheers, Vero
  23. 1 point

    Writing Alfred Workflows in Go

    It is changed. 🙂
  24. 1 point
    Haha! The Germans do that a lot, too. Almost none of them realise Mission: Impossible is based on a TV show, 'cos it was called "Take over, Cobra" here. And, there are about ten shows called "<name of main character> für alle Fälle". What a creative bunch they are.
  25. 1 point
    Here’s an example from a Workflow whose “Alfred filters results” is checked in the Script Filter, and no results are found: And here’s the result from a Workflow whose “Alfred filters results” is unchecked in the Script Filter, and no results are found: In the second case I’ve added a conditional that, when no results are found, produces a single invalid (can’t be actioned) result, informing the user. To me, this is an important feature because it: Informs the user their command ran successfully. Informs the user what was the query that ran. This is particularly useful when queries are slow to run (contacting a server) and you’re not sure if it’s failing for the previous query (so you should wait), or the latest one. In contrast, the first example is indistinguishable from a Workflow error. Sometimes when I get that result I purposefully type something else or check the debugger on my own Workflows to make sure nothing is broken. So my feature request: when “Alfred filters results” is checked in a Script Filter and it produces no results, output a message informing the user. Something generic like ““{{whatever query}}” produced no results” would suffice.
  26. 1 point
    Yes it does. Btw, it's a case in which the translation was made literally. In most cases the "translation" for the Brazilian market gives some really stupid titles to the movies. "The Hangover", for example, was translated as "If you drink, don't get marry". "Lost in Translation" was translated as something like "Matches and Mismatches" (the idiot was literally lost in translation). They have to "translate" even a title that is a character's name like "Annie Hall", "translated" in Brazil as "Neurotic fiance, nervous bride". A ~tech related~ case is "Fear Dot Com", translated to Brazil as "Fear Dot Com Br" (yes, as it were not enough ridiculous adding the "Br", the genius forgot to include one more "Dot" to make "Dot Com Dot Br"). So I think you don't have much to complain about the English movie titles. lol
  27. 1 point

    Show App version number?

    Thanks @vitor it works great for my needs
  28. 1 point
    Call av and a list of your top-level apps at /Applications with their version numbers will be shown. Action any of them and the version number will be copied to the clipboard. If the app you want to check the version of is located anywhere else, you can find it and use the File Action on it for the same effect. This will also show the version as Large Type. Download | Source
  29. 1 point
    Can it be a word? If you try canalizador you will have mostly plumber related videos in pt-PT results and mostly random results in pt-BR. If you type the letter v, PT-pt results will display a hip hop Portuguese singer in the first result: But not in pt-BR in which a trending Brazilian song (a terrible one) is displayed in first place:
  30. 1 point

    Alfred not opening Word or Excel

    Hi @CincyTriGuy If the apps are installed normally but not found, it's likely that the apps aren't correctly indexed by your Mac's metadata index. Open Spotlight's Privacy tab, drag the Applications folder in, then wait 30 seconds. Drag it back out of Privacy, and wait another 30 seconds. Type "reload" into Alfred to refresh the application cache, and you should be able to then find your apps. If this doesn't resolve the issue for you, please take a look at our troubleshooting guide here: https://www.alfredapp.com/help/troubleshooting/indexing/ Cheers, Vero
  31. 1 point
    I've looked into this, and setting a location and radius for the Place search should get you the results you want. I've pushed an updated version to the develop branch with GOOGLE_PLACES_LOCATION and GOOGLE_PLACES_RADIUS options in the workflow configuration sheet. You must set both for it to work, and the location must be in decimal format, e.g. 51.450833,7.013056, and the radius is in metres. You must also delete your existing search and re-add it (or edit the config by hand to add the parameters to the URL). You can delete the search via the searchio command (it shows an error, as the feature isn't complete, but it does delete the configuration), or you can remove it by hand by entering searchio workflow:opendata and removing the corresponding file(s) from the searches directory.
  32. 1 point

    Quit Application Workflow

    Sorry about that, my guess is it has to do with dropbox stopping the 'Public' folder stuff, but the url has been updated. And just for ease of clicking, here you go. https://www.dropbox.com/s/0lucbk6g12ulvvg/Quit Other Applications.alfredworkflow
  33. 1 point

    Menu Search

    This is really awesome. I've been using KeyClue before but this is a bit faster. Thank you for sharing it.
  34. 1 point
    @nikivi If you uncheck contacts from the Default Results, you shouldn't be seeing them in your results. Can you check what your prefs are set to in Default Results (check Advanced to ensure you didn't add in anything manually), and in Contacts > Advanced? Alternatively, there could be some bad metadata, so take a look at the mdls for files that are appearing when they shouldn't. Cheers, Vero
  35. 1 point
    You shouldn't use the settings API because each Workflow instance assumes it's the only one accessing the settings.json file and will overwrite changes made by other instances/processes running at the same time. It's a bad choice anyway: the settings are persistent data, meant to be kept as long as the workflow is installed. Such data very clearly belong in the cache directory. It's not as if Workflow.cache_data() is any harder to use.
  36. 1 point
    Yup. Writing the status to a file is probably the best way. Another possibility is to start a server for your Script Filter to fetch the status from, but that seems like overkill.
  37. 1 point
  38. 1 point
    Yep, after some testing, it seems to be working great! Thanks again @Andrew for all your work!
  39. 1 point
    Yes, things seems to work great after some testing by configuring the File Filter object using the JSON object before! Again, thanks @Andrew!
  40. 1 point

    Alfred Neue (light and dark)

    Welcome, @plethorum, A few tips: You don’t need to post screenshots as links. Simply post the direct link to the image, and it’ll be integrated in the post. Instead of sharing a downloadable of the theme, right click it on Alfred Preferences and pick shareonalfredapp.com.
  41. 1 point
    You can't use a variable in a Terminal Command. The way Run Script and Script Filters work is that Alfred replaces {query} in the script you've entered, and then passes the script to whichever shell or interpreter you've specified (bash, zsh, Python etc.). Workflow variables are passed as environment variables to the interpreter process itself when Alfred runs it. That can't work in a Terminal Command, as your script is executed in a shell run by Terminal or iTerm where your workflow variables don't exist, not one started by Alfred with your workflow's context. So all you get is the {query} text macro. If you want to use variables in a Terminal Command, you'll have to use a Run Script action—where your variables do exist—to generate the script to be passed to Terminal/iTerm.
  42. 1 point
    Interesting, and a simple logic issue to fix in Alfred's framework. Essentially, when deciding if Alfred's window should close, I hadn't taken into account a mod override with no matching mod connection needing to use the default connection "don't close" state. The reason this is manifesting when using quicklook is a little more bizarre. It looks like macOS shifts the focus differently after QuickLook which means when Alfred is hiding for a fraction of a second after using quicklook (because the logic above was broken), the timing prevents Alfred from continuing to be visible. Either way, nicely spotted @GuiB - this will be sorted in the next pre-release! Cheers, Andrew
  43. 1 point
    I deliberately left the "shebang" comment as an exercise for the reader (I didn't want to get into the details of UNIX scripting). Now we've gone there, I guess we need to mention that Alfred runs your scripts in its own, empty environment, not your shell's.
  44. 1 point
    @deanishe Making this comment since you mentioned you wanted to make the post clear for newbies and link to it in the future. I’d expand a bit more on that. For example: “which is to say something you can run from a shell (the command-line interface that the Terminal app uses to run commands)”. I’d link to an explanation of what a shebang is.
  45. 1 point
    tl;dr: A new Alfred workflow to launch Zapier workflows from your keyboard. Ever wanted a quicker way to add data to your web apps? Say you get an email from a potential customer, and you want to add them as a new lead to your CRM. You have to copy their email address, open your CRM app in your browser, find your Lead page, open the Add Lead page, and finally paste in the info. Or if you wanted to find more details about a contact—perhaps to see what products they've bought from your store, or their last email to your support team, or the notes you wrote about your last call with them—you'd need to open a handful of other apps and search in each one manually. Personally, I wanted a simpler way to send template emails. I wanted to enter a contact's name in Alfred and have it find details about the contact in address book, then make a new draft email to them. That's why I made this Zapier for Alfred workflow. Zapier's to web apps what Alfred is to your Mac—it connects 750+ web apps (including Evernote, Salesforce, Shopify, Gmail, PayPal, and much more) so you can build workflows and automate tasks. And with Zapier for Alfred, you can start those workflows from your Mac's keyboard. Everyone will have a different use case, but the core workflow works the same. You'll make a Zapier workflow, and connect it to your Zapier for Alfred workflow in Alfred. Then, to run it, you'll enter some text into Alfred, and this workflow will send it to your Zap to kick off the online workflow you made. Then you can get the results back to your Mac in a Pushbullet notification, email, Dropbox file, or even an SMS message in Messages. Download Zapier for Alfred here, or check out our launch blog post for more details. Looking forward to hearing how you use Zapier with Alfred!
  46. 1 point

    Quit Application Workflow

    No one seemed to need this, but after reformatting I found I needed it, so I was glad to have it here. So that's why I'm updating it now, and saving it here in case I need it again. I've tweaked the way the keyword works because I was annoyed at having to remember 'Alfred 3' instead of 'alfred', or something like that. The script now gets a list of running apps and does a regex to match query+"([^,]*)" so you don't have to enter the whole thing, and it grabs the first example. So err on the side of writing more of the name, because just entering "A" probably won't get what you want.
  47. 1 point

    Time Stamp Workflow

    I just added workflow snippets to my Time Stamp Workflow and noticed that I had never shared it. So, here it is. You can use "ts:stamp" to list the pre-defined date/time stamp format and paste the current date/time into the top application. Or, you can use the "ts:build" to build your own date/time stamp to add to the list. I also have several predefined snippets: ;tsl = the current date/time using the last select date/time stamp. ;ed = the current date/time in the mm/dd/yyyy format. ;dow = the current day of the week. ;nsu - the next Sunday date using the last select date/time stamp. ;nmo - the next Monday date using the last select date/time stamp. ;ntu - the next Tuesday date using the last select date/time stamp. ;nwe - the next Wednesday date using the last select date/time stamp. ;nth - the next Thursday date using the last select date/time stamp. ;nfr - the next Friday date using the last select date/time stamp. ;nsa - the next Saturday date using the last select date/time stamp. My GitHub: https://github.com/raguay/MyAlfred Packal: http://www.packal.org/workflow/time-stamp-workflow
  48. 1 point

    EggTimer v2 [updated to 2.0 final]

    It looks like this is unmaintained, so I took the latest release, made the tweaks to suit Alfred 3 and stuck it on GitHub. Grab it at https://github.com/ihowson/EggTimer2/releases/tag/v1.0.0
  49. 1 point

    Remote Desktop

    Hi i submitted a PR, to update the icon to the newest version.
  50. 1 point

    Workflow for Muting mic in Facetime

    Both links were dead, so if anyone after me is still looking, here's a workflow to toggle mic volume between 0 and 100 via a hotkey: https://github.com/russmatney/alfred-workflows/blob/master/Toggle%20Mic%20Mute.alfredworkflow code from http://superuser.com/a/397770/293352