diff --git a/desktopenvs/hyprlua/hypr/usr/windowrules.lua b/desktopenvs/hyprlua/hypr/usr/windowrules.lua index a08a9d7..74e8def 100644 --- a/desktopenvs/hyprlua/hypr/usr/windowrules.lua +++ b/desktopenvs/hyprlua/hypr/usr/windowrules.lua @@ -89,6 +89,21 @@ hl.window_rule({ move = "(cursor_x-380) (cursor_y-230)", }) +-- xdg portal dialogs — float, centred on the monitor (i.e. above the parent). +-- The GTK portal backend (xdg-desktop-portal-gtk) serves native file/app/print +-- choosers for portal-driven apps: Steam ("select library folder"), Chromium/ +-- Electron, Flatpak apps, etc. It runs in its *own* process, so the dialog opens +-- as a parentless top-level with no xdg-dialog/X11-dialog hint — Hyprland has no +-- signal that it's a dialog and would otherwise tile it (unlike in-process xdg +-- dialogs, which it auto-floats). Natural size is kept, so the centre offsets use +-- the real window_w/window_h (no `size` to skew them; see the filepicker note). +hl.window_rule({ + name = "xdg-portal-dialog", + match = { class = "xdg-desktop-portal-gtk" }, + float = true, + move = "(monitor_w/2 - window_w/2) (monitor_h/2 - window_h/2)", +}) + -- spotify floating hl.window_rule({ name = "spotify-float",