# Window Rules — Hyprland 0.48–0.51 Reference for the syntax currently used on this machine. See [version-history.md](version-history.md) for what changes on upgrade. ## Syntax (current: 0.48–0.51) ``` windowrule = match:class classname, effect windowrule = match:class classname, match:title titlepattern, effect1, effect2 ``` Patterns are plain names or bare regexes. **Do NOT use `^(...)$` wrapping** — Hyprland 0.51 rejects it as "Invalid rulev2" (that was the old windowrulev2 class-matching format). Anchors are fine without outer grouping: `^org\.gnome\.` matches any GNOME reverse-DNS class. Multiple props and effects can be on one line, comma-separated, any order. ## Match props (filtering) | Prop | Example | Notes | |------|---------|-------| | `match:class` | `match:class firefox` | Window class (app ID) | | `match:title` | `match:title Picture-in-Picture` | Window title | | `match:xwayland` | `match:xwayland true` | XWayland windows only | | `match:float` | `match:float true` | Currently floating | | `match:fullscreen` | `match:fullscreen true` | Currently fullscreen | Use `hyprctl clients` to find a window's class and title. ## Static effects (applied once at window open) | Effect | Example | Notes | |--------|---------|-------| | `float` | `float` | Force float | | `tile` | `tile` | Force tile | | `fullscreen` | `fullscreen` | Force fullscreen | | `maximize` | `maximize` | Force maximize | | `rounding` | `rounding 12` | Pixel rounding (overrides global) | | `no_initial_focus` | `no_initial_focus` | Don't steal focus on open | | `pin` | `pin` | Show on all workspaces (float only) | | `move` | `move 100 200` | Position (float only) | | `size` | `size 800 600` | Size (float only) | | `workspace` | `workspace 2` | Open on specific workspace | | `monitor` | `monitor 1` | Open on specific monitor | | `suppress_event` | `suppress_event maximize` | Ignore window events | ## Dynamic effects (re-evaluated on change) | Effect | Example | |--------|---------| | `opacity` | `opacity 0.9` or `opacity 0.9 0.7` (active inactive) | | `border_color` | `border_color rgb(FF0000)` | | `no_blur` | `no_blur` | | `no_shadow` | `no_shadow` | | `no_anim` | `no_anim` | | `no_focus` | `no_focus` | | `idle_inhibit` | `idle_inhibit always` | ## Our rules (reference) ``` # Force-tile apps that default to floating windowrule = match:class gnome-control-center, tile windowrule = match:class pavucontrol, tile # Force-float small utilities windowrule = match:class gnome-calculator, float windowrule = match:class org\.gnome\.Nautilus, float # Rounded corners for all GNOME apps (prefix match) windowrule = match:class ^org\.gnome\., rounding 12 # Multi-prop (steam toasts) windowrule = match:class steam, match:title notificationtoasts, no_initial_focus, pin # Firefox PiP windowrule = match:class firefox, match:title Picture-in-Picture, float ``` ## Finding window class/title ```bash hyprctl clients | grep -E "class:|title:" # or run this in a terminal, then open the window: hyprctl -j clients | jq '.[] | {class, title}' ```