default-column-width/default-window-height applies to all windows with same app-id, including dialogs/popups
Problem
When using default-column-width and default-window-height in window rules, these settings apply to all windows matching the app-id, including dialogs, file pickers, preferences windows, and other popups. This makes the feature unusable for floating windows because:
- Main application windows need reasonable default sizes (e.g., 1600x900)
- Dialogs/popups should use their preferred sizes (often much smaller)
- There's no way to distinguish between them in window rules
- Even if i were to use title based matching, it would require individual rules for each window
Current Behavior
window-rule {
match app-id="nemo|KeePassXC|imv"
open-floating true
default-column-width { fixed 1600; }
default-window-height { fixed 900; }
}
Result: Main window AND all dialogs (Open/Save dialogs, Preferences, Properties, etc.) open at 1600x900, making most dialogs unusable.
Workarounds Attempted
- Using
max-width/max-height instead: Doesn't work - some windows spawn too small, some too large, inconsistent geometry
- Using
min-width/min-height: Forces ALL windows (including tiny dialogs) to minimum size
- Excluding by title patterns: Unmaintainable - would need to list every possible dialog title for every app
Expected Behavior
Window managers like AwesomeWM handled this automatically by:
- Distinguishing between root/main windows and transient windows (dialogs, popups)
- Only applying default sizes to root windows
- Letting dialogs use their preferred sizes
Proposed Solutions
Option 1: Add window-type matching (like AwesomeWM, i3, Sway)
window-rule {
match app-id="nemo"
match window-type="normal" // Excludes dialog, popup, utility, etc.
default-column-width { fixed 1600; }
}
Option 2: Add parent/transient matching
window-rule {
match app-id="nemo"
match is-transient=false // Only root windows
default-column-width { fixed 1600; }
}
Option 3: Make default-column-width/default-window-height only apply to root windows by default, with opt-in for dialogs
Environment
- Niri version: niri 25.11 (b35bcae)
- Tested apps: Nemo, KeePassXC, imv, foot, pavucontrol, firefox and many others
- All apps exhibit this behavior
- OS: Arch Linux x86_64
- Kernel: Linux 6.19.12-arch1-1
Additional Context
This is a blocker for using floating windows effectively in Niri. The alternative is manually resizing every floating window on every launch, which defeats the purpose of window rules.
default-column-width/default-window-heightapplies to all windows with same app-id, including dialogs/popupsProblem
When using
default-column-widthanddefault-window-heightin window rules, these settings apply to all windows matching the app-id, including dialogs, file pickers, preferences windows, and other popups. This makes the feature unusable for floating windows because:Current Behavior
Result: Main window AND all dialogs (Open/Save dialogs, Preferences, Properties, etc.) open at 1600x900, making most dialogs unusable.
Workarounds Attempted
max-width/max-heightinstead: Doesn't work - some windows spawn too small, some too large, inconsistent geometrymin-width/min-height: Forces ALL windows (including tiny dialogs) to minimum sizeExpected Behavior
Window managers like AwesomeWM handled this automatically by:
Proposed Solutions
Option 1: Add window-type matching (like AwesomeWM, i3, Sway)
Option 2: Add parent/transient matching
Option 3: Make
default-column-width/default-window-heightonly apply to root windows by default, with opt-in for dialogsEnvironment
Additional Context
This is a blocker for using floating windows effectively in Niri. The alternative is manually resizing every floating window on every launch, which defeats the purpose of window rules.