diff --git a/desktopenvs/hyprdrive/hypr/usr/windowrules.lua b/desktopenvs/hyprdrive/hypr/usr/windowrules.lua index 8d81388..f63aab1 100644 --- a/desktopenvs/hyprdrive/hypr/usr/windowrules.lua +++ b/desktopenvs/hyprdrive/hypr/usr/windowrules.lua @@ -103,6 +103,20 @@ hl.window_rule({ move = "(monitor_w/2 - window_w/2) (monitor_h/2 - window_h/2)", }) +-- dialogs — float any dialog-like window at its natural (minimum) size, centred on +-- the cursor: renaming dialogs, generic Save/Open/Confirm/Delete/Move/Copy/Replace/ +-- Properties/Preferences dialogs, and Firefox "Opening " download prompts. +-- Hyprland already auto-floats real in-process xdg/X11 dialogs; this catches the ones +-- that tile because they carry no dialog hint, matched heuristically by title. No +-- `size`, so the natural (minimum) size is kept and the cursor-centre offsets use the +-- real window_w/h (see the filepicker note above re: move/size ordering). +hl.window_rule({ + name = "dialog-float", + match = { title = "^(Rename|Save|Opening |Open |Confirm|Delete|Move|Copy|Replace|Properties|Preferences).*" }, + float = true, + move = "(cursor_x-(window_w/2)) (cursor_y-(window_h/2))", +}) + -- spotify floating hl.window_rule({ name = "spotify-float", diff --git a/desktopenvs/hyprlua/hypr/usr/windowrules.lua b/desktopenvs/hyprlua/hypr/usr/windowrules.lua index 74e8def..63c2c98 100644 --- a/desktopenvs/hyprlua/hypr/usr/windowrules.lua +++ b/desktopenvs/hyprlua/hypr/usr/windowrules.lua @@ -104,6 +104,20 @@ hl.window_rule({ move = "(monitor_w/2 - window_w/2) (monitor_h/2 - window_h/2)", }) +-- dialogs — float any dialog-like window at its natural (minimum) size, centred on +-- the cursor: renaming dialogs, generic Save/Open/Confirm/Delete/Move/Copy/Replace/ +-- Properties/Preferences dialogs, and Firefox "Opening " download prompts. +-- Hyprland already auto-floats real in-process xdg/X11 dialogs; this catches the ones +-- that tile because they carry no dialog hint, matched heuristically by title. No +-- `size`, so the natural (minimum) size is kept and the cursor-centre offsets use the +-- real window_w/h (see the filepicker note above re: move/size ordering). +hl.window_rule({ + name = "dialog-float", + match = { title = "^(Rename|Save|Opening |Open |Confirm|Delete|Move|Copy|Replace|Properties|Preferences).*" }, + float = true, + move = "(cursor_x-(window_w/2)) (cursor_y-(window_h/2))", +}) + -- spotify floating hl.window_rule({ name = "spotify-float",