Skip to content

Commit a0a5c14

Browse files
authored
Additional Window Rule V3 Fixes (#1290)
* Configuring/Uncommon-tips-&-tricks: Update to window rules v3 * Configuring/Variables: Update to window rules v3 * Configuring/Workspace-Rules: Update to window rules v3 * FAQ/_index: Update to window rules v3 * Useful Utilities/Clipboard-Managers: Update to window rules v3 * Useful Utilities/Status-Bars: Update to window rules v3 * Configuring/Uncommon-tips-&-tricks: Reordered for readability * Configuring/Workspace-Rules: Reordered stuff for readability * Configuring/Using-hyprctl: Updated variable names * Configuring/Window-Rules: Updated variable names
1 parent 890bfe0 commit a0a5c14

File tree

8 files changed

+54
-50
lines changed

8 files changed

+54
-50
lines changed

content/Configuring/Uncommon-tips-&-tricks.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,16 @@ To use Shimeji programs like
197197
following rules:
198198

199199
```ini
200-
windowrule = float, class:com-group_finity-mascot-Main
201-
windowrule = noblur, class:com-group_finity-mascot-Main
202-
windowrule = nofocus, class:com-group_finity-mascot-Main
203-
windowrule = noshadow, class:com-group_finity-mascot-Main
204-
windowrule = noborder, class:com-group_finity-mascot-Main
200+
windowrule {
201+
name = shimeji
202+
match:class = com-group_finity-mascot-Main
203+
204+
float = true
205+
no_blur = true
206+
no_focus = true
207+
no_shadow = true
208+
border_size = 0
209+
}
205210
```
206211

207212
> [!NOTE]
@@ -307,10 +312,10 @@ bind = ALT SHIFT, escape, exec, $XDG_CONFIG_HOME/hypr/scripts/alttab/disable.sh
307312
submap = reset
308313

309314
workspace = special:alttab, gapsout:0, gapsin:0, bordersize:0
310-
windowrule = noanim, class:alttab
311-
windowrule = stayfocused, class:alttab
312-
windowrule = workspace special:alttab, class:alttab
313-
windowrule = bordersize 0, class:alttab
315+
windowrule = match:class alttab, no_anim
316+
windowrule = match:class alttab, stay_focused
317+
windowrule = match:class alttab, workspace special:alttab
318+
windowrule = match:class alttab, border_size 0
314319
```
315320

316321
2. create file `touch $XDG_CONFIG_HOME/hypr/scripts/alttab/alttab.sh && chmod +x $XDG_CONFIG_HOME/hypr/scripts/alttab/alttab.sh` and add:

content/Configuring/Using-hyprctl.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ Where `window` is as described [here](../Dispatchers#parameter-explanation), and
198198
199199
#### Notes
200200
- If `animationstyle` is unset, `(unset)` is returned.
201-
- `minsize` defaults to `20 20`.
202-
- `maxsize` defaults to `inf inf` or `[null,null]` in JSON.
201+
- `min_size` defaults to `20 20`.
202+
- `max_size` defaults to `inf inf` or `[null,null]` in JSON.
203203
204204
### notify
205205

content/Configuring/Variables.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ _Subcategory `general:snap:`_
107107
| dim_inactive | enables dimming of inactive windows | bool | false |
108108
| dim_strength | how much inactive windows should be dimmed [0.0 - 1.0] | float | 0.5 |
109109
| dim_special | how much to dim the rest of the screen by when a special workspace is open. [0.0 - 1.0] | float | 0.2 |
110-
| dim_around | how much the `dimaround` window rule should dim by. [0.0 - 1.0] | float | 0.4 |
110+
| dim_around | how much the `dim_around` window rule should dim by. [0.0 - 1.0] | float | 0.4 |
111111
| screen_shader | a path to a custom shader to be applied at the end of rendering. See `examples/screenShader.frag` for an example. | str | \[\[Empty\]\] |
112112
| border_part_of_window | whether the window border should be a part of the window | bool | true |
113113
@@ -130,9 +130,9 @@ _Subcategory `decoration:blur:`_
130130
| vibrancy_darkness | How strong the effect of `vibrancy` is on dark areas . [0.0 - 1.0] | float | 0.0 |
131131
| special | whether to blur behind the special workspace (note: expensive) | bool | false |
132132
| popups | whether to blur popups (e.g. right-click menus) | bool | false |
133-
| popups_ignorealpha | works like ignorealpha in layer rules. If pixel opacity is below set value, will not blur. [0.0 - 1.0] | float | 0.2 |
133+
| popups_ignorealpha | works like ignore_alpha in layer rules. If pixel opacity is below set value, will not blur. [0.0 - 1.0] | float | 0.2 |
134134
| input_methods | whether to blur input methods (e.g. fcitx5) | bool | false |
135-
| input_methods_ignorealpha | works like ignorealpha in layer rules. If pixel opacity is below set value, will not blur. [0.0 - 1.0] | float | 0.2 |
135+
| input_methods_ignorealpha | works like ignore_alpha in layer rules. If pixel opacity is below set value, will not blur. [0.0 - 1.0] | float | 0.2 |
136136
137137
> [!NOTE]
138138
> `blur:size` and `blur:passes` have to be at least 1.
@@ -422,13 +422,13 @@ _Subcategory `misc:`_
422422
| exit_window_retains_fullscreen | if true, closing a fullscreen window makes the next focused window fullscreen | bool | false |
423423
| initial_workspace_tracking | if enabled, windows will open on the workspace they were invoked on. 0 - disabled, 1 - single-shot, 2 - persistent (all children too) | int | 1 |
424424
| middle_click_paste | whether to enable middle-click-paste (aka primary selection) | bool | true |
425-
| render_unfocused_fps | the maximum limit for renderunfocused windows' fps in the background (see also [Window-Rules](../Window-Rules/#dynamic-effects) - `render_unfocused`)| int | 15 |
425+
| render_unfocused_fps | the maximum limit for render_unfocused windows' fps in the background (see also [Window-Rules](../Window-Rules/#dynamic-effects) - `render_unfocused`)| int | 15 |
426426
| disable_xdg_env_checks | disable the warning if XDG environment is externally managed | bool | false |
427427
| disable_hyprland_qtutils_check | disable the warning if hyprland-qtutils is not installed | bool | false |
428428
| lockdead_screen_delay | delay after which the "lockdead" screen will appear in case a lockscreen app fails to cover all the outputs (5 seconds max) | int | 1000 |
429429
| enable_anr_dialog | whether to enable the ANR (app not responding) dialog when your apps hang | bool | true |
430430
| anr_missed_pings | number of missed pings before showing the ANR dialog | int | 5 |
431-
| size_limits_tiled | whether to apply minsize and maxsize rules to tiled windows | bool | false |
431+
| size_limits_tiled | whether to apply min_size and max_size rules to tiled windows | bool | false |
432432
433433
### Binds
434434

content/Configuring/Window-Rules.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Static effects are evaluated once when the window is opened and never again. Thi
9494
| Effect | argument | Description |
9595
| ---- | ----------- | --- |
9696
| float | \[on\] | Floats a window. |
97-
| tile | \[on\] |Tiles a window. |
97+
| tile | \[on\] |Tiles a window. |
9898
| fullscreen | \[on\] | Fullscreens a window. |
9999
| maximize | \[on\] | Maximizes a window. |
100100
| fullscreen_state | \[internal\] \[client\] | Sets the focused window's fullscreen mode and the one sent to the client, where internal and client can be `0` - none, `1` - maximize, `2` - fullscreen, `3` - maximize and fullscreen. |
@@ -139,9 +139,9 @@ Dynamic effects are re-evaluated every time a property changes.
139139
| no_max_size | \[on\] | Removes max size limitations. Especially useful with windows that report invalid max sizes (e.g. winecfg). |
140140
| stay_focused | \[on\] | Forces focus on the window as long as it's visible. |
141141
| animation | \[style\] (\[opt\]) | Forces an animation onto a window, with a selected opt. Opt is optional. |
142-
| border_color | \[c\] | Force the bordercolor of the window. <br> Options for c: `color`/`color ... color angle` -> sets the active border color/gradient OR `color color`/`color ... color angle color ... color [angle]` -> sets the active and inactive border color/gradient of the window. See [variables->colors](../Variables#variable-types) for color definition. |
142+
| border_color | \[c\] | Force the border color of the window. <br> Options for c: `color`/`color ... color angle` -> sets the active border color/gradient OR `color color`/`color ... color angle color ... color [angle]` -> sets the active and inactive border color/gradient of the window. See [variables->colors](../Variables#variable-types) for color definition. |
143143
| idle_inhibit | \[mode\] | Sets an idle inhibit rule for the window. If active, apps like `hypridle` will not fire. Modes: `none`, `always`, `focus`, `fullscreen`. |
144-
| opacity | \[a\] | Additional opacity multiplier. Options for a: `float` -> sets an overall opacity, `float float` -> sets activeopacity and inactiveopacity respectively, `float float float` -> sets activeopacity, inactiveopacity and fullscreenopacity respectively. |
144+
| opacity | \[a\] | Additional opacity multiplier. Options for a: `float` -> sets an overall opacity, `float float` -> sets active_opacity and inactive_opacity respectively, `float float float` -> sets active_opacity, inactive_opacity and fullscreen_opacity respectively. |
145145
| tag | \[name\] | Applies the tag `name` to the window, use prefix `+`/`-` to set/unset flag, or no prefix to toggle the flag. |
146146
| max_size | \[w\] \[h\] | Sets the maximum size (x,y -> int). Applies to floating windows. (use `misc:size_limits_tiled` to include tiled windows.) |
147147
| min_size | \[w\] \[h\] | Sets the minimum size (x,y -> int). Applies to floating windows. (use `misc:size_limits_tiled` to include tiled windows.) |
@@ -249,8 +249,8 @@ windowrule {
249249

250250
windowrule = no_blur, match:class firefox # Disable blur for firefox
251251
windowrule = move (cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5)), match:class kitty # Move kitty to the center of the cursor
252-
windowrule = border_color rgb(FF0000) rgb(880808), match:fullscreen 1 # Set bordercolor to red if window is fullscreen
253-
windowrule = border_color rgb(FFFF00), match:title .*Hyprland.* # Set bordercolor to yellow when title contains Hyprland
252+
windowrule = border_color rgb(FF0000) rgb(880808), match:fullscreen 1 # Set border color to red if window is fullscreen
253+
windowrule = border_color rgb(FFFF00), match:title .*Hyprland.* # Set border color to yellow when title contains Hyprland
254254
windowrule = opacity 1.0 override 0.5 override 0.8 override, match:class kitty # Set opacity to 1.0 active, 0.5 inactive and 0.8 fullscreen for kitty
255255
windowrule = match:class kitty, rounding 10 # Set rounding to 10 for kitty
256256
windowrule = match:class (pinentry-)(.*), stayfocused # Fix pinentry losing focus
@@ -286,7 +286,7 @@ The rest of the floating windows will have `opacity 0.5`.
286286

287287
> [!NOTE]
288288
> Opacity is a PRODUCT of all opacities by default. For example, setting
289-
> `activeopacity` to `0.5` and `opacity` to `0.5` will result in a total opacity of
289+
> `active_opacity` to `0.5` and `opacity` to `0.5` will result in a total opacity of
290290
> `0.25`. <br>
291291
> You are allowed to set opacities over `1.0`, but any opacity product over `1.0`
292292
> will cause graphical glitches. <br>
@@ -346,4 +346,3 @@ but they have different props and effects.
346346
| order | \[n\] | Sets the order relative to other layers. A higher `n` means closer to the edge of the monitor. Can be negative. `n = 0` if unspecified. |
347347
| abovelock | \[0/1/2\] | If non-zero, renders the layer above the lockscreen when the session is locked. If set to `2`, you can interact with the layer on the lockscreen, otherwise it will only be rendered above it. |
348348
| noscreenshare | \[on\] | Hides the layer from screen sharing by drawing a black rectangle over it. |
349-

content/Configuring/Workspace-Rules.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ To replicate "smart gaps" / "no gaps when only" from other WMs/Compositors, use
6262
```ini
6363
workspace = w[tv1], gapsout:0, gapsin:0
6464
workspace = f[1], gapsout:0, gapsin:0
65-
windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
66-
windowrule = rounding 0, floating:0, onworkspace:w[tv1]
67-
windowrule = bordersize 0, floating:0, onworkspace:f[1]
68-
windowrule = rounding 0, floating:0, onworkspace:f[1]
65+
windowrule = match:float false, match:workspace w[tv1], border_size 0
66+
windowrule = match:float false, match:workspace w[tv1], rounding 0
67+
windowrule = match:float false, match:workspace f[1], border_size 0
68+
windowrule = match:float false, match:workspace f[1], rounding 0
6969
```
7070

7171
#### Smart gaps (ignoring special workspaces)
@@ -75,10 +75,10 @@ You can combine workspace selectors for more fine-grained control, for example,
7575
```ini
7676
workspace = w[tv1]s[false], gapsout:0, gapsin:0
7777
workspace = f[1]s[false], gapsout:0, gapsin:0
78-
windowrule = bordersize 0, floating:0, onworkspace:w[tv1]s[false]
79-
windowrule = rounding 0, floating:0, onworkspace:w[tv1]s[false]
80-
windowrule = bordersize 0, floating:0, onworkspace:f[1]s[false]
81-
windowrule = rounding 0, floating:0, onworkspace:f[1]s[false]
78+
windowrule = match:float false, match:workspace w[tv1]s[false], border_size 0
79+
windowrule = match:float false, match:workspace w[tv1]s[false], rounding 0
80+
windowrule = match:float false, match:workspace f[1]s[false], border_size 0
81+
windowrule = match:float false, match:workspace f[1]s[false], rounding 0
8282
```
8383

8484
## Rules

content/FAQ/_index.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ use Flameshot, here are some configuration recommendations by users who've found
130130
workarounds.
131131

132132
```ini
133-
# noanim isn't necessary but animations with these rules might look bad. use at your own discretion.
134-
windowrule = noanim, class:^(flameshot)$
135-
windowrule = float, class:^(flameshot)$
136-
windowrule = move 0 0, class:^(flameshot)$
137-
windowrule = pin, class:^(flameshot)$
138-
windowrule = noinitialfocus, class:^(flameshot)$
133+
# no_anim isn't necessary but animations with these rules might look bad. use at your own discretion.
134+
windowrule = match:class flameshot, no_anim
135+
windowrule = match:class flameshot, float
136+
windowrule = match:class flameshot, move 0 0
137+
windowrule = match:class flameshot, pin
138+
windowrule = match:class flameshot, no_initial_focus
139139
# set this to your leftmost monitor id, otherwise you have to move your cursor to the leftmost monitor
140140
# before executing flameshot
141-
windowrule = monitor 1, class:^(flameshot)$
141+
windowrule = match:class flameshot, monitor 1
142142

143143
# ctrl-c to copy from the flameshot gui gives warped images sometimes, but
144144
# setting the env fixes it
@@ -347,9 +347,9 @@ these window rules to your config to make these programs work with both of your
347347
screens.
348348
349349
```ini
350-
windowrule2 = float,title:^(flameshot)
351-
windowrule = move 0 0,title:^(flameshot)
352-
windowrule = suppressevent fullscreen,title:^(flameshot)
350+
windowrule = match:title flameshot, float true
351+
windowrule = match:title flameshot, move 0 0
352+
windowrule = match:title flameshot, suppress_event fullscreen
353353
```
354354
355355
### I cannot bind SUPER as my mod key on my laptop
@@ -403,7 +403,7 @@ Window 55d794495400 -> :
403403
If the pop-up disappears as you hover over it, you can add to your config:
404404
405405
```ini
406-
windowrule = stayfocused, title:^(TITLE)$, class:^(CLASS)$
406+
windowrule = stay_focused, match:class CLASS, match:title TITLE
407407
```
408408
409409
This has a downside of not being able to click on anything in the main UI until
@@ -412,13 +412,13 @@ you've interacted with the pop-up.
412412
If the pop-up disappears immediately, you can use:
413413
414414
```ini
415-
windowrule = minsize 1 1, title:^(TITLE)$, class:^(CLASS)$
415+
windowrule = min_size 1 1, match:class CLASS, match:title TITLE
416416
```
417417
418418
If the pop-up doesn't open at the cursor position, try the following:
419419
420420
```ini
421-
windowrule = move onscreen cursor, title:^(TITLE)$, class:^(CLASS)$
421+
windowrule = move cursor_x cursor_y, match:class CLASS, match:title TITLE
422422
```
423423
424424
This is required for apps running under xwayland only and there is usually no need

content/Useful Utilities/Clipboard-Managers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ exec-once = clipse -listen
186186
You can bind the TUI to a something nice like this:
187187

188188
```ini
189-
windowrule = float, class:(clipse)
190-
windowrule = size 622 652, class:(clipse)
191-
windowrule = stayfocused, class:(clipse)
189+
windowrule = match:class clipse, float
190+
windowrule = match:class clipse, size 622 652
191+
windowrule = match:class clipse, stay_focused
192192

193193
bind = SUPER, V, exec, alacritty --class clipse -e clipse
194194
```

content/Useful Utilities/Status-Bars.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ and a [guided hello world](https://quickshell.outfoxxed.me/docs/configuration/in
308308

309309
### Blur
310310

311-
Use the `blur` and `ignorealpha` [layer rules](https://wiki.hypr.land/Configuring/Window-Rules/#layer-rules).
311+
Use the `blur` and `ignore_alpha` [layer rules](https://wiki.hypr.land/Configuring/Window-Rules/#layer-rules).
312312
The former enables blur, and the latter makes it ignore insufficiently opaque regions.
313-
Ideally, the value used with `ignorealpha` is higher than the shadow opacity and lower than the bar/menu content's opacity.
314-
Additionally, if it has transparent popups, you can use the `blurpopups` rule.
313+
Ideally, the value used with `ignore_alpha` is higher than the shadow opacity and lower than the bar/menu content's opacity.
314+
Additionally, if it has transparent popups, you can use the `blur_popups` rule.
315315

0 commit comments

Comments
 (0)