macOS Tiling Window Manager. Spoon on top of Hammerspoon.
Example ~/.hammerspoon/init.lua configuration:
hs.loadSpoon("TilingWindowManager")
:setLogLevel("debug")
:bindHotkeys({
tile = {hyper, "t"},
incMainRatio = {hyper, "p"},
decMainRatio = {hyper, "o"},
incMainWindows = {hyper, "i"},
decMainWindows = {hyper, "u"},
focusNext = {hyper, "k"},
focusPrev = {hyper, "j"},
swapNext = {hyper, "l"},
swapPrev = {hyper, "h"},
toggleFirst = {hyper, "return"},
tall = {hyper, ","},
talltwo = {hyper, "m"},
fullscreen = {hyper, "."},
wide = {hyper, "-"},
display = {hyper, "d"},
})
:start({
menubar = true,
dynamic = true,
layouts = {
spoon.TilingWindowManager.layouts.fullscreen,
spoon.TilingWindowManager.layouts.tall,
spoon.TilingWindowManager.layouts.talltwo,
spoon.TilingWindowManager.layouts.wide,
spoon.TilingWindowManager.layouts.floating,
},
displayLayout = true,
floatApps = {
"com.apple.systempreferences",
"com.apple.ActivityMonitor",
"com.apple.Stickies",
}
})
- Variables - Configurable values
- Functions - API calls offered directly by the extension
- Methods - API calls which can only be made on an object returned by a constructor
| layouts | |
|---|---|
| Signature | TilingWindowManager.layouts |
| Type | Variable |
| Description | A table holding all known tiling layouts. Maps keys to descriptive strings. The strings show up in the user interface. |
| displayLayout | |
|---|---|
| Signature | TilingWindowManager.displayLayout() -> nil |
| Type | Function |
| Description | Shows an alert displaying the current spaces current layout. |
| Parameters |
|
| Returns |
|
| Notes |
| focusRelative | |
|---|---|
| Signature | TilingWindowManager.focusRelative(relativeIndex) -> nil |
| Type | Function |
| Description | Change window focus. |
| Parameters |
|
| Returns |
|
| Notes |
|
| moveRelative | |
|---|---|
| Signature | TilingWindowManager.moveRelative(relativeIndex) -> nil |
| Type | Function |
| Description | Moves window to different position in table of tileable windows. |
| Parameters |
|
| Returns |
|
| Notes |
|
| swapFirst | |
|---|---|
| Signature | TilingWindowManager.swapFirst() -> nil |
| Type | Function |
| Description | Swaps first window. |
| Parameters |
|
| Returns |
|
| Notes |
|
| toggleFirst | |
|---|---|
| Signature | TilingWindowManager.toggleFirst() -> nil |
| Type | Function |
| Description | Toggles first window. |
| Parameters |
|
| Returns |
|
| Notes |
|
| bindHotkeys | |
|---|---|
| Signature | TilingWindowManager:bindHotkeys(mapping) -> self |
| Type | Method |
| Description | Binds hotkeys for TilingWindowManager |
| Parameters |
|
| Returns |
|
| Notes |
|
| setLogLevel | |
|---|---|
| Signature | TilingWindowManager:setLogLevel(level) -> self |
| Type | Method |
| Description | Set the log level of the spoon logger. |
| Parameters |
|
| Returns |
|
| Notes |
| start | |
|---|---|
| Signature | TilingWindowManager:start([config]) -> self |
| Type | Method |
| Description | Starts TilingWindowManager spoon |
| Parameters |
|
| dynamic - if true: dynamically tile windows. | |
| layouts - a table with all layouts to be enabled. | |
| fullscreenRightApps - a table with app names, to position right half only in fullscreen layout. | |
| floatApp - a table with app names to always float. | |
| displayLayout - if true: show layout when switching tiling layout. | |
| menubar - if true: enable menubar item. | |
| Returns |
|
| Notes |
| stop | |
|---|---|
| Signature | TilingWindowManager:stop() -> self |
| Type | Method |
| Description | Stops TilingWindowManager spoon |
| Parameters |
|
| Returns |
|
| Notes |