my config for Hammerspoon
git clone [email protected]:jiahut/hammerspoon-config.git ~/.hammerspoon
cd ~/.hammerspoon
cp config.example.lua config.lua
config.lua
- The configuration file, that contains configuration options for every module.init.lua
- The bootstrapper that loads modules defined in the config, and handles the menu.
utils/find.lua
- Convenience methods for finding windows, and audio devices.utils/import.lua
- My own take of require() with its own cache. Useimport
everywhere you would have usedrequire
.init.lua
takes care of clearing the cache, each reload, so you don't have to worry.utils/monitors.lua
- Monitor detection & window positioning helpers.utils/position.lua
- Functions to resize a window within a screen.utils/matchers/match.lua
- A shitty fuzzy matching & scoring function.utils/match_dialgoue.lua
- Utility to create a specialized text view that can be used to do fuzzy match navigating (or menus or whatever.. seeutils/fuzzy_match.lua
, andmodules/app_selector.lua
).utils/nudge.lua
- Utility functions to nudge a window. Thanks @josheschulz.utils/music/*.lua
- Utility functions for controlling Spotify, iTunes and Rdio.
modules/reload.lua
- Handles reloading hammerspoon. (CMD-CTRL-ALT-E)modules/repl.lua
- Handles launching the repl. (CMD-CTRL-ALT-R)modules/lock.lua
- Handles locking the screen. (F13)modules/arrows.lua
- Handles positioning a window on the current screen. (CMD-CTRL-ALT-[Arrow])modules/monitors.lua
- Handles moving windows between screens.modules/arrangement.lua
- Handles building window arrangements, that arrange windows on multiple screens. I use this to move windows to different monitors automatically.modules/app_selector.lua
- Focus windows by fuzzy matching their titles. Usesutils/match_dialogue
.modules/fullscreen.lua
- Universal shortcut to toggle full screen. (CMD-CTRL-A)modules/slide.lua
- Handles nudging windows viautils/nudge.lua
. (CMD-CTRL-ALT-) Thanks @josheschulz.modules/hop.lua
- Handles focusing windows in relative directions. (CMD-CTRL-ALT-SHIFT-) Thanks @josheschulz.
Spoons/ControlEscape
- Tap it for escape. Hold it for control.
Released under MIT license.