szymonkaliski / hhtwm

hackable tiling window manager for macOS and Hammerspoon
MIT License
237 stars 11 forks source link

HHTWM

Hackable Hammerspoon Tiling WM

HHTWM is a module for Hammerspoon providing automatic layout-based tiling for macOS.

It's configurable, hackable, and composes well with other Hammerspoon libraries.

Setup

  1. install required dependency - hs._asm.undocumented.spaces
  2. copy hhtwm/ folder to ~/.hammerspoon/
  3. require the library in your init.lua:
    hhtwm = require('hhtwm') -- it's recommended to make `hhtwm` a global object so it's not garbage collected.

MVP

Smallest init.lua that tiles by default (with no keybindings and no margins):

hhtwm = require('hhtwm')
hhtwm.start()

Configuration

All settings are optional.

API

Module related

Window related

Layout related

Example config

You can check out my usage of hhtwm in my dotfiles repo, although it might be over-engineered in places.