Skip to content

Commit a4378fc

Browse files
authored
fix: center and resize file chooser,save,download dialogs in Hyprland (#1216)
### Summary This PR fixes an issue where file chooser dialogs (Open, Save, Upload) were spawning partially off-screen in Hyprland. The root cause was case-sensitive mismatches with `Xdg-desktop-portal-gtk` and missing explicit window rules. ### Changes - Added `windowrulev2` rules to ensure: - File chooser dialogs float - Open centered on screen - Use consistent 70% sizing relative to monitor ### Testing - Verified in Hyprland on Arch Linux - Tested with Brave, Firefox, and system upload/save dialogs - All dialogs now correctly center instead of opening off-screen ### Changelog #### Fixed - File chooser dialogs in Hyprland now open centered and floating instead of off-screen
2 parents 55d5e03 + f2a139d commit a4378fc

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
2222
```
2323
To use text recognition bind `hyde-shell screenshot sc` to any hotkey.
2424
- Hyprlock: Added hyprlock preview
25+
- File chooser dialogs in Hyprland now open centered and floating instead of off-screen
2526

2627
### Fixed
2728

β€ŽCONTRIBUTORS.mdβ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ _These contributors help with quality assurance and testing._
2727
- [@amit-0i](https://github.com/amit-0i)
2828
- [@Prof-Shiba](https://github.com/Prof-Shiba)
2929
- [@UnaTried](https://github.com/UnaTried)
30-
3130
- [@Vu4ll](https://github.com/Vu4ll)
32-
3331
---
3432

3533
## How to add yourself to this list

β€ŽConfigs/.local/share/hypr/windowrules.confβ€Ž

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ windowrule = size <85% <95%,floating:1
1212
windowrule = float,tag:common-popups
1313
windowrule = size <60% <90%,tag:common-popups
1414

15+
# Fix file chooser dialogs opening off-screen
16+
windowrule = float,tag:portal-dialogs
17+
windowrule = center,tag:portal-dialogs
18+
1519

1620
# Only add the Core applications here
1721
windowrule = float,class:^(com.gabm.satty)$
@@ -45,6 +49,12 @@ windowrule = tag +common-popups,title:^(Confirm to replace files)$
4549
windowrule = tag +common-popups,title:^(File Operation Progress)$
4650
windowrule = tag +common-popups,class:^(xdg-desktop-portal-gtk)$
4751

52+
# portal-dialogs
53+
windowrule = tag +portal-dialogs,class:^(org.freedesktop.impl.portal.desktop.hyprland)$
54+
windowrule = tag +portal-dialogs,class:^(org.freedesktop.impl.portal.desktop.gtk)$
55+
windowrule = tag +portal-dialogs,class:^([Xx]dg-desktop-portal-gtk)$
56+
57+
4858

4959
# // β–ˆβ–‘β–‘β€ƒβ–„β–€β–ˆβ€ƒβ–ˆβ–„β–ˆβ€ƒβ–ˆβ–€β–€β€ƒβ–ˆβ–€β–ˆβ€ƒ β€ƒβ–ˆβ–€β–ˆβ€ƒβ–ˆβ–‘β–ˆβ€ƒβ–ˆβ–‘β–‘β€ƒβ–ˆβ–€β–€β€ƒβ–ˆβ–€
5060
# // β–ˆβ–„β–„β€ƒβ–ˆβ–€β–ˆβ€ƒβ–‘β–ˆβ–‘β€ƒβ–ˆβ–ˆβ–„β€ƒβ–ˆβ–€β–„β€ƒ β€ƒβ–ˆβ–€β–„β€ƒβ–ˆβ–„β–ˆβ€ƒβ–ˆβ–„β–„β€ƒβ–ˆβ–ˆβ–„β€ƒβ–„β–ˆ
@@ -61,4 +71,3 @@ layerrule = blur,logout_dialog
6171
layerrule = ignorezero,logout_dialog
6272
layerrule = blur,waybar
6373
layerrule = ignorezero,waybar
64-

0 commit comments

Comments
Β (0)