Skip to main content

Overview

Mango uses a declarative keybinding syntax where you define modifier keys and commands. Keybindings are defined in config.conf using the bind= directive.

Binding Syntax

bind=MODIFIER,key,command,arguments

Modifier Keys

  • SUPER - Super/Windows/Meta key
  • ALT - Alt key
  • CTRL - Control key
  • SHIFT - Shift key
  • NONE - No modifier
Multiple modifiers can be combined with +:
  • SUPER+SHIFT
  • ALT+SHIFT
  • CTRL+SUPER

Key Names

Key names can be determined using the wev or xev command. Common keys include:
  • Letters: a-z
  • Numbers: 1-9, 0
  • Special keys: Return, space, Tab, backslash
  • Arrow keys: Left, Right, Up, Down

Default Keybindings

System Control

SUPER + r
reload_config
Reload the configuration file without restarting
bind=SUPER,r,reload_config
SUPER + m
quit
Exit Mango compositor
bind=SUPER,m,quit

Application Launching

ALT + space
spawn
Launch application launcher (rofi)
bind=Alt,space,spawn,rofi -show drun
ALT + Return
spawn
Launch terminal (foot)
bind=Alt,Return,spawn,foot
ALT + q
killclient
Close the focused window
bind=ALT,q,killclient,

Window Focus

SUPER + Tab
focusstack
Focus next window in stack
bind=SUPER,Tab,focusstack,next
ALT + Arrow Keys
focusdir
Focus window in direction (left, right, up, down)
bind=ALT,Left,focusdir,left
bind=ALT,Right,focusdir,right
bind=ALT,Up,focusdir,up
bind=ALT,Down,focusdir,down

Window Manipulation

SUPER + SHIFT + Arrow Keys
exchange_client
Swap window with adjacent window in direction
bind=SUPER+SHIFT,Up,exchange_client,up
bind=SUPER+SHIFT,Down,exchange_client,down
bind=SUPER+SHIFT,Left,exchange_client,left
bind=SUPER+SHIFT,Right,exchange_client,right

Window States

SUPER + g
toggleglobal
Toggle window global state (visible on all tags)
bind=SUPER,g,toggleglobal,
ALT + Tab
toggleoverview
Toggle overview mode
bind=ALT,Tab,toggleoverview,
ALT + backslash
togglefloating
Toggle window floating state
bind=ALT,backslash,togglefloating,
ALT + a
togglemaximizescreen
Toggle window maximized state
bind=ALT,a,togglemaximizescreen,
ALT + f
togglefullscreen
Toggle window fullscreen state
bind=ALT,f,togglefullscreen,
ALT + SHIFT + f
togglefakefullscreen
Toggle fake fullscreen (fullscreen within window area)
bind=ALT+SHIFT,f,togglefakefullscreen,
SUPER + i
minimized
Minimize the focused window
bind=SUPER,i,minimized,
SUPER + SHIFT + I
restore_minimized
Restore minimized window
bind=SUPER+SHIFT,I,restore_minimized
SUPER + o
toggleoverlay
Toggle window overlay mode
bind=SUPER,o,toggleoverlay,
ALT + z
toggle_scratchpad
Toggle scratchpad visibility
bind=ALT,z,toggle_scratchpad

Layout Control

SUPER + n
switch_layout
Cycle through available layouts
bind=SUPER,n,switch_layout
ALT + e
set_proportion
Set scroller layout proportion (scroller layout only)
bind=ALT,e,set_proportion,1.0
ALT + x
switch_proportion_preset
Cycle through proportion presets (scroller layout only)
bind=ALT,x,switch_proportion_preset,

Tag Navigation

SUPER + Left/Right
viewtoleft/viewtoright
Switch to previous/next tag
bind=SUPER,Left,viewtoleft,0
bind=SUPER,Right,viewtoright,0
CTRL + Left/Right
viewtoleft_have_client/viewtoright_have_client
Switch to previous/next tag that has windows
bind=CTRL,Left,viewtoleft_have_client,0
bind=CTRL,Right,viewtoright_have_client,0
CTRL + 1-9
view
Switch to specific tag (workspace)
bind=Ctrl,1,view,1,0
bind=Ctrl,2,view,2,0
...
bind=Ctrl,9,view,9,0
ALT + 1-9
tag
Move window to specific tag and follow it
bind=Alt,1,tag,1,0
bind=Alt,2,tag,2,0
...
bind=Alt,9,tag,9,0
CTRL + SUPER + Left/Right
tagtoleft/tagtoright
Move window to previous/next tag
bind=CTRL+SUPER,Left,tagtoleft,0
bind=CTRL+SUPER,Right,tagtoright,0

Monitor Control

ALT + SHIFT + Left/Right
focusmon
Focus monitor in direction
bind=alt+shift,Left,focusmon,left
bind=alt+shift,Right,focusmon,right
SUPER + ALT + Left/Right
tagmon
Move window to monitor in direction
bind=SUPER+Alt,Left,tagmon,left
bind=SUPER+Alt,Right,tagmon,right

Gaps Control

ALT + SHIFT + X
incgaps
Increase gaps
bind=ALT+SHIFT,X,incgaps,1
ALT + SHIFT + Z
incgaps
Decrease gaps
bind=ALT+SHIFT,Z,incgaps,-1
ALT + SHIFT + R
togglegaps
Toggle gaps on/off
bind=ALT+SHIFT,R,togglegaps

Floating Window Movement

CTRL + SHIFT + Arrow Keys
movewin
Move floating window by pixels
bind=CTRL+SHIFT,Up,movewin,+0,-50
bind=CTRL+SHIFT,Down,movewin,+0,+50
bind=CTRL+SHIFT,Left,movewin,-50,+0
bind=CTRL+SHIFT,Right,movewin,+50,+0

Floating Window Resizing

CTRL + ALT + Arrow Keys
resizewin
Resize floating window by pixels
bind=CTRL+ALT,Up,resizewin,+0,-50
bind=CTRL+ALT,Down,resizewin,+0,+50
bind=CTRL+ALT,Left,resizewin,-50,+0
bind=CTRL+ALT,Right,resizewin,+50,+0

Mouse Bindings

Mouse bindings are defined with mousebind=:
mousebind=MODIFIER,button,command,arguments

Default Mouse Bindings

SUPER + Left Click
moveresize
Move window by dragging
mousebind=SUPER,btn_left,moveresize,curmove
Middle Click
togglemaximizescreen
Toggle maximize on click
mousebind=NONE,btn_middle,togglemaximizescreen,0
SUPER + Right Click
moveresize
Resize window by dragging
mousebind=SUPER,btn_right,moveresize,curresize

Axis Bindings

Axis bindings (scroll wheel) are defined with axisbind=:
axisbind=MODIFIER,direction,command

Default Axis Bindings

SUPER + Scroll Up
viewtoleft_have_client
Switch to previous tag with windows
axisbind=SUPER,UP,viewtoleft_have_client
SUPER + Scroll Down
viewtoright_have_client
Switch to next tag with windows
axisbind=SUPER,DOWN,viewtoright_have_client

Custom Keybindings

You can create custom keybindings by adding new bind= lines to your config.conf:
# Launch your preferred browser
bind=SUPER,b,spawn,firefox

# Launch file manager
bind=SUPER,f,spawn,thunar

# Custom script
bind=SUPER+SHIFT,s,spawn_shell,/path/to/your/script.sh

See Also

Build docs developers (and LLMs) love