From 3b94207ba7c699ff2d0e20c68e1569b939743f26 Mon Sep 17 00:00:00 2001 From: Nicolas Dorier Date: Fri, 30 Jan 2026 19:51:33 +0900 Subject: [PATCH] Fix: Jetbrains rules were not working properly anymore (#4150) --- default/hypr/apps/jetbrains.conf | 49 ++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/default/hypr/apps/jetbrains.conf b/default/hypr/apps/jetbrains.conf index d045f823..5b73bce4 100644 --- a/default/hypr/apps/jetbrains.conf +++ b/default/hypr/apps/jetbrains.conf @@ -1,22 +1,41 @@ # Fix splash screen showing in weird places and prevent annoying focus takeovers -windowrule = tag +jetbrains-splash, match:class ^(jetbrains-.*)$, match:title ^(splash)$, match:float 1 -windowrule = center on, match:tag jetbrains-splash -windowrule = no_focus on, match:tag jetbrains-splash -windowrule = border_size 0, match:tag jetbrains-splash +windowrule { + name = jetbrains-splash + match:class = ^(jetbrains-.*)$ + match:title = ^(splash)$ + match:float = 1 + tag = +jetbrains-splash + center = on + no_focus = on + border_size = 0 +} # Center popups/find windows -windowrule = tag +jetbrains, match:class ^(jetbrains-.*), match:title ^()$, match:float 1 -windowrule = center on, match:tag jetbrains - -# Enabling this makes it possible to provide input in popup dialogs (search window, new file, etc.) -windowrule = stay_focused on, match:tag jetbrains -windowrule = border_size 0, match:tag jetbrains - -# For some reason tag:jetbrains does not work for size rule -windowrule = min_size (monitor_w*0.5) (monitor_h*0.5), match:class ^(jetbrains-.*), match:title ^()$, match:float 1 +windowrule { + name = jetbrains-popup + match:class = ^(jetbrains-.*) + match:title = ^()$ + match:float = 1 + tag = +jetbrains + center = on + # Enabling this makes it possible to provide input in popup dialogs (search window, new file, etc.) + stay_focused = on + border_size = 0 + min_size = (monitor_w*0.5) (monitor_h*0.5) + } # Disable window flicker when autocomplete or tooltips appear -windowrule = no_initial_focus on, match:class ^(jetbrains-.*)$, match:title ^(win.*)$, match:float 1 +windowrule { + name = jetbrains-tooltip + match:class = ^(jetbrains-.*)$ + match:title = ^(win.*)$ + match:float = 1 + no_initial_focus = on +} # Disable mouse focus -windowrule = no_follow_mouse on, match:class ^(jetbrains-.*)$ +windowrule { + name = jetbrains-focus + no_follow_mouse = on + match:class = ^(jetbrains-.*)$ +}