From 29a04e555fba4aa2f0977ed8bec1a0de4500b2db Mon Sep 17 00:00:00 2001 From: Krzysztof Saczuk Date: Sun, 26 May 2024 14:26:01 +0200 Subject: [PATCH] feat(hyprland): add window rules for jetbrains apps --- modules/desktop/wm/hyprland.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/modules/desktop/wm/hyprland.nix b/modules/desktop/wm/hyprland.nix index 4561a3b..761990e 100644 --- a/modules/desktop/wm/hyprland.nix +++ b/modules/desktop/wm/hyprland.nix @@ -146,6 +146,23 @@ in "$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow" ]; + + windowrulev2 = [ + # -- Fix odd behaviors in IntelliJ IDEs -- + #! Fix focus issues when dialogs are opened or closed + "windowdance,class:^(jetbrains-.*)$,floating:1" + #! Fix splash screen showing in weird places and prevent annoying focus takeovers + "center,class:^(jetbrains-.*)$,title:^(splash)$,floating:1" + "nofocus,class:^(jetbrains-.*)$,title:^(splash)$,floating:1" + "noborder,class:^(jetbrains-.*)$,title:^(splash)$,floating:1" + + #! Center popups/find windows + "center,class:^(jetbrains-.*)$,title:^( )$,floating:1" + "stayfocused,class:^(jetbrains-.*)$,title:^( )$,floating:1" + "noborder,class:^(jetbrains-.*)$,title:^( )$,floating:1" + #! Disable window flicker when autocomplete or tooltips appear + "nofocus,class:^(jetbrains-.*)$,title:^(win.*)$,floating:1" + ]; }; }; };