Bindings & Input
Key Bindings
Define keyboard shortcuts and modes.
Key bindings follow this format:
bind[flags]=MODIFIERS,KEY,COMMAND,PARAMETERS
- Modifiers:
SUPER, CTRL, ALT, SHIFT, NONE (combine with +).
- Key: Key name (from
xev or wev) or code (e.g., code:24 for q).
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,swaylock
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,default
| 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. |
| Command | Param | Description |
|---|
focusdir | l/r/u/d | Focus window in direction (left, right, up, down). |
focusstack | next/prev | Cycle focus within the stack. |
focuslast | - | Focus the previously active window. |
exchange_client | l/r/u/d | Swap window with neighbor in direction. |
exchange_stack_client | next/prev | Exchange window position in stack. |
zoom | - | Swap focused window with Master. |
| 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 | l/r/u/d/[monitorName] | Focus monitor. |
tagmon | l/r/u/d/[monitorName],[keeptag] | Move window to monitor. |
| 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. |
incgaps | +/-value | Adjust gap size. |
togglegaps | - | Toggle gaps. |
| 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. |
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 | - | Switch keyboard 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. |
| Command | Param | Description |
|---|
smartmovewin | l/r/u/d | Move floating window by snap distance. |
smartresizewin | l/r/u/d | Resize floating window by snap distance. |
movewin | (x,y) | Move floating window. |
resizewin | (width,height) | Resize window. |