Focus
Mod+Arrows
Focus left / down / up / right
Mod+h, j, k, l do the same: left, down, up, right.
Mod+a
Focus parent container
Press again to climb further; focus child steps back down.
Mod+Space
Toggle focus tiling / floating
Mod+Shift+q
Kill focused window
focus output <dir>
Focus another monitor
[app_id="<name>"] focus
Jump to a window by criteria
Use in a bindsym or via swaymsg. Native Wayland apps match
app_id; XWayland apps match class.
Workspaces
Mod+1-9
Switch to workspace N
Mod+0 goes to workspace 10.
workspace back_and_forth
Toggle with previous workspace
workspace next / workspace prev
Cycle through used workspaces
workspace number <n>:<name>
Switch to a named workspace
move workspace to output <dir>
Send workspace to another monitor
workspace <ws> output <output>
Pin a workspace to a monitor (config)
assign [app_id="<name>"] workspace
<ws>
Always open an app on a workspace (config)
Session and Config
Mod+Shift+c
Reload config
Mod+Shift+e
Exit sway (asks first)
sway -C
Check the config for errors
swaymsg <command>
Run any sway command from a shell
swaymsg -t get_tree
Dump the window tree as JSON
Also get_outputs, get_inputs and get_workspaces.
swaymsg -t get_inputs
List input devices and their names
bindsym $mod+<key> <command>
Bind a key to a command (config)
bindsym --release <key> <command>
Fire on key release (config)
exec <command>
Start once at login (config)
exec_always <command>
Also run on every reload (config)
mode "<name>" { ... }
Define a binding mode (config)
set $mod Mod4
Use Super as the modifier (config)
output <name> resolution <w>x<h> position
<x> <y>
Configure a monitor (config)
input type:keyboard xkb_layout <layout>
Set keyboard layout (config)