Repository navigation
keys
Key bindings follow this format:
bind[flags]=MODIFIERS,KEY,COMMAND,PARAMETERS-
Modifiers:
SUPER,CTRL,ALT,SHIFT,NONE(combine with+, e.g.SUPER+CTRL+ALT). -
Key: Key name (from
xevorwev) or keycode (e.g.,code:24forq).
Info:
bindconverts the key name to a keycode, so it keeps working while other layouts are active. The name is resolved against the layouts configured withxkb_rules_layout(device:*:kb_layoutis not used here), in the order they are listed, and falls back to the referenceuslayout when none of them can produce the key name. This meansbind=SUPER,hresolves to your ownhkey on layout variants such as Dvorak, and to theusposition when only non-latin layouts are configured. Usecode:Nto bind a keycode directly, orbindsto match the character the active layout produces.
-
l: Works even when screen is locked. -
s: Uses keysym instead of keycode to bind. -
r: Triggers on key release instead of press. -
p: Pass key event to client. -
c: allow keybind conflict(need set in all conflict key).
Info:
chas no effect on thereload_configandload_config_filedispatches, which always stop the current key event.
Examples:
bind=SUPER,Q,killclient
bindl=SUPER,L,spawn,swaylock
# Using keycode instead of key name
bind=ALT,code:24,killclient
# Combining keycodes for modifiers and keys
bind=code:64,code:24,killclient
bind=code:64+code:133,code:24,killclient
# Bind with no modifier
bind=NONE,XF86MonBrightnessUp,spawn,brightnessctl set +5%
# Bind a modifier key itself as the trigger key
bind=alt,shift_l,switch_keyboard_layout
# Allow keybind conflict
bindc=SUPER,a,resizewin,+10,0
bindc=SUPER,a,centerwinYou can divide key bindings into named modes. Rules:
- Set
key_mode=<name>before a group ofbindlines — those binds only apply in that mode. - If no
key_modeis set before a bind, it belongs to thedefaultmode. - The special
commonkey_mode applies its binds across all modes.
Info: Key modes also apply to the other input bindings —
mousebind,axisbind,gesturebindandswitchbind— which share the exact samekey_moderules asbind.
Use setkeymode to switch modes, and mmsg get keymode to query the current mode.
# Binds in 'common' apply in every mode
key_mode=common
bind=SUPER,r,reload_config
# Default mode bindings
key_mode=default
bind=ALT,Return,spawn,foot
bind=SUPER,F,setkeymode,resize
# 'resize' mode bindings
key_mode=resize
bind=NONE,Left,resizewin,-10,0
bind=NONE,Right,resizewin,+10,0
bind=NONE,Escape,setkeymode,defaultWhen binding a modifier key itself, use NONE for press and the modifier name for release:
# Trigger on press of Super key
bind=none,Super_L,spawn,rofi -show run
# Trigger on release of Super key
bindr=Super,Super_L,spawn,rofi -show run| Command | Param | Description |
|---|---|---|
killclient |
force |
Close the focused window. If force is specified, sends SIGKILL. |
togglefloating |
- | Toggle floating state. |
toggle_all_floating |
- | Toggle all visible clients 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 minimized window to the currently focused tag. |
toggle_scratchpad |
- | Toggle scratchpad. |
toggle_named_scratchpad |
app_id,title,cmd |
Toggle named scratchpad. Launches app if not running, otherwise shows/hides it. |
toggle_special_tag |
- | Toggle special workspace overlay (tiling scratchpad). |
tag_special_tag |
- | Move focused window to/from the special workspace overlay. |
tag_special_silent |
- | Silently move focused window to/from the special workspace overlay. |
| Command | Param | Description |
|---|---|---|
focusid |
- | Focus window (can target any window via IPC: mmsg dispatch focusid client,<id>) |
focusdir |
left/right/up/down |
Focus window in direction. |
focus_window_or_workspace |
left/right/up/down |
Focus window in direction; otherwise jump to the nearest adjacent tag that has clients, falling back to the next/previous tag if none. |
focusstack |
next/prev |
Cycle focus within the stack. |
overcircle |
next/prev/current_next/current_prev |
Open overview when closed; while it is open, cycle focus to the next/previous window on the current monitor. current_next/current_prev only show the current tagset's windows in the overview instead of all tags. |
focuslast |
- | Focus the previously active window. |
switcher |
next/prev, all_tag_next/all_tag_prev, all_next/all_prev
|
Open or cycle the thumbnail switcher. next/prev list the current tag's windows, all_tag_next/all_tag_prev list all tags on the current monitor, all_next/all_prev list all monitors and tags. Releasing any modifier key selects. |
exchange_client |
left/right/up/down |
Swap the focused window with its neighbor in direction. Both windows change place, and with exchange_cross_monitor enabled they also swap monitors. |
exchange_stack_client |
next/prev |
Exchange window position in stack. |
move_client |
left/right/up/down |
Move the focused window one step in direction. On the same monitor dwindle re-inserts it next to the neighbor keeping the row/column it came from, every other layout swaps it with the neighbor like exchange_client. When the neighbor lies on another monitor the window moves onto that monitor and is inserted in front of or behind the neighbor on the side it comes from; without a neighbor in that direction it moves onto the monitor lying there. Crossing monitors needs exchange_cross_monitor. |
zoom |
- | Swap focused window with Master. |
| Command | Param | Description |
|---|---|---|
groupjoin |
left/right/up/down |
Join group by direction. |
groupfocus |
prev/next |
Focus group member by direction. |
groupleave |
- | Leave group. |
| Command | Param | Description |
|---|---|---|
view |
mask[,synctag] |
View tag(s). Accepts a tag mask. Additionally, 00 shows all tags, -1 shows the previous tagset. Optional synctag (0/1) syncs the action to all monitors. |
viewtoleft |
[synctag] |
View previous tag. Optional synctag (0/1) syncs to all monitors. |
viewtoright |
[synctag] |
View next tag. Optional synctag (0/1) syncs to all monitors. |
view_insert |
prev/next
|
View the adjacent tag if it is empty; otherwise insert an empty tag before/after the current one and switch to it. |
viewtoleft_have_client |
[synctag] |
View left tag and focus client if present. Optional synctag (0/1). |
viewtoright_have_client |
[synctag] |
View right tag and focus client if present. Optional synctag (0/1). |
viewcrossmon |
mask,monitor_spec |
View specified tag(s) on specified monitor. Accepts a tag mask and a monitor spec. |
tag |
mask[,synctag] |
Move window to tag(s). Accepts a tag mask. Optional synctag (0/1) syncs to all monitors. |
tagsilent |
mask |
Move window to tag(s) without focusing it. Accepts a tag mask. |
tagtoleft |
[synctag] |
Move window to left tag. Optional synctag (0/1). |
tagtoright |
[synctag] |
Move window to right tag. Optional synctag (0/1). |
tagcrossmon |
mask,monitor_spec |
Move window to tag(s) on specified monitor. Accepts a tag mask and a monitor spec. |
toggletag |
mask |
Toggle tag(s) on window. Accepts a tag mask. 00 toggles all tags. |
toggleview |
mask |
Toggle view of tag(s). Accepts a tag mask. |
comboview |
mask |
View multiple tags simultaneously. Accepts a tag mask (typically built by pressing keys, e.g., `1 |
focusmon |
left/right/up/down/next/prev/monitor_spec |
Focus monitor by direction, by cycling to the next or previous monitor (next/prev), or by monitor spec. |
tagmon |
left/right/up/down/next/prev/monitor_spec,[keeptag] |
Move window to monitor by direction, by cycling to the next or previous monitor (next/prev), or by monitor spec. keeptag is 0 or 1. |
A tag mask specifies one or more tags for commands that operate on tags.
It is formed by tag numbers 1–9, optionally combined with |.
-
3– single tag 3 -
1|3|5– tags 1, 3, and 5
| 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/up/down |
Move window inside/outside scroller stack by direction. |
incgaps |
+/-value |
Adjust gap size. |
togglegaps |
- | Toggle gaps. |
togglegroupbar |
- | Toggle the group bar on every tiled window. |
dwindle_toggle_split_direction |
- | Toggle split direction in dwindle layout. |
dwindle_split_horizontal |
- | Set split window direction to horizontal in dwindle layout. |
dwindle_split_vertical |
- | Set split window direction to vertical in dwindle layout. |
dwindle_toggle_current_split |
- | Toggle split direction of current window in dwindle layout. |
| Command | Param | Description |
|---|---|---|
spawn |
cmd |
Execute a command. |
spawn_shell |
cmd |
Execute shell command (supports pipes |). |
spawn_on_empty |
cmd, tagmask |
Open command on empty tag.Accepts a cmd string and tagmask |
reload_config |
- | Hot-reload configuration. Does not support keybind conflict (c flag). |
load_config_file |
file path |
Load configuration from the specified file. Empty path resets to default config location. Does not support keybind conflict (c flag). |
quit |
- | Exit mangowm. |
toggleoverview |
[1] |
Toggle overview mode. Passing 1 only shows the current tagset's windows in the overview instead of all tags. |
enteroverview |
- | Enter overview mode. |
leaveoverview |
- | Leave overview mode. |
togglejump |
- | Toggle overview with jump mode. |
create_virtual_output |
- | Create a headless monitor (for VNC/Sunshine). |
destroy_all_virtual_output |
- | Destroy all virtual monitors. |
toggleoverlay |
- | Toggle overlay state for the focused window. |
toggle_trackpad_enable |
- | Toggle trackpad enable. |
setkeymode |
mode |
Set key_mode. |
switch_keyboard_layout |
[index] |
Switch keyboard layout. Optional index (0, 1, 2...) to switch to specific layout. |
setoption |
key,value |
Set config option temporarily. |
sleep_monitor |
monitor_spec |
Shutdown monitor power but not remove. Accepts a monitor spec. |
wakeup_monitor |
monitor_spec |
Turn on monitor power. Accepts a monitor spec. |
sleep_toggle_monitor |
monitor_spec |
Toggle monitor power but not remove. Accepts a monitor spec. |
disable_monitor |
monitor_spec |
remove monitor. Accepts a monitor spec. |
enable_monitor |
monitor_spec |
add monitor. Accepts a monitor spec. |
toggle_monitor |
monitor_spec |
Toggle monitor add/remove. Accepts a monitor spec. |
Warning: Some keyboards don't send standard media keys. Run
wevand press your key to check the exact key name.
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@ toggleRequires: playerctl
bind=NONE,XF86AudioNext,spawn,playerctl next
bind=NONE,XF86AudioPrev,spawn,playerctl previous
bind=NONE,XF86AudioPlay,spawn,playerctl play-pause| 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. |