Feature Request: Bring window-save-state to Linux/GTK
#12055
SummaryThe MotivationSession persistence is one of the most requested quality-of-life features. The macOS implementation is heavily used and well-loved. Linux users currently lose all context (window layout, split configurations, working directories) on every restart. Related existing issues:
Proposed ApproachStorageA JSON file in Phased ScopePhase 1 — Minimal viable state:
Phase 2 — Full split tree:
Phase 3 — Scrolling history (ties into #1847):
Save/Restore Triggers
Wayland vs X11
Config BehaviorReuse the existing
Why Not GSettings?PR #9451 explored GSettings, but it introduces GNOME-specific coupling and schema compilation complexity. A plain JSON file in XDG_STATE_HOME is portable across KDE, Sway, Hyprland, i3, and any other environment. Implementation AreasAll work would be in
Questions for Maintainers
|
Replies: 2 comments
|
I think that the core GTK developers have a consensus that session save/restore on Linux/GTK should wait until GTK's native session management API is released, which is supposed to happen with GTK 4.24. The only reason that macOS got session management support is that macOS already had native platform support for session management. We do not want to be writing our own session management system. |
|
You can use my implementation until then: #12962 |
I think that the core GTK developers have a consensus that session save/restore on Linux/GTK should wait until GTK's native session management API is released, which is supposed to happen with GTK 4.24. The only reason that macOS got session management support is that macOS already had native platform support for session management. We do not want to be writing our own session management system.