From c2670e9ab90bd657e87a1da2c5322e9007dce01f Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Mon, 17 Nov 2025 18:34:02 +0000 Subject: windowrules: rewrite completely (#12269) Reworks the window rule syntax completely --------- Co-authored-by: Mihai Fufezan --- example/hyprland.conf | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) (limited to 'example') diff --git a/example/hyprland.conf b/example/hyprland.conf index a1408dc3..1bccaa2a 100644 --- a/example/hyprland.conf +++ b/example/hyprland.conf @@ -159,10 +159,23 @@ animations { # uncomment all if you wish to use that. # workspace = w[tv1], gapsout:0, gapsin:0 # workspace = f[1], gapsout:0, gapsin:0 -# windowrule = bordersize 0, floating:0, onworkspace:w[tv1] -# windowrule = rounding 0, floating:0, onworkspace:w[tv1] -# windowrule = bordersize 0, floating:0, onworkspace:f[1] -# windowrule = rounding 0, floating:0, onworkspace:f[1] +# windowrule { +# name = smart-gaps-1 +# floating = false +# on_workspace = n[s:window] w[tv1] +# +# border_size = 0 +# rounding = 0 +# } +# +# windowrule { +# name = smart-gaps-2 +# floating = false +# on_workspace = n[s:window] f[1] +# +# border_size = 0 +# rounding = 0 +# } # See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more dwindle { @@ -294,11 +307,25 @@ bindl = , XF86AudioPrev, exec, playerctl previous # See https://wiki.hypr.land/Configuring/Window-Rules/ for more # See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules -# Example windowrule -# windowrule = float,class:^(kitty)$,title:^(kitty)$ +# Example windowrules that are useful -# Ignore maximize requests from apps. You'll probably like this. -windowrule = suppressevent maximize, class:.* +windowrule { + # Ignore maximize requests from all apps. You'll probably like this. + name = suppress-maximize-events + match:class = .* -# Fix some dragging issues with XWayland -windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 + suppress_event = maximize +} + +windowrule { + # Fix some dragging issues with XWayland + match:name = fix-xwayland-drags + match:class = ^$ + match:title = ^$ + match:xwayland = true + match:float = true + match:fullscreen = false + match:pin = false + + no_focus = true +} -- cgit v1.2.3