16 KiB
MangoWC Command Reference
This document lists all available commands that can be used in keybindings, mousebindings, or via IPC (mmsg).
How to Use Commands
In Configuration File (config.conf)
# Syntax: bind=MODIFIERS,KEY,COMMAND,ARGUMENTS
bind=Alt,Return,spawn,foot
bind=Alt,q,killclient,
bind=Ctrl,1,view,1,0
Via IPC (mmsg)
# Syntax: mmsg -d COMMAND ARGUMENTS
mmsg -d spawn firefox
mmsg -d view 3
mmsg -d reload_config
Window Management Commands
killclient
Close the focused window.
Syntax: killclient,
Example:
bind=Alt,q,killclient,
focusstack
Focus next/previous window in the stack.
Arguments: next or prev
Example:
bind=Super,Tab,focusstack,next
bind=Super+Shift,Tab,focusstack,prev
focusdir
Focus window in a specific direction.
Arguments: left, right, up, or down
Example:
bind=Alt,Left,focusdir,left
bind=Alt,Right,focusdir,right
bind=Alt,Up,focusdir,up
bind=Alt,Down,focusdir,down
focuslast
Focus the previously focused window.
Syntax: focuslast,
Example:
bind=Super,grave,focuslast,
exchange_client
Swap the focused window with another window in a direction.
Arguments: left, right, up, or down
Example:
bind=Super+Shift,Left,exchange_client,left
bind=Super+Shift,Right,exchange_client,right
exchange_stack_client
Swap window position in the stack.
Arguments: Stack position parameters
Example:
bind=Super,s,exchange_stack_client,1
zoom
Move focused window to master position.
Syntax: zoom,
Example:
bind=Super,Return,zoom,
Window State Commands
togglefloating
Toggle between floating and tiled mode.
Syntax: togglefloating,
Example:
bind=Alt,backslash,togglefloating,
togglefullscreen
Toggle fullscreen mode.
Syntax: togglefullscreen,
Example:
bind=Alt,f,togglefullscreen,
togglefakefullscreen
Toggle fake fullscreen (fullscreen within layout).
Syntax: togglefakefullscreen,
Example:
bind=Alt+Shift,f,togglefakefullscreen,
togglemaximizescreen
Toggle maximized state.
Syntax: togglemaximizescreen,
Example:
bind=Alt,a,togglemaximizescreen,
toggleglobal
Toggle global state (visible on all tags).
Syntax: toggleglobal,
Example:
bind=Super,g,toggleglobal,
toggleoverlay
Toggle overlay state (always on top).
Syntax: toggleoverlay,
Example:
bind=Super,o,toggleoverlay,
minimized
Minimize the focused window.
Syntax: minimized,
Example:
bind=Super,i,minimized,
restore_minimized
Restore the last minimized window.
Syntax: restore_minimized
Example:
bind=Super+Shift,I,restore_minimized
Tag (Workspace) Commands
view
Switch to a specific tag.
Arguments:
tag_number(1-9)follow(0 or 1, whether to follow window movements)
Example:
bind=Ctrl,1,view,1,0
bind=Ctrl,2,view,2,0
IPC Example:
mmsg -d view 3
tag
Move focused window to a tag and switch to it.
Arguments:
tag_number(1-9)follow(0 or 1)
Example:
bind=Alt,1,tag,1,0
bind=Alt,2,tag,2,0
IPC Example:
mmsg -d tag 5
tagsilent
Move focused window to a tag without switching to it.
Arguments: tag_number (1-9)
Example:
bind=Alt+Shift,1,tagsilent,1
toggletag
Toggle tag visibility (view multiple tags).
Arguments: tag_number (1-9)
Example:
bind=Super,1,toggletag,1
toggleview
Toggle viewing of a tag (add/remove from view).
Arguments: tag_number (1-9)
Example:
bind=Super+Ctrl,1,toggleview,1
comboview
View multiple tags simultaneously.
Arguments: Comma-separated tag numbers
Example:
bind=Super,c,comboview,1,2,3
viewtoleft
Switch to the previous tag.
Arguments: wrap (0 or 1, whether to wrap around)
Example:
bind=Super,Left,viewtoleft,0
viewtoright
Switch to the next tag.
Arguments: wrap (0 or 1, whether to wrap around)
Example:
bind=Super,Right,viewtoright,0
viewtoleft_have_client
Switch to previous tag that has windows.
Arguments: wrap (0 or 1)
Example:
bind=Ctrl,Left,viewtoleft_have_client,0
viewtoright_have_client
Switch to next tag that has windows.
Arguments: wrap (0 or 1)
Example:
bind=Ctrl,Right,viewtoright_have_client,0
tagtoleft
Move focused window to previous tag.
Arguments: wrap (0 or 1)
Example:
bind=Ctrl+Super,Left,tagtoleft,0
tagtoright
Move focused window to next tag.
Arguments: wrap (0 or 1)
Example:
bind=Ctrl+Super,Right,tagtoright,0
bind_to_view
Bind window to always appear on a specific tag.
Arguments: tag_number
Example:
bind=Super,b,bind_to_view,1
Layout Commands
setlayout
Set a specific layout for the current tag.
Arguments: Layout name
Available layouts:
tile- Master-stack tilingscroller- Horizontal scrolling columnsmonocle- One window at a timegrid- Grid arrangementdeck- Stacked windowscenter_tile- Centered mastervertical_tile- Vertical master-stackvertical_scroller- Vertical scrollingvertical_grid- Vertical grid
Example:
bind=Super,t,setlayout,tile
bind=Super,s,setlayout,scroller
bind=Super,m,setlayout,monocle
IPC Example:
mmsg -d setlayout monocle
switch_layout
Cycle through available layouts.
Syntax: switch_layout
Example:
bind=Super,n,switch_layout
setmfact
Set master area size ratio.
Arguments: Ratio change (e.g., +0.05, -0.05)
Example:
bind=Super,h,setmfact,-0.05
bind=Super,l,setmfact,+0.05
incnmaster
Change number of windows in master area.
Arguments: Change amount (e.g., +1, -1)
Example:
bind=Super,equal,incnmaster,+1
bind=Super,minus,incnmaster,-1
Scroller Layout Commands
set_proportion
Set window width proportion in scroller layout.
Arguments: Width ratio (0.0-1.0)
Example:
bind=Alt,e,set_proportion,1.0 # Full width
bind=Alt,w,set_proportion,0.5 # Half width
switch_proportion_preset
Cycle through predefined width presets.
Syntax: switch_proportion_preset,
Example:
bind=Alt,x,switch_proportion_preset,
Note: Presets are defined in config as:
scroller_proportion_preset=0.5,0.8,1.0
scroller_stack
Special scroller stacking behavior.
Arguments: Stacking parameters
Example:
bind=Super,s,scroller_stack,1
Gap Commands
incgaps
Increase or decrease all gaps.
Arguments: Pixel change (positive or negative)
Example:
bind=Alt+Shift,X,incgaps,1 # Increase by 1px
bind=Alt+Shift,Z,incgaps,-1 # Decrease by 1px
togglegaps
Toggle gaps on/off.
Syntax: togglegaps
Example:
bind=Alt+Shift,R,togglegaps
defaultgaps
Reset gaps to default values.
Syntax: defaultgaps
Example:
bind=Alt+Shift,D,defaultgaps
incigaps
Increase/decrease inner gaps.
Arguments: Pixel change
Example:
bind=Super,equal,incigaps,1
bind=Super,minus,incigaps,-1
incihgaps
Increase/decrease inner horizontal gaps.
Arguments: Pixel change
Example:
bind=Super+Shift,equal,incihgaps,1
incivgaps
Increase/decrease inner vertical gaps.
Arguments: Pixel change
Example:
bind=Super+Ctrl,equal,incivgaps,1
incogaps
Increase/decrease outer gaps.
Arguments: Pixel change
Example:
bind=Super+Alt,equal,incogaps,1
incohgaps
Increase/decrease outer horizontal gaps.
Arguments: Pixel change
Example:
bind=Super+Alt+Shift,equal,incohgaps,1
incovgaps
Increase/decrease outer vertical gaps.
Arguments: Pixel change
Example:
bind=Super+Alt+Ctrl,equal,incovgaps,1
Floating Window Commands
movewin
Move floating window by pixels.
Arguments: x_offset,y_offset
Example:
bind=Ctrl+Shift,Left,movewin,-50,+0
bind=Ctrl+Shift,Right,movewin,+50,+0
bind=Ctrl+Shift,Up,movewin,+0,-50
bind=Ctrl+Shift,Down,movewin,+0,+50
resizewin
Resize floating window by pixels.
Arguments: width_change,height_change
Example:
bind=Ctrl+Alt,Left,resizewin,-50,+0
bind=Ctrl+Alt,Right,resizewin,+50,+0
bind=Ctrl+Alt,Up,resizewin,+0,-50
bind=Ctrl+Alt,Down,resizewin,+0,+50
centerwin
Center the focused floating window.
Syntax: centerwin,
Example:
bind=Super,c,centerwin,
smartmovewin
Smart move window (combines with layout logic).
Arguments: Direction and parameters
Example:
bind=Super,w,smartmovewin,up
smartresizewin
Smart resize window (aware of layout).
Arguments: Direction and parameters
Example:
bind=Super,r,smartresizewin,right
moveresize
Mouse-based move/resize.
Arguments:
curmove- Move with mousecurresize- Resize with mouse
Example:
mousebind=SUPER,btn_left,moveresize,curmove
mousebind=SUPER,btn_right,moveresize,curresize
Special Feature Commands
toggleoverview
Toggle overview mode (show all windows).
Syntax: toggleoverview,
Example:
bind=Alt,Tab,toggleoverview,
toggle_scratchpad
Toggle scratchpad visibility.
Syntax: toggle_scratchpad
Example:
bind=Alt,z,toggle_scratchpad
toggle_named_scratchpad
Toggle a named scratchpad.
Arguments: Scratchpad name
Example:
bind=Super,p,toggle_named_scratchpad,music
bind=Super,n,toggle_named_scratchpad,notes
Setup named scratchpads:
-
Open an application
-
Assign it to named scratchpad with IPC:
mmsg -d toggle_named_scratchpad music
toggle_render_border
Toggle border rendering.
Syntax: toggle_render_border,
Example:
bind=Super,b,toggle_render_border,
Monitor Commands
focusmon
Focus adjacent monitor.
Arguments: left or right
Example:
bind=Alt+Shift,Left,focusmon,left
bind=Alt+Shift,Right,focusmon,right
tagmon
Move window to adjacent monitor.
Arguments: left or right
Example:
bind=Super+Alt,Left,tagmon,left
bind=Super+Alt,Right,tagmon,right
viewcrossmon
View tag on different monitor.
Arguments: Monitor and tag parameters
Example:
bind=Super+Ctrl,m,viewcrossmon,1,2
tagcrossmon
Move window to tag on different monitor.
Arguments: Monitor and tag parameters
Example:
bind=Super+Shift,m,tagcrossmon,1,2
disable_monitor
Disable a monitor output.
Arguments: Output name or identifier
Example:
mmsg -d disable_monitor HDMI-A-1
enable_monitor
Enable a monitor output.
Arguments: Output name or identifier
Example:
mmsg -d enable_monitor HDMI-A-1
toggle_monitor
Toggle monitor on/off.
Arguments: Output name or identifier
Example:
bind=Super,F7,toggle_monitor,HDMI-A-1
Virtual Output Commands
create_virtual_output
Create a virtual monitor output.
Arguments: Configuration parameters
Example:
mmsg -d create_virtual_output 1920 1080
destroy_all_virtual_output
Remove all virtual outputs.
Syntax: destroy_all_virtual_output
Example:
mmsg -d destroy_all_virtual_output
Application Commands
spawn
Launch an application.
Arguments: Command to execute
Example:
bind=Alt,Return,spawn,foot
bind=Alt,space,spawn,rofi -show drun
bind=Super,f,spawn,firefox
bind=Super,c,spawn,chromium
IPC Example:
mmsg -d spawn firefox
mmsg -d spawn "foot -e htop"
spawn_shell
Launch command through shell.
Arguments: Shell command
Example:
bind=Super,s,spawn_shell,~/.config/mango/scripts/screenshot.sh
spawn_on_empty
Spawn application on empty tag.
Arguments: Tag number and command
Example:
bind=Super,w,spawn_on_empty,2,firefox
Input Commands
setkeymode
Set keyboard mode (for modal keybindings).
Arguments: Mode name
Example:
bind=Super,k,setkeymode,resize
switch_keyboard_layout
Switch between keyboard layouts.
Syntax: switch_keyboard_layout
Example:
bind=Super,Space,switch_keyboard_layout
Note: Define layouts in config:
xkb_rules_layout=us,ru
toggle_trackpad_enable
Enable/disable trackpad.
Syntax: toggle_trackpad_enable
Example:
bind=Super,F9,toggle_trackpad_enable
System Commands
quit
Exit MangoWC.
Syntax: quit
Example:
bind=Super,m,quit
IPC Example:
mmsg -d quit
reload_config
Reload configuration file.
Syntax: reload_config
Example:
bind=Super,r,reload_config
IPC Example:
mmsg -d reload_config
chvt
Change virtual terminal.
Arguments: VT number
Example:
bind=Ctrl+Alt,F1,chvt,1
bind=Ctrl+Alt,F2,chvt,2
setoption
Set a configuration option at runtime.
Arguments: Option name and value
Example:
mmsg -d setoption animations 0
mmsg -d setoption blur 1
mmsg -d setoption borderpx 2
Complete Example Configuration
Here's a complete example showing various commands in use:
# Applications
bind=Alt,Return,spawn,foot
bind=Alt,space,spawn,rofi -show drun
bind=Super,f,spawn,firefox
bind=Super,e,spawn,thunar
# Window management
bind=Alt,q,killclient,
bind=Alt,Left,focusdir,left
bind=Alt,Right,focusdir,right
bind=Super+Shift,Left,exchange_client,left
bind=Super+Shift,Right,exchange_client,right
# Window states
bind=Alt,backslash,togglefloating,
bind=Alt,f,togglefullscreen,
bind=Alt,a,togglemaximizescreen,
bind=Super,g,toggleglobal,
bind=Super,i,minimized,
# Tags
bind=Ctrl,1,view,1,0
bind=Ctrl,2,view,2,0
bind=Alt,1,tag,1,0
bind=Alt,2,tag,2,0
bind=Super,Left,viewtoleft,0
bind=Super,Right,viewtoright,0
# Layouts
bind=Super,n,switch_layout
bind=Super,t,setlayout,tile
bind=Super,s,setlayout,scroller
# Special features
bind=Alt,Tab,toggleoverview,
bind=Alt,z,toggle_scratchpad
# Gaps
bind=Alt+Shift,X,incgaps,1
bind=Alt+Shift,Z,incgaps,-1
bind=Alt+Shift,R,togglegaps
# System
bind=Super,r,reload_config
bind=Super,m,quit
Using Commands via IPC
All commands can be executed via the mmsg IPC tool:
Basic Syntax
mmsg -d COMMAND ARGUMENTS
Examples
Window management:
mmsg -d killclient
mmsg -d togglefloating
mmsg -d togglefullscreen
Tag switching:
mmsg -d view 3
mmsg -d tag 5
mmsg -d viewtoright
Layout control:
mmsg -d setlayout monocle
mmsg -d switch_layout
Application launching:
mmsg -d spawn firefox
mmsg -d spawn "foot -e htop"
System control:
mmsg -d reload_config
mmsg -d setoption animations 1
Scripting with mmsg
Example 1: Toggle between two layouts
#!/bin/bash
LAYOUT=$(mmsg -L | head -1 | grep -o "tile\|monocle")
if [ "$LAYOUT" = "tile" ]; then
mmsg -d setlayout monocle
else
mmsg -d setlayout tile
fi
Example 2: Move all windows to tag 1
#!/bin/bash
for i in {2..9}; do
mmsg -d view $i
while mmsg -c | grep -q "clients:"; do
mmsg -d tag 1
done
done
mmsg -d view 1
Example 3: Cycle through tags with windows
#!/bin/bash
mmsg -d viewtoright_have_client
See Also
- config.conf - Configuration file with all keybindings
- README.md - General documentation and quick start guide
- MangoWC Wiki - Comprehensive online documentation