Skip to content

ldelossa/Yabai.spoon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yabai.spoon

Screen.Recording.2024-09-15.at.9.13.49.PM.mov

A HammerSpoon Yabai integration which provides:

  1. UI Elements for adding, labeling, and navigating spaces.
  2. MenuBar icon displaying current space with drop down to select a space
  3. Clickable on-screen stack indicator
  4. MenuBar stack indicator and drop down for stack window selection
  5. Automatic empty space deletion

Usage

Follow directions for installing a Spoon on HammerSpoon's documentation.

Load it with defaults in your init.lua.

local yabai = hs.loadSpoon('Yabai')
yabai:bindHotkeys(nil)
yabai:configure(nil)
yabai:start()

Configuration

Config

local defaultConfig = {
	showSpaceMenuBarIcon = true,
	cleanEmptySpaces = true,
	showOnScreenStackIndicator = true,
	showStackIndicatorMenuBarIcon = true
}

spaceMenuBarIcon - Show the MenuBar icon with a drop down to select a space cleanEmptySpaces - Automatically delete empty spaces showOnScreenStackIndicator - Show the on-screen stack indicator showMenuBarStackIndicator - Show the MenuBar stack indicator

Keymaps

local defaultHotKeysMapping = {
	createSpace = { { "alt", "shift" }, "n" },
	selectSpace = { { "alt" }, "w" },
	labelSpace = { { "alt" }, "r" },
	toggleSpaceLayout = { { "alt" }, "o" }
}

Both configuration and keymaps can be overwritten on a per-key basis:

yabai:bindHotkeys({ createSpace = { { "alt", "shift" }, "x" } })
yabai:configure({ showSpaceMenuBarIcon = false })

About

HammerSpoon Spoon for Yabai

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages