Alfred - Slink for SearchLink

Welcome to this documentation page for Slink - a SearchLink workflow for Alfred, the popular launcher and automation application for macOS.

SearchLink is a macOS utility created by Brett Terpstra. It takes text and modifiers and will then attempt to idntify a matching web page and replace the content with a URL or a type of Markdown link/reference.

Slink is an Alfred workflow that allows you to interact with, and utilise the SearchLink utility from within Alfred. When Brett created SearchLink, also created a script to let LaunchBar users take advantage of it from that launcher app. Not being a Launchbar user, when I started using SearchLink, I created something similar for Alfred users.

The workflow primarily acts as an Alfred intermediary to SearchLink, allowing you to enter your search phrase into Alfred and automatically return some content without having to remember the specific syntax.

Prerequisites:

Functionality

Slink offers a handful of features and triggers.

Keyword Trigger: sl
External Trigger: sl
Snippet Trigger: slink;
Triggering this flow will allow you to enter a search phrase into Alfred and pass that to SearchLink. Once the result has been returned, it can be found on the clipboard. There is a user configuration option that determines if the result is also automatically pasted to the current cursor position when Alfred disappears.

  • By default, the result will be a Markdown link.
  • Holding down COMMAND when the search is performed will force the result to be a URL.
  • Holding down CTRL will open the URL in the default web browser.
  • Any SearchLink syntax can be included to override the behaviour.

Keyword Trigger: slc
External Trigger: slc
Triggering this flow will allow you to enter a search phrase into Alfred and pass that to SearchLink. Once the result has been returned, it can be found on the clipboard.

  • By default, the result will be a Markdown link.
  • Holding down COMMAND when the search is performed will force the result to be a URL.
  • Holding down CTRL will open the URL in the default web browser.
  • Any SearchLink syntax can be included to override the behaviour.

Keyword Trigger: sli
External Trigger: sli
Triggering this flow will allow you to enter a search phrase into Alfred and pass that to SearchLink. Once the result has been returned, it can be found on the clipboard, and it will be pasted at the current cursor position when Alfred disappears.

  • By default, the result will be a Markdown link.
  • Holding down COMMAND when the search is performed will force the result to be a URL.
  • Holding down CTRL will open the URL in the default web browser.
  • Any SearchLink syntax can be included to override the behaviour.

Keyword Trigger: sle
External Trigger: sle
Triggering this flow will open the SearchLink configuration file for editing.

The app used to edit the file is specified in the user configuration settings. It defaults to TextEdit.

Triggers

There are a variety of ways to access different functionality included in Slink.

Keyword

Keyword triggers are text entered directly into the Alfred window to trigger a flow.

Keyword Functionality
sl Default Search
slc Copy Link
sli Insert Link
sle Edit SearchLink Configuration

Snippet

Snippets are entered into any text field and trigger a flow.

Snippet Functionality
slink; Default Search

External

External triggers can be used within any Alfred workflow to call a flow in Slink, or even externally through an AppleScript call or URL.

External Functionality
sl Default Search
slc Copy Link
sli Insert Link
sle Edit SearchLink Configuration
search Pass a string directly to SearchLink

Change Log

  • Version 1.1.0: 2022-11-20
    • Add: Functionality to allow automated insertion of copied result.
    • Add: Added keyword triggers for copy and insert.
    • Add: Snippet trigger (slink;) for default SearchLink action (sl).
    • Add: Several new external triggers for searching and triggering keyword flows, as well as editing the SearchLink configuration file.
    • Change: Default sl behaviour (copy/copy & insert) now determined by a new option.
    • Change: slc no longer opens the configuration file. This is now configured by sle, the prior keyword now being explicitly used for copy.
    • Change: Changed path for configuration file editor from an environment variable to user configuration.
  • Version 1.0.1: 2022-03-06
    • Fix: Fixed subtitle wording on sl invocation.
  • Version 1.0.0: 2021-05-21
    • Add: Initial release, everything is new.

Slink is just one of several Alfred workflows I have created. You can find more workflows and blog posts related to Alfred on my Alfred page