Pull Request: Fix Window Rules Syntax for v2 (#1183)

This commit is contained in:
end-4
2025-03-24 10:43:44 +01:00
committed by GitHub
+43 -46
View File
@@ -1,41 +1,52 @@
# ######## Window rules ######## # ######## Window rules ########
windowrule = noblur,.*
# windowrule = opacity 0.89 override 0.89 override, .* # Applies transparency to EVERY WINDOW # General rule disable blur for all windows.
windowrule = float, ^(blueberry.py)$ # (Using "class:.*" as a catch-all field since at least one field is required)
windowrule = float, ^(steam)$ windowrulev2 = noblur, class:.*
windowrule = float, ^(guifetch)$ # FlafyDev/guifetch
windowrulev2 = tile, class:(dev.warp.Warp) # Uncomment to apply global transparency to all windows:
# windowrulev2 = opacity 0.89 override 0.89 override, class:.*
# Specific floating windows.
windowrulev2 = float, class:^(blueberry\.py)$
windowrulev2 = float, class:^(steam)$
windowrulev2 = float, class:^(guifetch)$ # FlafyDev/guifetch
# Tiling rule for a specific app.
windowrulev2 = tile, class:^dev\.warp\.Warp$
# Picture-in-Picture window (matched by title).
windowrulev2 = float, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$ windowrulev2 = float, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$
windowrule = center, title:^(Open File)(.*)$
windowrule = center, title:^(Select a File)(.*)$
windowrule = center, title:^(Choose wallpaper)(.*)$
windowrule = center, title:^(Open Folder)(.*)$
windowrule = center, title:^(Save As)(.*)$
windowrule = center, title:^(Library)(.*)$
windowrule = center, title:^(File Upload)(.*)$
# Picture-in-Picture # Dialog windows float+center these windows.
windowrulev2 = keepaspectratio, title:^(Picture(-| )in(-| )[Pp]icture)$ windowrulev2 = center, title:^(Open File)(.*)$
windowrulev2 = move 73% 72%,title:^(Picture(-| )in(-| )[Pp]icture)$ windowrulev2 = center, title:^(Select a File)(.*)$
windowrulev2 = size 25%, title:^(Picture(-| )in(-| )[Pp]icture)$ windowrulev2 = center, title:^(Choose wallpaper)(.*)$
windowrulev2 = float, title:^(Picture(-| )in(-| )[Pp]icture)$ windowrulev2 = center, title:^(Open Folder)(.*)$
windowrulev2 = pin, title:^(Picture(-| )in(-| )[Pp]icture)$ windowrulev2 = center, title:^(Save As)(.*)$
windowrulev2 = center, title:^(Library)(.*)$
windowrulev2 = center, title:^(File Upload)(.*)$
windowrulev2 = float, title:^(Open File)(.*)$
windowrulev2 = float, title:^(Select a File)(.*)$
windowrulev2 = float, title:^(Choose wallpaper)(.*)$
windowrulev2 = float, title:^(Open Folder)(.*)$
windowrulev2 = float, title:^(Save As)(.*)$
windowrulev2 = float, title:^(Library)(.*)$
windowrulev2 = float, title:^(File Upload)(.*)$
# Dialogs # --- Picture-in-Picture enhancements ---
windowrule=float,title:^(Open File)(.*)$ windowrulev2 = keepaspectratio, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$
windowrule=float,title:^(Select a File)(.*)$ windowrulev2 = move 73% 72%, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$
windowrule=float,title:^(Choose wallpaper)(.*)$ windowrulev2 = size 25%, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$
windowrule=float,title:^(Open Folder)(.*)$ windowrulev2 = float, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$
windowrule=float,title:^(Save As)(.*)$ windowrulev2 = pin, title:^([Pp]icture[-\s]?[Ii]n[-\s]?[Pp]icture)(.*)$
windowrule=float,title:^(Library)(.*)$
windowrule=float,title:^(File Upload)(.*)$
# Tearing # --- Tearing ---
windowrule=immediate,.*\.exe windowrulev2 = immediate, title:.*\.exe
windowrulev2=immediate,class:(steam_app) windowrulev2 = immediate, class:^(steam_app)
# No shadow for tiled windows # No shadow for tiled windows (matches windows that are not floating).
windowrulev2 = noshadow,floating:0 windowrulev2 = noshadow, floating:0
# ######## Layer rules ######## # ######## Layer rules ########
layerrule = xray 1, .* layerrule = xray 1, .*
@@ -63,7 +74,6 @@ layerrule = blur, logout_dialog # wlogout
layerrule = animation slide left, sideleft.* layerrule = animation slide left, sideleft.*
layerrule = animation slide right, sideright.* layerrule = animation slide right, sideright.*
layerrule = blur, session[0-9]* layerrule = blur, session[0-9]*
layerrule = blur, bar[0-9]* layerrule = blur, bar[0-9]*
layerrule = ignorealpha 0.6, bar[0-9]* layerrule = ignorealpha 0.6, bar[0-9]*
layerrule = blur, barcorner.* layerrule = blur, barcorner.*
@@ -84,16 +94,3 @@ layerrule = blur, indicator.*
layerrule = ignorealpha 0.6, indicator.* layerrule = ignorealpha 0.6, indicator.*
layerrule = blur, osk[0-9]* layerrule = blur, osk[0-9]*
layerrule = ignorealpha 0.6, osk[0-9]* layerrule = ignorealpha 0.6, osk[0-9]*
# ######## Workspace rules ########
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
# "Smart gaps" / "No gaps when only"
# (replaces dwindle config setting "no_gaps_when_only = 1")
# uncomment all six of these if you wish to use that.
# workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0
# windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
# windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
# windowrulev2 = rounding 0, floating:0, onworkspace:f[1]