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 appid or title. You can set all parameters in one line, and if you both set appid and title, the window will only follow the rules when appid and title both match.

Format:

windowrule=Parameter:Values,title:Values
windowrule=Parameter:Values,Parameter:Values,appid:Values,title:Values

State & Behavior Parameters

ParameterTypeValuesDescription
appidstringAnyMatch by application ID, supports regex
titlestringAnyMatch by window title, supports regex
isfloatinginteger0 / 1Force floating state
isfullscreeninteger0 / 1Force fullscreen state
isfakefullscreeninteger0 / 1Force fake-fullscreen state (window stays constrained)
isglobalinteger0 / 1Open as global window (sticky across tags)
isoverlayinteger0 / 1Make it always in top layer
isopensilentinteger0 / 1Open without focus
istagsilentinteger0 / 1Don't focus if client is not in current view tag
force_fakemaximizeinteger0 / 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
noopenmaximizedinteger0 / 1Window does not open as maximized mode
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
indleinhibit_when_focusinteger0 / 1 (default 0)Automatically keep idle inhibit active when this window is focused

Geometry & Position

ParameterTypeValuesDescription
widthinteger0-9999Window width when it becomes a floating window
heightinteger0-9999Window height when it becomes a floating window
offsetxinteger-999-999X offset from center (%), 100 is the edge of screen with outer gap
offsetyinteger-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)
tagsinteger1-9Assign to specific tag
no_force_centerinteger0 / 1Window does not force center
isnosizehintinteger0 / 1Don't use min size and max size for size hints

Visuals & Decoration

ParameterTypeValuesDescription
noblurinteger0 / 1Window does not have blur effect
isnoborderinteger0 / 1Remove window border
isnoshadowinteger0 / 1Not apply shadow
isnoradiusinteger0 / 1Not apply corner radius
isnoanimationinteger0 / 1Not apply animation
focused_opacityinteger0 / 1Window focused opacity
unfocused_opacityinteger0 / 1Window unfocused opacity
allow_csdinteger0 / 1Allow client side decoration

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
nofadeininteger0 / 1Window ignores fade-in animation
nofadeoutinteger0 / 1Window ignores fade-out animation

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

Terminal & Swallowing

ParameterTypeValuesDescription
isterminteger0 / 1A new GUI window will replace the isterm window when it is opened
noswallowinteger0 / 1The window will not replace the isterm window

Global & Special Windows

ParameterTypeValuesDescription
globalkeybindingstring[mod combination][-][key]Global keybinding (only works for Wayland apps)
isunglobalinteger0 / 1Open as unmanaged global window (for desktop pets or camera windows)
isnamedscratchpadinteger0 / 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
windowrule=width:1000,height:900,appid:yesplaymusic,title:Demons

# Global keybindings for OBS Studio
windowrule=globalkeybinding:ctrl+alt-o,appid:com.obsproject.Studio
windowrule=globalkeybinding:ctrl+alt+n,appid:com.obsproject.Studio
windowrule=isopensilent:1,appid:com.obsproject.Studio

# Force tearing for games
windowrule=force_tearing:1,title:vkcube
windowrule=force_tearing:1,title:Counter-Strike 2

# Named scratchpad for file manager
windowrule=isnamedscratchpad:1,width:1280,height:800,appid:st-yazi

# Custom opacity for specific apps
windowrule=focused_opacity:0.8,appid:firefox
windowrule=unfocused_opacity:0.6,appid:foot

# Disable blur for selection tools
windowrule=noblur:1,appid:slurp

# Position windows relative to screen center
windowrule=offsetx:20,offsety:-30,width:800,height:600,appid:alacritty

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

# Terminal swallowing setup
windowrule=isterm:1,appid:st
windowrule=noswallow:1,appid:foot

# Disable client-side decorations
windowrule=allow_csd:1,appid:firefox

# Unmanaged global window (desktop pets, camera)
windowrule=isunglobal:1,appid: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:

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

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

ParameterTypeValuesDescription
idinteger0-9Match by tag id, 0 means the ~0 tag
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
nmasterinteger0, 99Number of master windows
mfactfloat0.1–0.9Master area factor

Examples

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

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

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

# Advanced tag configuration with master layout settings
tagrule=id:5,layout_name:tile,nmaster:2,mfact:0.6
tagrule=id:6,monitor_name:HDMI-A-1,layout_name:monocle,no_render_border: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:

layerrule=layer_name:Values,Parameter:Values,Parameter:Values

Tip: You can use mmsg -e 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
noblurinteger0 / 1Disable blur
noaniminteger0 / 1Disable layer animation
noshadowinteger0 / 1Disable layer shadow

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)
layerrule=noanim:1,noblur:1,layer_name:selection

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

# Disable animations and shadows for notification daemon
layerrule=noanim:1,noshadow:1,layer_name:swaync

# Multiple effects for launcher
layerrule=animation_type_open:slide,animation_type_close:fade,noblur:1,layer_name:wofi

On this page