Jump to content


Popular Content

Showing content with the highest reputation since 05/24/2018 in all areas

  1. 2 points

    Autocomplete words from a textfile?

    Write in Markdown and then convert it to BBCode using one of @vitor's workflows: MarkdownTransform.
  2. 2 points
    Update. Added support to download audio. It also works with downloading a full playlist as audio, but it does not include and option to add to WatchList automatically due to a limitation in youtube-dl where getting the filename for audio is not accurate. Also changed the way downloading a playlist works. It now downloads everything into it’s own directory. It’s more organised and interfaces better with WatchList. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater.
  3. 1 point
    Type bt to toggle bluetooth and its menu bar icon. Optionally give it a number to toggle, wait that number of minutes, and toggle back. Download | Source
  4. 1 point
    Introduction Alfred workflows are simply zipped directories with an altered extension. Those are great news if you want to automate packaging your workflows for distribution, as you can simply (using ditto in this example, but zip would work just as well): ditto -ck "{{/path/to/your/workflow_directory}}" "{{/path/to/your/output_file}}.alfredworkflow" And that’s it. A zipped directory of your workflow with the custom .alfredworkflow extension. Names enclosed in double curly brackets are examples (they dependend on your situation and must be edited accordingly). Problem The trouble with that solution is that it packages your workflow as it is. Most of the time that won’t be a problem, but it becomes one when you have Workflow Environment Variables with “Don't Export” activated. Alfred knows not to save the value of those variables when exporting your workflow, but your zipping utility does not. Because of that, if you want to package your workflow yourself you need to set those variables (and only those) to empty values. Solution # You need only set these two variables, and the rest will work as is readonly workflow_dir="{{/path/to/your/workflow_directory}}" readonly output_file="{{/path/to/your/output_file}}.alfredworkflow" if /usr/libexec/PlistBuddy -c 'Print variablesdontexport' "${workflow_dir}/info.plist" &> /dev/null; then readonly workflow_dir_to_package="$(mktemp -d)" cp -R "${workflow_dir}/"* "${workflow_dir_to_package}" readonly tmp_info_plist="${workflow_dir_to_package}/info.plist" /usr/libexec/PlistBuddy -c 'print variablesdontexport' "${tmp_info_plist}" | grep ' ' | sed -E 's/ {4}//' | xargs -I {} /usr/libexec/PlistBuddy -c "set variables:'{}' ''" "${tmp_info_plist}" else readonly workflow_dir_to_package="${workflow_dir}" fi ditto -ck "${workflow_dir_to_package}" "${workflow_file}" So, what does this do? Check the info.plist in your workflow directory for the variablesdontexport property. If the property does not exist, package your workflow directory without any modifications. Our work is done. If the property exists, copy your entire workflow to a temporary directory (we’ll make changes to the info.plist and don’t want to do them on our current one). Check every variable in variablesdontexport and set them to empty values in the info.plist of the copied directory (we don’t want to outright delete the variables as the reference would be lost as well). Package the copied directory. Our work is done. Solution as a script #!/bin/bash readonly workflow_dir="${1}" readonly info_plist="${workflow_dir}/info.plist" if [[ "$#" -ne 1 ]] || [[ ! -f "${info_plist}" ]]; then echo 'You need to give this script a single argument: the path to a valid workflow directory.' exit 1 fi readonly workflow_name="$(/usr/libexec/PlistBuddy -c 'print name' "${info_plist}")" readonly workflow_file="${HOME}/Desktop/${workflow_name}.alfredworkflow" if /usr/libexec/PlistBuddy -c 'print variablesdontexport' "${info_plist}" &> /dev/null; then readonly workflow_dir_to_package="$(mktemp -d)" cp -R "${workflow_dir}/"* "${workflow_dir_to_package}" readonly tmp_info_plist="${workflow_dir_to_package}/info.plist" /usr/libexec/PlistBuddy -c 'Print variablesdontexport' "${tmp_info_plist}" | grep ' ' | sed -E 's/ {4}//' | xargs -I {} /usr/libexec/PlistBuddy -c "Set variables:'{}' ''" "${tmp_info_plist}" else readonly workflow_dir_to_package="${workflow_dir}" fi ditto -ck "${workflow_dir_to_package}" "${workflow_file}" echo "Exported worflow to ${workflow_file}." To use that script, give it a single argument: the path to the workflow you want to package. It’ll save it to the Desktop with the name automatically determined.
  5. 1 point
    It's in the log: 09:53:04 search.go:57: query= You aren't actually setting query anywhere. You declare it in main.go, but never do query = os.Args[1], so query is always empty. You're right that Kingpin is unnecessary, but the command-line arguments still need to be handled by something. The other workflow has the "Alfred filters results" option set, which is why that one works.
  6. 1 point

    How to learn to write workflows?

    The Alfred docs are limited to the workflow-y bits. The rest of building a workflow is UNIX command-line programming. Realistically, that's way beyond the scope of Alfred's docs, as it's a very broad topic. There are fundamentals that apply across languages, like environment variables, STDIN, STDOUT & STDERR and ARGV (command-line arguments), but really you should be off learning how to write Python or Ruby (or Swift). Swift is a fine language—with several advantages on the Mac over non-Apple languages—and runs fast. You could use just about any language, however, and I'm not sure I'd recommend Swift as a first language (unless you want to write Mac/iOS apps): the language itself is a good one, but Apple's (Mac) libraries that it uses are complicated and badly documented. Indeed, the docs are similar in nature to Alfred's: they're great if you already know what's going on and not much help at all if you don't… You get much more done more quickly with a language like Ruby or Python, and they're more flexible, too. Python in particular is a great first language with lots of docs aimed at beginners. Unfortunately, Apple ships a really old version of Python 2, not the current Python 3, and there are some important differences between the two. I'm not sure I'd recommend learning Python 2 at this point (it's dead). As regards a workflow to manage your NordVPN connections, is this OpenVPN workflow no good? If you want their IKEv2 VPN, you'll need to use Apple's APIs to manipulate your network settings. That can be done with AppleScript or Swift. AppleScript is probably a lot easier, if it's capable of what you need. Swift uses much lower-level APIs and will be much harder to use. Here's an AppleScript to connect to a VPN via Network Preferences.
  7. 1 point

    Open a new safari window

    Basically, your script from this post reply here: if you incorporate my suggested modifications, would now look like this: on alfred_script(q) tell application "Safari" activate make new document with properties {URL:"https://www.apple.com"} my new_tab("https://www.google.com") my new_tab("https://stackoverflow.com") end tell end alfred_script on new_tab(www) tell application "Safari" to tell the front window to ¬ set the current tab to make new tab ¬ with properties {URL:www} end new_tab
  8. 1 point
    You just have to look at the source code for the search form and translate the form parameters into URL parameters. (And hope the search page also accepts the parameters that way.) It just requires basic knowledge of HTML and HTTP. I make the screengrabs with a program called LICEcap: https://www.cockos.com/licecap/
  9. 1 point

    Autocomplete words from a textfile?

    Right-click the Workflow name on the list and do “Open in Finder.”
  10. 1 point
    Here you are. I've tried to extract the titles, too. You should be able to search on the title or the citekey, and then use ↩ to copy the citekey or ⌘↩ to copy the citekey and paste it into the active application. You have to set the path to your BibTeX file in the workflow's configuration screen (it's currently pointing at the included sample file):
  11. 1 point
    That's not enough: the input only gives you the parameter name. You also need the corresponding form's action to see which URL the parameters should be passed to. A look at the form source code on nethingoez.com shows the following: <meta itemprop="target" content="https://nethingoez.com/search/?q={q}"> So all you need to do is use the URL https://nethingoez.com/search/?q={query}
  12. 1 point
    I Sheet You Not Create auto-updating workflows from Excel worksheets. Works like a List Filter but using an Excel file as the data source. I Sheet You Not is a workflow generator/template for Alfred 3. It reads data from an Excel workbook and displays them in Alfred. You can specify which rows and columns the data are read from, and changes to the data are picked up automatically by the workflow. Download and installation Download the workflow from Packal or GitHub releases and double-click the downloaded I-Sheet-You-Not-X.X.X.alfredworkflow file to install in Alfred. Usage Use keyword isyn to create a new copy of the workflow. You can either create an empty copy or search for an Excel file to base the workflow on. See the documentation for detailed usage/configuration instructions. Source code The source is hosted on GitHub. Bugs and feature requests Bugs and feature requests should ideally be submitted via GitHub issues, but asking in this thread is cool, too.
  13. 1 point
    @Tsunami is correct. In the case of @greenamit I was able to confirm that the server did not block the specific IPs. It's hard to figure out how many users have issues with this, since there are still a lot of people using Units without any problems. Anyhow just wanted to let you all know that I checked with my hosting provider and they confirmed that there where no blocks or problems on their side.
  14. 1 point

    I Sheet You Not: Plug Excel into Alfred

    Just wanted to say thanks (and I bought you a beer) for this powerful and simple-to-use workflow! I recently needed to send a large amount of emails based on an Excel-sheet with relevant information in several columns. It was pretty straightforward to extract the needed data with your workflow and create the text for each email.
  15. 1 point

    Get IP for hostname

    As a devops engineer, I find myself using the `host` command line tool a lot. You enter a hostname, it gives you the IP address associated with it. This Alfred workflow does the same thing. Might be helpful to someone else as well I guess. Download Host.alfredworkflow
  16. 1 point
    1Password have acknowledged this issue and will fix it in an upcoming update, at which point, I'll switch Alfred across to using the new 1Password URL scheme for formulating an Open and Fill Cheers, Andrew
  17. 1 point

    Disable Google/Amazon/Wikipedia search?

  18. 1 point
    @nikivi this is likely to be a more major change, so won't be incorporated into a maintenance release. It is still on my internal radar though!
  19. 1 point

    Cardhop Workflow

    I played around with Cardhop and here is a workflow that I made. I wanted to get more time before sending some workflows to the forum to setup a repository and with an auto-update to the workflow, but I didn't have the time yet for that. And since some people mentioned that they would like a workflow for Cardhop, here is one! Features: Keyword "chc" : Search a contact in Alfred and open it in Cardhop Keyword "chs" or hotkey : Send the query to Cardhop. If the query is empty, it tries to get the selection from the front application and send it to Carhop (In short, you can select the contact information on it's website or email and call "chs" from Alfred and the selection should be sent directly to Cardhop). You can use this action to send the selection or pass a string to your Favorites list (alternative to keyword: chf) or to the Cardhop's Actions (alternative to keyword: cha). Keyword "chf" : Send a string from your Favorites list directly to Cardhop (could be used as a Snippets/Bookmarks list to rapidly write a query to Cardhop that you know gives you the right information in it without the need to write it all). Write your list in the Workflow Environment Variables "Favorites" and separated by semicolon (";"). Ex: Call mom home;Mail boss work;facetime Complicated Name;website businessName;/MyTag;Direction dentist... A variable "{q}" could be used to have a placeholder for a string that you want to set just before sending to Cardhop (ex: "Email {q} work" where {q} could be changed to any name at the time that you invoke the workflow). Tip: To directly activate an action in Cardhop, it seems to delay the input until it has done parsing the query, so you can rapidly press Enter a second time when you select an item from your Favorites list in Alfred and it should run the first action that Cardhop returns. Keyword "cha" : Show a list of possible Carhop actions. If arriving to this function using the Send feature (chs), then the selection or query would be appended to the Cardhop action before sending it. Hotkey to Send selection to Cardhop : If you prefer to send the selection directly to Cardhop with a hotkey instead of a keyword Fallback search to send the query to Cardhop : If you want to write the information directly in Alfred without any keyword before. To make it works, you would need to add the Fallback search into the Alfred Preferences at: "Features/Default Results/Setup fallback results/+/Workflow Trigger/Send to Cardhop" External trigger to send a string to Cardhop from an external script. Other external triggers are set if you want to pop the Favorites list or Actions list from an external script. Append/Prepend string : Add a string before or after the main string before sending using a predefined list or any string if the query doesn't match an item in the list (Could be useful to have a list of predefined group/tags) (See "Workflow Environment Variables" and "Navigation" lists below) Workflow Environment Variables: Favorites List: See keyword "chf" above AppendToSend : Set a predefined list of string to append using the Append feature (ALT key) PrependToSend : Set a predefined list of string to prepend using the Prepend feature (CTRL key) Navigation: CMD key : Go to the Send feature Actions List (chs) ALT key : Activate the selected item and append extra string (using the AppendToSend list) CTRL key : Activate the selected item and prepend extra string (using the PrependToSend list) Tip: If you want to use Cardhop as the application to open from Alfred when you are viewing a contact with the Alfred Contact Viewer and press CMD+O: Insert "x-cardhop://show?id={uid}" into the Alfred Preferences at "Features/Contacts/Advanced/URL Handler" instead of using "addressbook://{uid}". This should do the same as the keyword "chc" but without the need to write the keyword before searching for a contact and use directly the built-in contact search of Alfred Download Link (latest version): https://nofile.io/f/TocAqvK7JJJ/gbCardhop.alfredworkflow Have fun!
  20. 1 point
    @Ivan Herman just wondered if you ever found a solution to this or if anyone else here has? This would be so nice.
  21. 1 point

    Viscosity VPN Connection Manager

    Viscosity VPN Connection Manager Manage your Viscosity VPN connections from Alfred. Usage vpn [<query>] — View and filter Viscosity VPN connections. ↩ — Connect/disconnect selected connection. If you haven't entered a query, any active VPN connections will be shown at the top of the list. Action an active connection to disconnect it. If you are connected to multiple VPNs, an additional "Disconnect All" item will be shown first. Download & Installation Get the workflow from GitHub.
  22. 1 point

    Pocket for Alfred

    Hi guys, this workflow lets you manage your Pocket list with Alfred. Features Actions to copy, visit and archive, archive and delete links from your Pocket list (fn, ctrl, alt and cmd) Hotkey to add new links from Chrome, Safari or your clipboard (ctrl + L) Action to deauthorize the workflow (shift) Background cache refresh Supports notifications Uses OAuth 2.0 to authorize the workflow Saves your access_token securely in OS X's keychain Github: https://github.com/fniephaus/alfred-pocket Download: https://github.com/fniephaus/alfred-pocket/releases/latest/ Feel free to give some feedback! Cheers, Fabio
  23. 1 point

    Kaleidoscope Text

    Basic Kaleidoscope & Alfred Integration open up Kaleidoscope straight from you clipboard *Required Setting* -Alfred Powerpack -Kaleidoscope -Alfred Clipboard Hotkey set to cmd+alt+c *Keywords* ks Opens KS ksn Opens new KS for copied text ksd Opens KS for copied text *Hotkeys* cmd+alt+k Opens new KS for copied text cmd+k Opens KS for copied text https://github.com/andrewbkil/AlfredWorkflowKSdiff
  24. 1 point

    Change default Terminal to Hyper.is ?

    Here is an updated version I wanted to test to find a way so the script wait that the application is ready instead of a definite time before sending the keystrokes. With this version it should be faster and less error prone. Best! on alfred_script(q) if (text 1 thru 2 of q) is equal to "cd" then do shell script "open -a Hyper " & text 4 thru -1 of q else do shell script "open -a Hyper ~" set appOpen to false set nbrOfTry to 0 delay 0.5 repeat try tell application "System Events" if exists (window 1 of process "Hyper") then set appOpen to true exit repeat end if end tell end try set nbrOfTry to nbrOfTry + 1 if nbrOfTry = 20 then exit repeat delay 0.5 end repeat if appOpen then tell application "System Events" to keystroke q & return end if end alfred_script
  25. 1 point
    Hurrah for webdevs and their inability to learn anything more complicated that JavaScript!