Skip to content

feat(display): persist monitor settings to compositor config on confirm #2344

@pir0c0pter0

Description

@pir0c0pter0

Summary

PR #2330 adds excellent display configuration management (scale, mode, refresh rate, VRR, transform, position) but changes are only applied at runtime via compositor IPC commands (niri msg, hyprctl, swaymsg). Settings are lost on logout/reboot since they are never written to the compositor's config file.

Current behavior

  1. User changes scale/mode/VRR in Settings > Display > Monitor
  2. Changes are applied via runtime commands (e.g. niri msg output eDP-1 scale 1.5)
  3. Confirmation dialog appears → user clicks "Keep"
  4. On reboot, compositor loads its config file with the old values → settings lost

Expected behavior

When the user confirms display changes ("Keep"), the settings should be persisted to the compositor's config file so they survive reboot.

Suggested approach

On confirmChange(), write the confirmed targetConfig to the compositor's config:

  • Niri: generate output blocks in ~/.config/niri/config.kdl (or modular cfg/display.kdl if present)
  • Hyprland: update monitor lines in hyprland.conf
  • Sway: update output lines in sway config

A reference implementation for niri using a Python helper script is available — happy to open a PR if there's interest.

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions