docs » Seal

Pluggable launch bar

Download: https://github.com/Hammerspoon/Spoons/raw/master/Spoons/Seal.spoon.zip

Submodules

API Overview

API Documentation

Variables

always_open_with_safari
Signature Seal.plugins.safari_bookmarks.always_open_with_safari
Type Variable
Description

If true (default), bookmarks are always opened with Safari, otherwise they are opened with the default application using the /usr/bin/open command.

plugin_search_paths
Signature Seal.plugin_search_paths
Type Variable
Description

List of directories where Seal will look for plugins. Defaults to ~/.hammerspoon/seal_plugins/ and the Seal Spoon directory.

Methods

bindHotkeys
Signature Seal:bindHotkeys(mapping)
Type Method
Description

Binds hotkeys for Seal

Parameters:

  • mapping - A table containing hotkey modifier/key details for the following (optional) items:
    • show - This will cause Seal's UI to be shown
    • toggle - This will cause Seal's UI to be shown or hidden depending on its current state

Returns:

  • The Seal object
loadPluginFromFile
Signature Seal:loadPluginFromFile(plugin_name, file)
Type Method
Description

Loads a plugin from a given file

Parameters:

  • pluginname - the name of the plugin, without "seal" at the beginning or ".lua" at the end
  • file - the file where the plugin code is stored.

Returns:

  • The Seal object if the plugin was successfully loaded, nil otherwise

Notes:

  • You should normally use Seal:loadPlugins(). This method allows you to load plugins from non-standard locations and is mostly a development interface.
  • Some plugins may immediately begin doing background work (e.g. Spotlight searches)
loadPlugins
Signature Seal:loadPlugins(plugins)
Type Method
Description

Loads a list of Seal plugins

Parameters:

  • plugins - A list containing the names of plugins to load

Returns:

  • The Seal object

Notes:

  • The plugins live inside the Seal.spoon directory
  • The plugin names in the list, should not have seal_ at the start, or .lua at the end
  • Some plugins may immediately begin doing background work (e.g. Spotlight searches)
refreshAllCommands
Signature Seal:refreshAllCommands()
Type Method
Description

Refresh the list of commands provided by all the currently loaded plugins.

Parameters:

  • None

Returns:

  • The Seal object

Notes:

  • Most Seal plugins expose a static list of commands (if any), which are registered at the time the plugin is loaded. This method is used for plugins which expose a dynamic or changing (e.g. depending on configuration) list of commands.
refreshCommandsForPlugin
Signature Seal:refreshCommandsForPlugin(plugin_name)
Type Method
Description

Refresh the list of commands provided by the given plugin.

Parameters:

  • plugin_name - the name of the plugin. Should be the name as passed to loadPlugins() or loadPluginFromFile.

Returns:

  • The Seal object

Notes:

  • Most Seal plugins expose a static list of commands (if any), which are registered at the time the plugin is loaded. This method is used for plugins which expose a dynamic or changing (e.g. depending on configuration) list of commands.
show
Signature Seal:show()
Type Method
Description

Shows the Seal UI

Parameters:

  • None

Returns:

  • None

Notes:

  • This may be useful if you wish to show Seal in response to something other than its hotkey
start
Signature Seal:start()
Type Method
Description

Starts Seal

Parameters:

  • None

Returns:

  • The Seal object
stop
Signature Seal:stop()
Type Method
Description

Stops Seal

Parameters:

  • None

Returns:

  • The Seal object

Notes:

  • Some Seal plugins will continue performing background work even after this call (e.g. Spotlight searches)
toggle
Signature Seal:toggle()
Type Method
Description

Shows or hides the Seal UI

Parameters:

  • None

Returns:

  • None