Bug 476854

Summary: Graphical layout state should use ${XDG_STATE_HOME}, not ${XDG_CONFIG_HOME}
Product: [Frameworks and Libraries] frameworks-kxmlgui Reporter: Alex Elsayed <eternaleye>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: CONFIRMED ---    
Severity: normal CC: nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Exherbo   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=397602
Latest Commit: Version Fixed In:

Description Alex Elsayed 2023-11-11 21:29:04 UTC
Version 0.8[1] of the XDG Base Directory Specification (released 2021-05-08) added a new directory, `${XDG_STATE_HOME}`. From the spec:

> The $XDG_STATE_HOME contains state data that should persist between
> (application) restarts, but that is not important or portable enough
> to the user that it should be stored in $XDG_DATA_HOME. It may contain:
> 
> - actions history (logs, history, recently used files, …)
> - current state of the application that can be reused on a restart
>   (view, layout, open files, undo history, …)

[1]: https://specifications.freedesktop.org/basedir-spec/0.8

This would significantly reduce churn of files in `${XDG_CONFIG_HOME}`, with significant benefits for use-cases where the config is immutable, under version control, or otherwise benefits from not changing due to incidental (rather than intentional) user action.
Comment 1 Nate Graham 2023-11-15 20:15:49 UTC
Not sure whether this would require changes to every Kxmlgui-using app, or if it could be done centrally. Keeping it open here just in case it's the latter.