Skip to main content

Module settings

Module settings 

Source
Expand description

Persisted user preferences (theme, etc.), shared by the TUI and GUI. Simple JSON-backed settings persistence, shared by the TUI and GUI.

Settings are stored at ~/.config/cleansys/settings.json (GUI) and ~/.config/cleansys/tui-settings.json (TUI) — or the platform-appropriate config directory. Writes are atomic: content is first written to a NamedTempFile in the same directory and then persist()-ed into place, so a crash mid-write can never produce a corrupted file.

Structs§

Settings
Persisted user preferences.

Functions§

load_settings
Load GUI application settings (settings.json).
load_tui_settings
Load TUI-specific settings (tui-settings.json).
save_settings
Persist GUI application settings.
save_tui_settings
Persist TUI-specific settings.
settings_dir
Returns the settings directory (~/.config/cleansys/ or equivalent).
settings_json_path
Full path to the GUI JSON settings file.
tui_settings_json_path
Full path to the TUI-specific JSON settings file.