Bindings & Input
Key Bindings
Define keyboard shortcuts and modes.
Syntax
Key bindings follow this format:
bind[flags]=MODIFIERS,KEY,COMMAND,PARAMETERS- Modifiers:
SUPER,CTRL,ALT,SHIFT,NONE(combine with+). - Key: Key name (from
xevorwev) or code (e.g.,code:24forq).
Flags
l: Works even when screen is locked.s: Uses keysym instead of keycode.r: Triggers on key release instead of press.p: Pass key event to client.
Examples:
bind=SUPER,Q,killclient
bindl=SUPER,L,spawn,swaylockKey Modes (Submaps)
You can create modal keybindings (like resize mode in Sway).
# Enter 'resize' mode
bind=ALT,R,setkeymode,resize
keymode=resize
bind=NONE,Left,resizewin,-10,0
bind=NONE,Escape,setkeymode,defaultDispatchers List
Window Management
| Command | Param | Description |
|---|---|---|
killclient | - | Close the focused window. |
togglefloating | - | Toggle floating state. |
togglefullscreen | - | Toggle fullscreen. |
togglefakefullscreen | - | Toggle "fake" fullscreen (remains constrained). |
togglemaximizescreen | - | Maximize window (keep decoration/bar). |
toggleglobal | - | Pin window to all tags. |
toggle_render_border | - | Toggle border rendering. |
centerwin | - | Center the floating window. |
minimized | - | Minimize window to scratchpad. |
restore_minimized | - | Restore window from scratchpad. |
toggle_scratchpad | - | Toggle scratchpad. |
toggle_name_scratchpad | (appid,title,width,height,cmd) | Toggle named scratchpad. |
Focus & Movement
| Command | Param | Description |
|---|---|---|
focusdir | left/right/up/down | Focus window in direction (left, right, up, down). |
focusstack | next/prev | Cycle focus within the stack. |
focuslast | - | Focus the previously active window. |
exchange_client | left/right/up/down | Swap window with neighbor in direction. |
exchange_stack_client | next/prev | Exchange window position in stack. |
zoom | - | Swap focused window with Master. |
Tags & Monitors
| Command | Param | Description |
|---|---|---|
view | 1-9 or mask | View tag or mask (e.g., 1|3|5). |
viewtoleft | - | View previous tag. |
viewtoright | - | View next tag. |
viewtoleft_have_client | - | View left tag and focus client if present. |
viewtoright_have_client | - | View right tag and focus client if present. |
viewcrossmon | tag,monitor | View specified tag on specified monitor. |
tag | 1-9 | Move window to tag. |
tagtoleft | - | Move window to left tag. |
tagtoright | - | Move window to right tag. |
tagcrossmon | tag,monitor | Move window to specified tag on specified monitor. |
toggletag | 0-9 | Toggle tag on window (0 means all tags). |
toggleview | 1-9 | Toggle tag view. |
comboview | 1-9 | View multi tags pressed simultaneously. |
focusmon | left/right/up/down/[monitorName] | Focus monitor. monitorName is the monitor name string. |
tagmon | left/right/up/down/[monitorName],[keeptag] | Move window to monitor. keeptag is 0 or 1. |
Layouts
| Command | Param | Description |
|---|---|---|
setlayout | name | Switch to layout (e.g., scroller, tile). |
switch_layout | - | Cycle through available layouts. |
incnmaster | +1/-1 | Increase/Decrease number of master windows. |
setmfact | +0.05 | Increase/Decrease master area size. |
set_proportion | float | Set scroller window proportion (0.0-1.0). |
switch_proportion_preset | - | Cycle proportion presets of scroller window. |
scroller_stack | left/right | Move window inside/outside scroller stack. |
incgaps | +/-value | Adjust gap size. |
togglegaps | - | Toggle gaps. |
System
| Command | Param | Description |
|---|---|---|
spawn | cmd | Execute a command. |
spawn_shell | cmd | Execute shell command (supports pipes |). |
spawn_on_empty | cmd,tagnumber | Open command on empty tag. |
reload_config | - | Hot-reload configuration. |
quit | - | Exit MangoWC. |
toggleoverview | - | Toggle overview mode. |
create_virtual_output | - | Create a headless monitor (for VNC/Sunshine). |
destroy_all_virtual_output | - | Destroy all virtual monitors. |
toggle_trackpad_enable | - | Toggle trackpad enable. |
setkeymode | mode | Set keymode. |
switch_keyboard_layout | [index] | Switch keyboard layout. Optional index (0, 1, 2...) to switch to specific layout. |
setoption | key,value | Set config option temporarily. |
disable_monitor | monitor_name | Shutdown monitor. |
enable_monitor | monitor_name | Open monitor. |
toggle_monitor | monitor_name | Toggle monitor power. |
Media Controls
Requires: brightnessctl
bind=NONE,XF86MonBrightnessUp,spawn,brightnessctl s +2%
bind=SHIFT,XF86MonBrightnessUp,spawn,brightnessctl s 100%
bind=NONE,XF86MonBrightnessDown,spawn,brightnessctl s 2%-
bind=SHIFT,XF86MonBrightnessDown,spawn,brightnessctl s 1%Requires: wpctl (WirePlumber)
bind=NONE,XF86AudioRaiseVolume,spawn,wpctl set-volume @DEFAULT_SINK@ 5%+
bind=NONE,XF86AudioLowerVolume,spawn,wpctl set-volume @DEFAULT_SINK@ 5%-
bind=NONE,XF86AudioMute,spawn,wpctl set-mute @DEFAULT_SINK@ toggle
bind=SHIFT,XF86AudioMute,spawn,wpctl set-mute @DEFAULT_SOURCE@ toggleSome keyboards don't send standard media keys. Run wev and press your key to check.
Floating Window Movement
| Command | Param | Description |
|---|---|---|
smartmovewin | left/right/up/down | Move floating window by snap distance. |
smartresizewin | left/right/up/down | Resize floating window by snap distance. |
movewin | (x,y) | Move floating window. |
resizewin | (width,height) | Resize window. |