LinSync uses inspectable JSON files under XDG base directories for settings, filters, sessions, projects, recent paths, recent sessions, logs, and cache metadata.
Keep JSON storage as the default for early releases. This keeps user data portable and makes migration and bug reports easier because users can inspect files without a KDE-specific tool.
KConfig remains a possible future integration only if it provides a clear KDE desktop benefit that outweighs portability and schema-migration complexity.
Core AppPaths resolves:
$XDG_CONFIG_HOME/linsync/settings.json$XDG_CONFIG_HOME/linsync/filters.json$XDG_DATA_HOME/linsync/recent-paths.json$XDG_DATA_HOME/linsync/recent-sessions.json$XDG_DATA_HOME/linsync/sessions/$XDG_DATA_HOME/linsync/projects/$XDG_DATA_HOME/linsync/plugins/$XDG_CACHE_HOME/linsync/comparisons/$XDG_STATE_HOME/linsync/linsync.log
The Settings sidebar page (apps/linsync-gui/qml/SettingsPage.qml) currently
emits a settingChanged(key, value) signal for the following keys, grouped
into four cards:
- Appearance:
themePreference,fontFamily,fontSize,tabWidth,showLineNumbers,showWhitespace,wordWrap,reduceMotion.themePreferenceuses the integer theme contract:0system,1light,2dark,3Gentle Gecko,4Black Knight,5Diamond,6Dreams,7Paranoid,8Red Velvet,9Subspace,10Tiefling,11Vibes,12OLED Black. - Comparison behavior:
defaultCompareMode,ignoreCase,ignoreWhitespace,ignoreBlankLines,ignoreEol,eolNormalization. - Session:
openLastSession,confirmOnClose,persistRecentPaths,maxRecentPaths. - Storage: open-config-folder shortcut and a
Kirigami.PromptDialog-gated reset that emits__reset.
These keys are persisted through the Rust bridge into
$XDG_CONFIG_HOME/linsync/settings.json via linsync-core::SettingsStore.
Legacy string theme keys such as dark, oled-black, and high-contrast
are accepted on import, but new writes use the numeric format.
- Keep storage human-readable and resilient to unknown future fields.
- Preserve schema-versioned migration for settings.
- Persist window size in settings when the GUI supplies it, but do not persist window placement. Placement remains under the window manager's control.
- Avoid opaque databases unless a future feature proves JSON cannot satisfy correctness or performance requirements.
- Do not use KConfig solely for platform branding; use it only if it improves real desktop behavior.