mangowmmangowm

Rules

Define behavior for specific windows, tags, and layers.

Window Rules

Window rules allow you to set specific properties (floating, opacity, size, animations, etc.) for applications based on their app_id or title. You can set all parameters in one line, and if you both set app_id and title, the window will only follow the rules when app_id and title both match.

Format:

# Set window rules that apply to every times when the window is opened
window_rule=Parameter:Values,title:Values
window_rule=Parameter:Values,Parameter:Values,app_id:Values,title:Values

# Set window rules that only apply once when the window is opened
window_rule_once=Parameter:Values,title:Values
window_rule_once=Parameter:Values,Parameter:Values,app_id:Values,title:Values

State & Behavior Parameters

ParameterTypeValuesDescription
app_idstringAnyMatch by application ID, supports regex
titlestringAnyMatch by window title, supports regex
is_floatinginteger0 / 1Force floating state
is_fullscreeninteger0 / 1Force fullscreen state
is_fake_fullscreeninteger0 / 1Force fake-fullscreen state (window stays constrained)
is_globalinteger0 / 1Open as global window (sticky across tags)
is_overlayinteger0 / 1Make it always in top layer
is_open_silentinteger0 / 1Open without focus
is_tag_silentinteger0 / 1Don't focus if client is not in current view tag
force_fake_maximizeinteger0 / 1 (default 1)The state of client set to fake maximized
ignore_maximizeinteger0 / 1 (default 1)Don't handle maximize request from client
ignore_minimizeinteger0 / 1 (default 1)Don't handle minimize request from client
force_tiled_stateinteger0 / 1Deceive the window into thinking it is tiling, so it better adheres to assigned dimensions
single_scratchpadinteger0 / 1 (default 1)Only show one out of named scratchpads or the normal scratchpad
allow_shortcuts_inhibitinteger0 / 1 (default 1)Allow shortcuts to be inhibited by clients
idle_inhibit_when_focusinteger0 / 1 (default 0)Automatically keep idle inhibit active when this window is focused
vrr_only_fullscreeninteger0 / 1 (default 0)VRR only fullscreen,you need to turn vrr to 0 in monitor rule first
shield_when_captureinteger0 / 1Shield window when captured
force_renderinteger0 / 1Force render frame even if the window is not visible
activation_bypassinteger0 / 1Bypass xdg-activation authentication: activation requests for this window are treated as authenticated, so the normal activation behavior applies regardless of token validity

Geometry & Position

ParameterTypeValuesDescription
widthfloat0-9999Window width when it becomes a floating window,if the value below 1, it will be the percentage of the screen width,otherwise it will be the pixel value
heightfloat0-9999Window height when it becomes a floating window,if the value below 1, it will be the percentage of the screen height,otherwise it will be the pixel value
offset_xinteger-999-999X offset from center (%), 100 is the edge of screen with outer gap
offset_yinteger-999-999Y offset from center (%), 100 is the edge of screen with outer gap
monitorstringAnyAssign to monitor by monitor spec (name, make, model, or serial)
tagsmask0-9 / 1|3|5Assign to specific one tag (use 0 for special workspace overlay) or multiple tags (use | to split multiple tags)
no_force_centerinteger0 / 1Window does not force center
no_size_hintinteger0 / 1Don't use min size and max size for size hints

Visuals & Decoration

ParameterTypeValuesDescription
no_blurinteger0 / 1Window does not have blur effect
no_borderinteger0 / 1Remove window border
no_shadowinteger0 / 1Not apply shadow
no_radiusinteger0 / 1Not apply corner radius
no_animationinteger0 / 1Not apply animation
focused_opacityinteger0 / 1Window focused opacity
unfocused_opacityinteger0 / 1Window unfocused opacity
allow_csdinteger0 / 1Allow client side decoration
confine_pointerinteger0 / 1While this window is focused and visible, force the cursor to stay inside it (does not require the client to use the pointer constraints protocol)

Tip: For detailed visual effects configuration, see the Window Effects page for blur, shadows, and opacity settings.

Layout & Scroller

ParameterTypeValuesDescription
scroller_proportionfloat0.1-1.0Set scroller proportion
scroller_proportion_singlefloat0.1-1.0Set scroller auto adjust proportion when it is single window

Tip: For comprehensive layout configuration, see the Layouts page for all layout options and detailed settings.

Animation

ParameterTypeValuesDescription
animation_type_openstringzoom, slide, fade, noneSet open animation
animation_type_closestringzoom, slide, fade, noneSet close animation
no_fade_ininteger0 / 1Window ignores fade-in animation
no_fade_outinteger0 / 1Window ignores fade-out animation

Tip: For detailed animation configuration, see the Animations page for available types and settings.

Terminal & Swallowing

ParameterTypeValuesDescription
is_terminteger0 / 1A new GUI window will replace the is_term window when it is opened
no_swallowinteger0 / 1The window will not replace the is_term window

Global & Special Windows

ParameterTypeValuesDescription
global_key_bindingstring[mod combination][-][key]Global keybinding (only works for Wayland apps)
is_unmanaged_globalinteger0 / 1Open as unmanaged global window (for desktop pets or camera windows)
is_named_scratchpadinteger0 / 10: disable, 1: named scratchpad

Tip: For scratchpad usage, see the Scratchpad page for detailed configuration examples.

Performance & Tearing

ParameterTypeValuesDescription
force_tearinginteger0 / 1Set window to tearing state, refer to Tearing

Examples

# Set specific window size and position
window_rule=width:1000,height:900,app_id:yesplaymusic,title:Demons

# Global keybindings for OBS Studio
window_rule=global_key_binding:ctrl+alt-o,app_id:com.obsproject.Studio
window_rule=global_key_binding:ctrl+alt-n,app_id:com.obsproject.Studio
window_rule=is_open_silent:1,app_id:com.obsproject.Studio

# Force tearing for games
window_rule=force_tearing:1,title:vkcube

# Skip xdg-activation authentication for this app
window_rule=activation_bypass:1,app_id:org.example.App
window_rule=force_tearing:1,title:Counter-Strike 2

# Named scratchpad for file manager
window_rule=is_named_scratchpad:1,width:1280,height:800,app_id:st-yazi

# Custom opacity for specific apps
window_rule=focused_opacity:0.8,app_id:firefox
window_rule=unfocused_opacity:0.6,app_id:foot

# Position windows relative to screen center
window_rule=offset_x:20,offset_y:-30,width:800,height:600,app_id:alacritty

# Send to specific tag and monitor
window_rule=tags:9,monitor:HDMI-A-1,app_id:discord

# Terminal swallowdby setup
window_rule=is_term:1,app_id:st
window_rule=no_swallow:1,app_id:foot

# Disable client-side decorations
window_rule=allow_csd:1,app_id:firefox

# Unmanaged global window (desktop pets, camera)
window_rule=is_unmanaged_global:1,app_id:cheese

# Named scratchpad toggle
bind=alt,h,toggle_named_scratchpad,st-yazi,none,st -c st-yazi -e yazi

Tag Rules

You can set all parameters in one line. If only id is set, the rule is followed when the id matches. If any of monitor_name, monitor_make, monitor_model, or monitor_serial are set, the rule is followed only if all of the set monitor fields match.

Warning: Layouts set in tag rules have a higher priority than monitor rule layouts.

Format:

tag_rule=id:Values,Parameter:Values,Parameter:Values
tag_rule=id:Values,monitor_name:eDP-1,Parameter:Values,Parameter:Values
tag_rule=id:Values,monitor_make:xxx,monitor_model:xxx,Parameter:Values
tag_rule=id:*,Parameter:Values

Tip: See Layouts for detailed descriptions of each layout type.

ParameterTypeValuesDescription
idinteger / wildcard0-9 / *Match by tag id, 0 means the ~0 tag. Use * to match all tags at once
monitor_namestringmonitor nameMatch by monitor name
monitor_makestringmonitor makeMatch by monitor manufacturer
monitor_modelstringmonitor modelMatch by monitor model
monitor_serialstringmonitor serialMatch by monitor serial number
layout_namestringlayout nameLayout name to set
no_render_borderinteger0 / 1Disable render border
open_as_floatinginteger0 / 1New open window will be floating
no_hideinteger0 / 1Not hide even if the tag is empty
master_countinteger0, 99Number of master windows
master_factorfloat0.1–0.9Master area factor
scroller_default_proportionfloat0.1-1.0Set scroller default proportion.
scroller_default_proportion_singlefloat0.1-1.0Set scroller auto adjust proportion when it is single window(only apply when set scroller_ignore_proportion_single to 0)
scroller_ignore_proportion_singleinteger0 / 1Ignore scroller single proportion setting.

Examples

# Set layout for all tags at once (equivalent to the two rules below)
tag_rule=id:*,layout_name:scroller

# Set layout for specific tags
tag_rule=id:1,layout_name:scroller
tag_rule=id:2,layout_name:scroller

# Limit to specific monitor
tag_rule=id:1,monitor_name:eDP-1,layout_name:scroller
tag_rule=id:2,monitor_name:eDP-1,layout_name:scroller

# Persistent tags (1-4) with layout assignment
tag_rule=id:1,no_hide:1,layout_name:scroller
tag_rule=id:2,no_hide:1,layout_name:scroller
tag_rule=id:3,monitor_name:eDP-1,no_hide:1,layout_name:scroller
tag_rule=id:4,monitor_name:eDP-1,no_hide:1,layout_name:scroller

# Advanced tag configuration with master layout settings
tag_rule=id:5,layout_name:tile,master_count:2,master_factor:0.6
tag_rule=id:6,monitor_name:HDMI-A-1,layout_name:monocle,no_render_border:1

# set scroller proportion for specific tag
tag_rule=id:1,layout_name:scroller,scroller_default_proportion_single:0.5,scroller_ignore_proportion_single:0,scroller_default_proportion:0.9,monitor_name:HDMI-A-1

Tip: For Waybar configuration with persistent tags, see Status Bar documentation.


Layer Rules

You can set all parameters in one line. Target "layer shell" surfaces like status bars (waybar), launchers (rofi), or notification daemons.

Format:

layer_rule=layer_name:Values,Parameter:Values,Parameter:Values

Tip: You can use mmsg get last_open_surface to get the last open layer name for debugging.

ParameterTypeValuesDescription
layer_namestringlayer nameMatch name of layer, supports regex
animation_type_openstringslide, zoom, fade, noneSet open animation
animation_type_closestringslide, zoom, fade, noneSet close animation
no_blurinteger0 / 1Disable blur
no_animationinteger0 / 1Disable layer animation
no_shadowinteger0 / 1Disable layer shadow
shield_when_captureinteger0 / 1Shield layer when captured.(it is better to combination with no_animation:1)

Tip: For animation types, see Animations. For visual effects, see Window Effects.

Examples

# No blur or animation for slurp selection layer (avoids occlusion and ghosting in screenshots)
layer_rule=no_animation:1,no_blur:1,layer_name:selection

# Zoom animation for Rofi with multiple parameters
layer_rule=animation_type_open:zoom,no_animation:0,layer_name:rofi

# Disable animations and shadows for notification daemon
layer_rule=no_animation:1,no_shadow:1,layer_name:swaync

# Multiple effects for launcher
layer_rule=animation_type_open:slide,animation_type_close:fade,no_blur:1,layer_name:wofi

On this page