Actions reference
Actions that can be bound to hotkeys or called directly from Lua. This page is the canonical list of actions and defaults. For behavior guides and examples, see Actions overview.
Bind actions to hotkeys using bindHotkeys():
spoon.Shoji:bindHotkeys({ focus_left = { { "ctrl", "alt" }, "h" }, swap_main = { { "ctrl", "alt", "shift" }, "return" },})Both formats are supported:
-- Standard Spoon format (recommended)focus_left = { { "ctrl", "alt" }, "h" }
-- Flat formatfocus_left = { "ctrl", "alt", "h" }Navigation actions
Section titled “Navigation actions”Move focus between windows.
focus_left
Section titled “focus_left”Focus the window to the left.
focus_left = { { "ctrl", "alt" }, "h" }focus_right
Section titled “focus_right”Focus the window to the right.
focus_right = { { "ctrl", "alt" }, "l" }focus_up
Section titled “focus_up”Focus the window above.
focus_up = { { "ctrl", "alt" }, "k" }focus_down
Section titled “focus_down”Focus the window below.
focus_down = { { "ctrl", "alt" }, "j" }focus_next
Section titled “focus_next”Focus the next window in order. Wraps to the first window after the last.
focus_next = { { "ctrl", "alt" }, "n" }focus_prev
Section titled “focus_prev”Focus the previous window in order. Wraps to the last window before the first.
focus_prev = { { "ctrl", "alt" }, "p" }focus_last
Section titled “focus_last”Focus the previously focused window (history-based).
focus_last = { { "ctrl", "alt" }, "tab" }Window management actions
Section titled “Window management actions”Swap windows, toggle floating, or zoom.
swap_left
Section titled “swap_left”Swap the focused window with the one to its left.
swap_left = { { "ctrl", "alt", "shift" }, "h" }swap_right
Section titled “swap_right”Swap the focused window with the one to its right.
swap_right = { { "ctrl", "alt", "shift" }, "l" }swap_up
Section titled “swap_up”Swap the focused window with the one above it.
swap_up = { { "ctrl", "alt", "shift" }, "k" }swap_down
Section titled “swap_down”Swap the focused window with the one below it.
swap_down = { { "ctrl", "alt", "shift" }, "j" }swap_next
Section titled “swap_next”Swap the focused window with the next one in order.
swap_next = { { "ctrl", "alt", "shift" }, "n" }swap_prev
Section titled “swap_prev”Swap the focused window with the previous one in order.
swap_prev = { { "ctrl", "alt", "shift" }, "p" }swap_main
Section titled “swap_main”Swap the focused window with the first (main) window.
swap_main = { { "ctrl", "alt", "shift" }, "return" }toggle_float
Section titled “toggle_float”Toggle floating state for the focused window. Floating windows are excluded from tiling and can be positioned freely. When toggled back, the window rejoins the tile order as a new entry (typically at the end).
toggle_float = { { "ctrl", "alt", "shift" }, "t" }toggle_zoom
Section titled “toggle_zoom”Temporarily float and maximize the focused window to fill the screen. Press again to restore the window to its tiled position. If the window was already floating before zooming, it stays floating when unzoomed.
toggle_zoom = { { "ctrl", "alt" }, "f" }reset_window_order
Section titled “reset_window_order”Reset the window order for the current space back to the default (based on window creation time). No default hotkey.
UI actions
Section titled “UI actions”Open overlays and pickers.
toggle_cheatsheet
Section titled “toggle_cheatsheet”Toggle the keybinding cheatsheet overlay. Press again or Escape to dismiss.
toggle_cheatsheet = { { "ctrl", "alt", "shift" }, "/" }open_command_palette
Section titled “open_command_palette”Open a searchable command palette. Displays all enabled layouts followed by
executable actions. Layouts appear in enabled_layouts order.
Search matches names, descriptions, and keybindings.
open_command_palette = { { "ctrl", "alt" }, "/" }Navigation and directional swap actions (e.g., focus_left, swap_up) are
excluded because they are typically bound to muscle-memory hotkeys.
Layout control actions
Section titled “Layout control actions”Change layouts and adjust layout parameters.
cycle_layout_forward
Section titled “cycle_layout_forward”Cycle to the next layout in enabled_layouts.
cycle_layout_forward = { { "ctrl", "alt" }, "space" }cycle_layout_backward
Section titled “cycle_layout_backward”Cycle to the previous layout in enabled_layouts.
cycle_layout_backward = { { "ctrl", "alt", "shift" }, "space" }increase_main_ratio
Section titled “increase_main_ratio”Increase the main area ratio by 0.05.
increase_main_ratio = { { "ctrl", "alt" }, "=" }decrease_main_ratio
Section titled “decrease_main_ratio”Decrease the main area ratio by 0.05.
decrease_main_ratio = { { "ctrl", "alt" }, "-" }increase_main_count
Section titled “increase_main_count”Increase the number of main windows by 1.
increase_main_count = { { "ctrl", "alt" }, "," }decrease_main_count
Section titled “decrease_main_count”Decrease the number of main windows by 1 (minimum 1).
decrease_main_count = { { "ctrl", "alt" }, "." }retile_space
Section titled “retile_space”Retile the current space with current parameters.
retile_space = { { "ctrl", "alt", "shift" }, "r" }reset_space
Section titled “reset_space”Reset layout parameters (ratio, main_count) to defaults and retile.
reset_space = { { "ctrl", "alt", "shift" }, "0" }Direct layout actions
Section titled “Direct layout actions”Switch directly to a specific layout without cycling.
set_layout_<name>
Section titled “set_layout_<name>”Switch to a specific layout by name. Available for all registered layouts.
No default hotkeys are bound. To enable direct layout switching, add bindings manually:
spoon.Shoji:bindHotkeys({ set_layout_tall = { { "ctrl", "alt" }, "1" }, set_layout_wide = { { "ctrl", "alt" }, "2" }, set_layout_bsp = { { "ctrl", "alt" }, "3" }, set_layout_monocle = { { "ctrl", "alt" }, "4" }, set_layout_grid = { { "ctrl", "alt" }, "5" }, set_layout_floating = { { "ctrl", "alt" }, "0" },})BSP layout actions
Section titled “BSP layout actions”These actions only take effect when BSP (binary space partitioning) is active.
bsp_shrink_horizontal
Section titled “bsp_shrink_horizontal”Shrink the focused window horizontally.
bsp_shrink_horizontal = { { "ctrl", "cmd" }, "h" }bsp_expand_horizontal
Section titled “bsp_expand_horizontal”Expand the focused window horizontally.
bsp_expand_horizontal = { { "ctrl", "cmd" }, "l" }bsp_shrink_vertical
Section titled “bsp_shrink_vertical”Shrink the focused window vertically.
bsp_shrink_vertical = { { "ctrl", "cmd" }, "k" }bsp_expand_vertical
Section titled “bsp_expand_vertical”Expand the focused window vertically.
bsp_expand_vertical = { { "ctrl", "cmd" }, "j" }bsp_rotate
Section titled “bsp_rotate”Rotate all splits by 90 degrees, swapping horizontal and vertical directions.
bsp_rotate = { { "ctrl", "cmd" }, "r" }Partition layout actions
Section titled “Partition layout actions”These actions only take effect when a Partition layout is active.
send_to_next_region
Section titled “send_to_next_region”Move the focused window to the next region (wraps around).
send_to_next_region = { { "ctrl", "alt" }, "]" }send_to_prev_region
Section titled “send_to_prev_region”Move the focused window to the previous region (wraps around).
send_to_prev_region = { { "ctrl", "alt" }, "[" }balance_regions
Section titled “balance_regions”Reset region assignments to their declared count values.
balance_regions = { { "ctrl", "alt", "shift" }, "b" }Default hotkeys
Section titled “Default hotkeys”Apply all default bindings at once:
spoon.Shoji:bindHotkeys( spoon.Shoji.actions.DEFAULT_HOTKEYS)Default bindings use Ctrl+Alt as the primary modifier to avoid conflicts with Option key special characters on macOS:
focus_left: Ctrl+Alt+Hfocus_right: Ctrl+Alt+Lfocus_up: Ctrl+Alt+Kfocus_down: Ctrl+Alt+Jfocus_next: Ctrl+Alt+Nfocus_prev: Ctrl+Alt+Pfocus_last: Ctrl+Alt+Tabswap_left: Ctrl+Alt+Shift+Hswap_right: Ctrl+Alt+Shift+Lswap_up: Ctrl+Alt+Shift+Kswap_down: Ctrl+Alt+Shift+Jswap_next: Ctrl+Alt+Shift+Nswap_prev: Ctrl+Alt+Shift+Pswap_main: Ctrl+Alt+Shift+Returntoggle_float: Ctrl+Alt+Shift+Ttoggle_zoom: Ctrl+Alt+Ftoggle_cheatsheet: Ctrl+Alt+Shift+/open_command_palette: Ctrl+Alt+/cycle_layout_forward: Ctrl+Alt+Spacecycle_layout_backward: Ctrl+Alt+Shift+Spaceincrease_main_ratio: Ctrl+Alt+=decrease_main_ratio: Ctrl+Alt+-increase_main_count: Ctrl+Alt+,decrease_main_count: Ctrl+Alt+.retile_space: Ctrl+Alt+Shift+Rreset_space: Ctrl+Alt+Shift+0bsp_shrink_horizontal: Ctrl+Cmd+Hbsp_expand_horizontal: Ctrl+Cmd+Lbsp_shrink_vertical: Ctrl+Cmd+Kbsp_expand_vertical: Ctrl+Cmd+Jbsp_rotate: Ctrl+Cmd+Rsend_to_next_region: Ctrl+Alt+]send_to_prev_region: Ctrl+Alt+[balance_regions: Ctrl+Alt+Shift+B
Calling actions directly
Section titled “Calling actions directly”Call actions from Lua without hotkeys:
-- Focus actionsspoon.Shoji.actions.focusLeft()spoon.Shoji.actions.focusRight()spoon.Shoji.actions.focusUp()spoon.Shoji.actions.focusDown()spoon.Shoji.actions.focusNext()spoon.Shoji.actions.focusPrev()spoon.Shoji.actions.focusLast() -- History-based
-- Swap actionsspoon.Shoji.actions.swapLeft()spoon.Shoji.actions.swapRight()spoon.Shoji.actions.swapUp()spoon.Shoji.actions.swapDown()spoon.Shoji.actions.swapNext()spoon.Shoji.actions.swapPrev()spoon.Shoji.actions.swapMain()
-- Window statespoon.Shoji.actions.toggleFloat()spoon.Shoji.actions.toggleZoom()
-- Layout actionsspoon.Shoji.actions.cycleLayoutForward()spoon.Shoji.actions.cycleLayoutBackward()spoon.Shoji.actions.openCommandPalette() -- Opens command palettespoon.Shoji.actions.setLayout("bsp")spoon.Shoji.actions.retileSpace()
-- Adjustment actionsspoon.Shoji.actions.resizeMainInc()spoon.Shoji.actions.resizeMainDec()spoon.Shoji.actions.incMainCount()spoon.Shoji.actions.decMainCount()