docs » Hammer

Automate some Hammerspoon configuration tasks

Download: https://github.com/zzamboni/zzSpoons/raw/master/Spoons/Hammer.spoon.zip

API Overview

API Documentation

Variables

auto_reload_config
Signature Hammer.auto_reload_config
Type Variable
Description

If true, automatically reload Hammerspoon config when any .lua files inside hs.configdir changes

install_cli
Signature Hammer.install_cli
Type Variable
Description

If true, install the hs command line tool

spoon_action_mappings
Signature Hammer.spoon_action_mappings
Type Variable
Description

Table containing mappings from action names to functions, for binding hotkeys and BTT triggers

Methods

autoReloadConfig
Signature Hammer:autoReloadConfig(files)
Type Method
Description

Reload config only if any of the Lua files in files have changed

bindHotkeys
Signature Hammer:bindHotkeys(mapping)
Type Method
Description

Binds hotkeys for Hammer

Parameters:

  • mapping - A table containing hotkey objifier/key details for the following items:
    • config_reload - Manually trigger a config reload
reloadConfig
Signature Hammer:reloadConfig()
Type Method
Description

Manually reload configuration (wrapper around hs.reload)

start
Signature Hammer:start()
Type Method
Description

Start the Spoon. At the moment this includes:

  • Set up the file watcher for auto-config-reload