spatial(1)
π spatial(1) β the vibe check π
okay so real talk, this is the spatial page from the General Commands Manual, section 1, and it's genuinely one of my faves. sit down, grab a strawberry π, let's go.
β¨ NAME β¨
spatial β bestie, it implements a spatial model inspired by Material Shell and Paper WM, for sway. no cap.
πΈ SYNOPSIS πΈ
spatial
that's it. that's the whole synopsis. iconic minimalism π
π¦ DESCRIPTION π¦
Spatial Shell is a daemon implementing a spatial model inspired by Material Shell, for i3 and sway. More precisely β and this is the part that's giving main character energy β it organizes your windows within a grid whose rows are the workspaces of your favorite WM. the way that works?? obsessed. π₯
In a nutshell, Spatial Shell allows you to:
- Move the focus within the grid: on the left or on the right within the current workspace, or on the focused window of the upper or lower workspace. In the former case, the current workspace does not change, while in the latter it does. yes, that distinction matters, write it down π
- Move the focused window within the grid: to the left or to the right within the current workspace, or to the upper or lower workspace. In the former case, the focused window is swapped with its neighbor, while in the former it is inserted at the right of the previously focused window within this row. (and yes, that sentence says "former" twice β I'm just the messenger, don't come for me π)
- Configure how many windows are displayed at most within a given workspace (for when the workspace uses the column layout). lowkey so useful.
- Toggle between the Column and maximize layout for the current workspace (see the LAYOUTS section down below π)
Spatial Shell consists in a daemon (spatial) and a client (spatialmsg(1)) communicating with a IPC protocol (spatial-ipc(7)). The most straightforward way to run the Spatial Shell daemon is via your favorite WM configuration file. fr fr, just drop it in there:
# Assuming `spatial` is available from $PATH
exec spatial
Once spatial is running, you can assign bindings to interact with it using spatialmsg(1) as part of the configuration of your favorite WM π:
# Assuming `spatialmsg` is available from $PATH
bindsym $mod+h exec $spatialmsg "focus left"
bindsym $mod+l exec $spatialmsg "focus right"
bindsym $mod+k exec $spatialmsg "focus up"
bindsym $mod+j exec $spatialmsg "focus down"
For more information about the commands (including the exact syntax π) which can be sent to spatial via spatialmsg(1), see spatial(5). iykyk.
π LAYOUTS π
In Spatial Shell, workspaces can use one of two modes: maximize and column. Each layout determines the strategy to display and organize the windows of the workspace. two modes, both slay:
- Maximize: The focused window takes up the whole workspace. one window, whole screen, main character energy π
- Column: Up to a fixed number of windows are displayed on the workspace, the rest is hidden. the extras are just backstage, waiting their turn π§
π CONFIGURATION π
spatial(5) searches for a config file in $XDG_CONFIG_HOME/spatial/config. If $XDG_CONFIG_HOME is unset, it defaults to $HOME/.config. found her β¨
The config file of Spatial Shell is a list of commands (one per line). Additionally, a line starting with a # is ignored β but inline comments are not supported, that is, it is not possible to add a comment at the end of a valid command. so sad but so true π«Ά. See spatial(5) for information about supported commands.
Spatial Shell is a lot more enjoyable to use with some visual aids to help you visualize the state of the grid. To that end, spatial can be configured to send a signal (SIGMIN+8) to a status bar everytime the configuration of the grid changes (that is when the focus or the order of the windows changes). visual feedback?? we love to see it π
spatial uses pkill(1) to send the signal, and does so only when it has been provided the name of the status bar program with the status_bar_name command. For instance, assuming you are using waybar(5), add this line to your Spatial Shell config file:
status_bar_name "waybar"
and boom, status bar goes brrr π
β IPC COMMANDS β
Though spatialmsg(1) is generally preferred, you may interact with Spatial Shell directly via IPC, see spatial-ipc(7). This is typically what spatialblock(1) does to reduce latency as much as possible. speed demon behaviour, honestly π
The socket created by Spatial Shell is $XDG_RUNTIME_DIR/spatial.sock. If $XDG_RUNTIME_DIR defaults to /tmp, that is the socket is /tmp/spatial.sock. keep that path in your notes bestie ποΈ
π§ ENVIRONMENT π§
The following environment variables have an effect on Spatial Shell. yes, all four, no skipping π
SWAYSOCKβ Specifies the path to the socketspatialwill connect to in order to interact with sway. If unset, defaults toI3SOCK.I3SOCKβ Specifies the path to the socketspatialwill connect to in order to interact with i3, whenSWAYLOCKis unset. If required but unset,spatialwill exit with an error. (heads up: that'sSWAYLOCKexactly as written β copy it character for character, don't be clever π )XDG_CONFIG_HOMEβ If set, tells Spatial Shell where to find its config file. If unset, its value is defaulted to$HOME/.config.XDG_RUNTIME_DIRβ If set, tells Spatial Shell where to create the socket other tools can use to control it. If unset, defaults to/tmp. For more information, see section IPC COMMANDS.
π AUTHOR π
Developed by Thomas Letan <lthms@soap.coffee>. Fore more information about Spatial Shell development, see <https://github.com/lthms/spatial-shell>. (typo "Fore" is theirs, keeping it, we respect the source π) give the dev some love, they ate π₯
π ACKNOWLEDGMENT π
Spatial Shell could not have been possible without sway, which remains a reference and a significant source of inspiration for the software architecture of this project, including for the wording of several man pages. shoutout sway, the blueprint, the blueprint fr π«ΆπΈ
and that's the whole page bestie!! π this was spatial(1) from the General Commands Manual β dated 1980-01-01, and the page signs off as spatial(1) one last time. go forth, arrange your windows in a grid, and live your spatial fantasy β¨ππ¦
π¦ where this page comes from
- nixos 26.05: ocaml5.4.1-spatial-shell 7
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms