/hammerspoon_init

Custom Hammerspoon scripts. The power of Lua scripting at the OS level.

Primary LanguageLua

Hammerspoon

A suite of Lua scripts for Hammerspoon that provide functionality and keyboard shortcuts for actions I commonly use.

Installation

  1. Install Hammerspoon.
  2. Clone this repository into your ~/.hammerspoon directory.
  3. Open Hammerspoon or reload your config from the Hammerspoon menubar menu.

Functionality

This set of scripts provides the following functionality via Hammerspoon.

iTunes Control

  • Alt-Ctrl-Space : play/pause
  • Alt-Ctrl-x : next track
  • Alt-Ctrl-z : previous track
  • Alt-Ctrl-c : display current track

Mouse Location

  • Cmd-Alt-Ctrl-m : find the cursor on the screen

UTC Menu

  • Displays a universal time (UTC) clock in the menubar

DNS Menu

  • Displays the current DNS server settings in the menubar (useful in conjunction with sdns)

Window Positioning and Sizing

  • Shift-Alt-D, 1 : halfscreen-left
  • Shift-Alt-D, 2 : halfscreen-right
  • Shift-Alt-D, 3 : threequarters-left
  • Shift-Alt-D, 0 : fullscreen

Hammerspoon Development

  • A script to automatically reload the Hammerspoon configuration whenever a file in the .hammerspoon dir changes

Misc

  • Cmd-Alt-Ctrl-l : lock the computer