Gear Menu

  1. Home
  2. Docs
  3. Help & Support
  4. Hook Window
  5. Gear Menu

The Gear menu contains the following commands.

Reveal File in Finder (⌘R)


How many times have you wanted to view in the Finder the file you are editing? If you’re like us, the answer is “thousands of times!” Some reasons for doing this:

  • to access a file that is in the same folder;
  • see when the file was first created;
  • move the file somewhere else;
  • duplicate the file and move it;
  • create an alias (or Hook file) to the file;
  • the list goes on…

Fortunately many applications have a “reveal file in Finder” command. Unfortunately, not all of them do. Amongst those that do offer the command (e.g. Papers.app, nvALT and BBedit), apps name the command differently, have it in different menus, may not have a keyboard shortcut for it, or may define the keyboard shortcut differently from others.

Hook gives you a single, uniform keyboard shortcut (and Gear menu item) for this essential personal information management command: ⌘R.

It makes sense for Hook to provide you with this benefit, because Hook is all about helping you access the resource that is most relevant to your current context. And when you’re working on a file, what’s more relevant than the file itself?!

Make Hook File (Pro feature) (⇧⌘H)

Hook files are plain text files with the “.hook” suffix. They can contain any valid address (“URI”), whether or not the address is a hook://. For instance, you can insert a link to a website (such as https://apple.com), an OmniFocus task (such as: omnifocus:///task/nGSe83xr2tE), or any other link.

When you double-click/tap on a Hook file in the Finder, Hook parses the address, and makes a system call to open the linked item.

Hook files are like aliases and web location (.webloc) files. Like Finder aliases they can link to other files. Like Finder “.webloc” files, they can link to web pages.

But they are better than aliases and web locations in many respects:

  • they can refer to anything that your macOS instance can normally resolve;
  • they can refer to hook:// items (and so link to email, files, Spotlight searches and so on); and
  • in the spirit of Markdown and openness, Hook files are plain text. So you can include any address (URI) or even a Markdown link in a Hook file!

The “Make Hook File” command is a Pro feature. However, you can also construct Hook files manually by creating a plain text file that has a “.hook” filename extension. Just include whatever address (URI) or Markdown link you’d like Hook to execute.

When you use the “Make Hook File” command from the Desktop, Hook will try to put a Hook file in the same folder as a current selection, which must be a single file or resource. You can also create a Hook file using the Hook window in the context of other apps than Finder. In that case, Hook will create a Hook file from the current resource and put in the “Hook Files” folder of your Hook folder.


Copy a New Unique ID, and Copy a Search Link from Clipboard (Pro features)

Hook Pro provides a couple of advanced user-friendly features that enable you to link to files of apps that do not adequately support automation (as described). More generally, they enable you to index and search for arbitrary content on locally mounted storage.

The commands are:

  • ⌘U to Copy a New Unique ID
  • ⇧⌘S to Copy a Search Link from Clipboard

Suppose you’re writing a document in a (hypothetical) Markdown editor called SansScript which has no automation. While editing a particular Markdown document, source.txt you want to be able to quickly access or refer to another document, target.txt, that you keep moving around. Here’s what you can do:

  1. Invoke Hook,
  2. ⌘U to "Copy a New Unique ID", which might look something like 6O4L7-GR8ZB
  3. Paste this anywhere in target.txt (e.g., in its Spotlight comments, or in a Markdown comment such as ),
  4. Invoke Hook again,
  5. ⇧⌘S to “Copy a Search Link from Clipboard”, which yields hook://search/?q=6O4L7-GR8ZB.
  6. Paste this in source.txt, or anywhere else from which you want to be able to access target.txt.

When you invoke a hook://search/?q=6O4L7-GR8ZB link, macOS invokes Hook, which “serves” (responds to) this link. Hook in turn executes a Spotlight search. It will find all instances of 6O4L7-GR8ZB (or whatever you put in the search query.)

Of course, you might have been able simply to selected target.txt in the Finder, and invoke Hook from there. But, unfortunately, many apps do not even provide a “Show in Finder” command. (Hook provides this command for all compatible File-based apps.) And even if they do, you might prefer to paste the “ID” in the document itself, because it’s faster.

Some other ways of using these links:

  • Some editors even have an “open URL” command that you can use with hook:// links, including hook://search links. For instance, in BBEdit users can control-click anywhere in a URL which evokes a popup window containing “Open URL”. Selecting that command opens the link, which executes the search.
  • You can also use these links in launchers and Spotlight. (Like any other hook:// URL, you can paste them in LaunchBar, for instance).
  • You can paste them in .hook files (Hook files).

Another benefit of planting ID’s in files is that this enables finer grained linking. (We intend to provide other syntactic sugar for other types of links to enable this.) You can then search for the ID (e.g., 6O4L7-GR8ZB) in the file itself (e.g., in target.txt).

Bottom line: any macOS file can become a hook://search link target. Let your imagination run wild, because the uses of this feature are innumerable.

Show/Hide Status Bar (⌘/)

The Hook window contains a handy status bar. It provides you with tips and other information, such as help about the current command.

The right side of the status bar also contains a “?” icon that you can click to access a help page pertinent to the current selection in the Hook window. For instance, if you select “Link to New” in the Hook window, then the “?” icon links to Link to New on the web.

This status bar is reminiscent of the Finder’s status bar. You can show and hide a keyboard shortcut ⌘/ , or the gear menu.

Was this article helpful to you? Yes No

How can we help?