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:ValuesState & Behavior Parameters
| Parameter | Type | Values | Description |
|---|---|---|---|
appid | string | Any | Match by application ID, support regex |
title | string | Any | Match by window title, support regex |
isfloating | integer | 0 / 1 | Force floating state |
isfullscreen | integer | 0 / 1 | Force fullscreen state |
isglobal | integer | 0 / 1 | Open as global window (sticky across tags) |
isoverlay | integer | 0 / 1 | Make it always in top layer |
isopensilent | integer | 0 / 1 | Open without focus |
istagsilent | integer | 0 / 1 | Don't focus if client is not in current view tag |
force_maximize | integer | 0 / 1 (default 1) | The state of client default to maximized |
ignore_maximize | integer | 0 / 1 (default 1) | Don't handle maximize request from client |
ignore_minimize | integer | 0 / 1 (default 1) | Don't handle minimize request from client |
force_tile_state | integer | 0 / 1 | Force set window to tile state |
noopenmaximized | integer | 0 / 1 | Window does not open as maximized mode |
single_scratchpad | integer | 0 / 1 (default 1) | Only show one out of named scratchpads or the normal scratchpad |
allow_shortcuts_inhibit | integer | 0 / 1 (default 1) | Allow shortcuts to be inhibited by clients |
Geometry & Position
| Parameter | Type | Values | Description |
|---|---|---|---|
width | integer | 0-9999 | Window width when it becomes a floating window |
height | integer | 0-9999 | Window height when it becomes a floating window |
offsetx | integer | -999-999 | X offset from center (%), 100 is the edge of screen with outer gap |
offsety | integer | -999-999 | Y offset from center (%), 100 is the edge of screen with outer gap |
monitor | string | Any | Assign to monitor by monitor name |
tags | integer | 1-9 | Assign to specific tag |
no_force_center | integer | 0 / 1 | Window does not force center |
isnosizehint | integer | 0 / 1 | Don't use min size and max size for size hints |
Visuals & Decoration
| Parameter | Type | Values | Description |
|---|---|---|---|
noblur | integer | 0 / 1 | Window does not have blur effect |
isnoborder | integer | 0 / 1 | Remove window border |
isnoshadow | integer | 0 / 1 | Not apply shadow |
isnoradius | integer | 0 / 1 | Not apply corner radius |
isnoanimation | integer | 0 / 1 | Not apply animation |
focused_opacity | integer | 0 / 1 | Window focused opacity |
unfocused_opacity | integer | 0 / 1 | Window unfocused opacity |
allow_csd | integer | 0 / 1 | Allow client side decoration |
For detailed visual effects configuration, see the Window Effects page for blur, shadows, and opacity settings.
Layout & Scroller
| Parameter | Type | Values | Description |
|---|---|---|---|
scroller_proportion | float | 0.1-1.0 | Set scroller proportion |
scroller_proportion_single | float | 0.1-1.0 | Set scroller auto adjust proportion when it is single window |
For comprehensive layout configuration, see the Layouts page for all layout options and detailed settings.
Animation
| Parameter | Type | Values | Description |
|---|---|---|---|
animation_type_open | string | zoom,slide,fade,none | Set open animation |
animation_type_close | string | zoom,slide,fade,none | Set close animation |
nofadein | integer | 0 / 1 | Window ignores fadein animation |
For detailed animation configuration, see the Animations page for available types and settings.
Terminal & Swallowing
| Parameter | Type | Values | Description |
|---|---|---|---|
isterm | integer | 0 / 1 | A new gui window will replace the isterm window when it is opened |
noswallow | integer | 0 / 1 | The window will not replace the isterm window |
Global & Special Windows
| Parameter | Type | Values | Description |
|---|---|---|---|
globalkeybinding | string | [mod scombination][-][key] | Global keybinding (only works for wayland apps) |
isunglobal | integer | 0 / 1 | Open as unmanaged global window (for desktop pets or camera windows) |
isnamedscratchpad | integer | 0 / 1 | 0: disable, 1: named scratchpad |
For scratchpad usage, see the Scratchpad page for detailed configuration examples.
Performance & Tearing
| Parameter | Type | Values | Description |
|---|---|---|---|
force_tearing | integer | 0 / 1 | Set 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 yaziTag Rules
You can set all parameters in one line. If only id is set, the rule is followed when the id matches. If both id and monitor_name are set, the rule is followed only if both id and monitor_name match.
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:ValuesSee Layouts for detailed descriptions of each layout type.
| Parameter | Type | Values | Description |
|---|---|---|---|
id | integer | 0-9 | Match by tags id, 0 means ~0 tag |
monitor_name | string | monitor name | Match by monitor name |
layout_name | string | layout name | Layout name to set |
no_render_border | integer | 0 / 1 | Disable render border |
no_hide | integer | 0 / 1 | Not hide even if the tag is empty |
nmaster | integer | 0,99 | Number of master window |
mfact | integer | 0.1,0.9 | Master 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:1For 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:ValuesYou can use mmsg -e to get the last open layer name for debugging.
| Parameter | Type | Values | Description |
|---|---|---|---|
layer_name | string | layer_name | Match name of layer, support regex |
animation_type_open | string | slide, zoom, fade, none | Set open animation |
animation_type_close | string | slide, zoom, fade, none | Set close animation |
noblur | integer | 0 / 1 | Disable blur |
noanim | integer | 0 / 1 | Disable layer animation |
noshadow | integer | 0 / 1 | Disable layer shadow |
For animation types, see Animations. For visual effects, see Window Effects.
Examples:
# No blur slurp select layer
layerrule=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