Skip to content

default-column-width/default-window-height applies to all windows with same app-id, including dialogs/popups #3895

Description

@savager2k03

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:

  1. Main application windows need reasonable default sizes (e.g., 1600x900)
  2. Dialogs/popups should use their preferred sizes (often much smaller)
  3. There's no way to distinguish between them in window rules
  4. 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

  1. Using max-width/max-height instead: Doesn't work - some windows spawn too small, some too large, inconsistent geometry
  2. Using min-width/min-height: Forces ALL windows (including tiny dialogs) to minimum size
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:layoutColumns, workspaces, scrolling, fullscreen, resize

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions