docs » Seal

Pluggable launch bar

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

Seal includes a number of plugins, which you can choose to load (see :loadPlugins() below):

Submodules

API Overview

API Documentation

Variables

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.

Source Source/Seal.spoon/init.lua line 45
queryChangedTimerDuration
Signature Seal.queryChangedTimerDuration
Type Variable
Description

Time between the last keystroke and the start of the recalculation of the choices to display, in seconds.

Notes
  • Defaults to 0.02s (20ms).
Source Source/Seal.spoon/init.lua line 37

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
Source Source/Seal.spoon/init.lua line 157
loadPluginFromFile
Signature Seal:loadPluginFromFile(plugin_name, file)
Type Method
Description

Loads a plugin from a given file

Parameters
  • plugin_name - 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)
Source Source/Seal.spoon/init.lua line 94
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)
Source Source/Seal.spoon/init.lua line 122
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.
Source Source/Seal.spoon/init.lua line 75
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.
Source Source/Seal.spoon/init.lua line 50
show
Signature Seal:show(query)
Type Method
Description

Shows the Seal UI

Parameters
  • query - An optional string to pre-populate the query box with
Returns
  • None
Notes
  • This may be useful if you wish to show Seal in response to something other than its hotkey
Source Source/Seal.spoon/init.lua line 234
start
Signature Seal:start()
Type Method
Description

Starts Seal

Parameters
  • None
Returns
  • The Seal object
Source Source/Seal.spoon/init.lua line 190
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)
Source Source/Seal.spoon/init.lua line 210
toggle
Signature Seal:toggle(query)
Type Method
Description

Shows or hides the Seal UI

Parameters
  • query - An optional string to pre-populate the query box with
Returns
  • None
Source Source/Seal.spoon/init.lua line 252