Skip to content
Swift, Lua, no SIP changes

A tiling window manager
for macOS.

Scrolling and tiling layouts, emulated workspaces, binding modes and a config in Lua. One command set for the CLI, Lua and URLs.

git clone https://github.com/g4rcez/wm.git && cd wm && ./build-app.sh
  • macOS 14 or later
  • Runs with SIP on
  • Configured in Lua
  • MIT license

Try it

Press the keys. It moves.

This is a model of wm, not a screen recording. Click the desktop and use the binds from First five minutes: the same commands that wm runs, as you see below the screen.

Features

What you get

Configure

Your config is a Lua file

~/.config/wm/init.lua is a real program: loops, functions and require work. For a whole file, see the author's configuration, or the config reference.

Gaps, a border, vim keys for focus and workspaces. wm reloads the file when you save it.

wm.config {
  layout = "tiling",
  gaps = { inner = 8, outer = 8 },
  border = { enabled = true, width = 2, active = "#89b4fa" },
}

-- Focus and move with vim keys
wm.bind("alt-h", "focus left --wrap")
wm.bind("alt-j", "focus down --wrap")
wm.bind("alt-k", "focus up --wrap")
wm.bind("alt-l", "focus right --wrap")
wm.bind("alt-shift-h", "swap left")
wm.bind("alt-shift-l", "swap right")

-- alt-N shows workspace N, alt-shift-N sends the window there
for n = 1, 9 do
  wm.bind("alt-" .. n, "workspace " .. n)
  wm.bind("alt-shift-" .. n, "window send workspace " .. n)
end

wm.bind("alt-f", "window fullscreen")
wm.bind("alt-space", "window float")
wm.bind("alt-s", "layout set scrolling")
wm.bind("alt-t", "layout set tiling")
wm.bind("alt-shift-c", "daemon reload")

Command line

Script it from the shell

Every key bind is a command, and every command works from the wm CLI, from Lua (wm.dispatch) and from wm:// URLs.

Read the command line guide →

wm list windows                              # every window, as a table
wm list windows --focused --json             # JSON for scripts
wm pick                                      # click a window, get its rule
wm --window app:com.apple.Notes window close # act on a window by app
wm batch 'workspace 2; layout set tiling'    # stops at the first error
wm set gaps.inner 4                          # until the next reload
wm notify 'build done' --seconds=3           # a message on screen

Install

Three steps

wm has no binary release yet. You build it from source.

  1. 1

    Build

    You need macOS 14 and the Swift 6.2 toolchain. The script builds wm.app, signs it and starts it.

    ./build-app.sh
  2. 2

    Grant Accessibility

    macOS asks the first time wm starts. Allow it in System Settings > Privacy & Security > Accessibility. wm cannot move windows without it.

  3. 3

    Write your config

    Create ~/.config/wm/init.lua. wm has no default keys, so bind your own. See First five minutes.

    wm daemon reload

Tile your Mac.

Build it, write ten lines of Lua, and press a key.

git clone https://github.com/g4rcez/wm.git && cd wm && ./build-app.sh