Expand description
Persistence operations — load, save, and query application settings backed by a redb embedded key-value database.
Functions§
- get_
last_ repo - Convenience: get the last opened repo path.
- get_
saved_ layout - Convenience: get saved layout preferences.
- get_
saved_ theme - Convenience: get saved theme name.
- load_
settings - Load settings from the database. Returns default settings if the database doesn’t exist or any table is missing.
- record_
repo_ and_ save_ session - Record that a repo was opened AND update the session in one DB write. Returns the updated recent-repos list.
- record_
repo_ opened - Convenience: record that a repo was opened (updates history + last_repo).
- save_
layout - Convenience: save layout preferences.
- save_
session - Persist the open-tab session without touching the recent-repos list.
- save_
settings - Save settings to the database. Creates the database and tables if needed.
- save_
theme - Convenience: save theme preference.
- settings_
dir - Get the settings directory (~/.config/gitkraft/ or platform equivalent).