Skip to main content

Module theme

Module theme 

Source
Expand description

Theme system for Pacsea.

Split from a monolithic file into submodules for maintainability. Public re-exports keep the crate::theme::* API stable.

Structs§

EditableSetting
Schema entry for a single editable setting key.
KeyChord
A single keyboard chord (modifiers + key).
KeyMap
Application key bindings. Each action can have multiple chords.
PatchRequest
Description of a single key/value patch against one config file.
Settings
User-configurable application settings parsed from pacsea.conf.
Theme
Application theme palette used by rendering code.

Enums§

ConfigFile
Identifies which Pacsea config file a patch targets.
ConfigWriteError
Failure modes of patch_key.
PackageMarker
User-configurable application settings parsed from pacsea.conf.
PatchOutcome
Successful outcome of a patch_key call.
ReloadBehavior
How a saved value reaches the running app.
Sensitivity
Whether the value should be redacted in UI/logs by default.
ValueKind
What kind of value a setting holds, used to pick the editor popup variant and to validate input before crate::theme::config::patch::patch_key.

Constants§

EDITABLE_KEYBINDS
What: Phase-2 set of editable keybind rows backed by keybinds.conf.
EDITABLE_SETTINGS
What: Initial Phase-0 subset of editable settings.
EDITABLE_THEME
What: Phase-3 set of editable theme color rows backed by theme.conf.
REPOS_SKELETON_CONTENT
What: Default repos.conf text seeded on first run and when opening a missing file.

Functions§

config_dir
What: Resolve the Pacsea configuration directory, ensuring it exists on disk.
ensure_settings_keys_present
What: Ensure all expected settings keys exist in settings.conf, appending defaults as needed.
ensure_theme_keys_present
What: Ensure theme.conf (or legacy theme file) defines every required theme key, appending skeleton defaults for any gaps.
find_setting
What: Look up an editable setting by canonical key or alias.
keybind_scope
What: Determine the conflict-detection scope for a keybind action.
lists_dir
What: Obtain the lists subdirectory inside the Pacsea config folder.
logs_dir
What: Obtain the logs subdirectory inside the Pacsea config folder.
maybe_migrate_legacy_confs
What: Migrate legacy pacsea.conf into the split theme.conf and settings.conf files.
patch_key
What: Apply a single key/value patch to a Pacsea config file.
reload_theme
What: Reload the theme configuration on demand.
resolve_repos_config_path
What: Locate the repos.conf file for third-party repository definitions (TOML).
resolved_config_path
What: Resolve the active path for a Pacsea config file.
save_app_start_mode
Persist start mode (package/news).
save_fuzzy_search
What: Persist the fuzzy search toggle.
save_mirror_count
What: Persist the numeric limit on ranked mirrors.
save_news_filter_installed_only
Persist whether to restrict advisories to installed packages.
save_news_filter_show_advisories
Persist whether to show security advisories.
save_news_filter_show_arch_news
Persist whether to show Arch news items.
save_news_filter_show_aur_comments
Persist whether to show AUR comments in the News view.
save_news_filter_show_aur_updates
Persist whether to show AUR package updates in the News view.
save_news_filter_show_pkg_updates
Persist whether to show installed package updates in the News view.
save_news_filters_collapsed
Persist whether news filters are collapsed behind the Filters button.
save_news_max_age_days
Persist the maximum age of news items (None = all).
save_results_filter_show_canonical
What: Persist results_filter_show_<canonical> for a dynamic repo filter id from repos.conf.
save_scan_do_clamav
What: Persist the ClamAV scan toggle.
save_scan_do_custom
What: Persist the custom scan toggle.
save_scan_do_semgrep
What: Persist the Semgrep scan toggle.
save_scan_do_shellcheck
What: Persist the ShellCheck scan toggle.
save_scan_do_sleuth
What: Persist the Sleuth scan toggle.
save_scan_do_trivy
What: Persist the Trivy scan toggle.
save_scan_do_virustotal
What: Persist the VirusTotal scan toggle.
save_selected_countries
What: Persist the comma-separated list of preferred mirror countries.
save_show_install_pane
What: Persist the visibility flag for the Install pane.
save_show_keybinds_footer
What: Persist the visibility flag for the keybinds footer.
save_show_recent_pane
What: Persist the visibility flag for the Search history pane.
save_sort_mode
What: Persist the user-selected sort mode into settings.conf (or legacy pacsea.conf).
save_startup_news_configured
Persist whether startup news popup setup has been completed.
save_startup_news_max_age_days
Persist the maximum age of news items for startup news popup (None = all).
save_startup_news_show_advisories
Persist whether to show security advisories in startup news popup.
save_startup_news_show_arch_news
Persist whether to show Arch news in startup news popup.
save_startup_news_show_aur_comments
Persist whether to show AUR comments in startup news popup.
save_startup_news_show_aur_updates
Persist whether to show AUR updates in startup news popup.
save_startup_news_show_pkg_updates
Persist whether to show official package updates in startup news popup.
save_virustotal_api_key
What: Persist the VirusTotal API key used for scanning packages.
set_config_dir_override
What: Set or clear the process-wide configuration directory override.
settings
What: Load user settings and keybinds from config files under HOME/XDG.
settings_for
What: Return all editable settings registered for file.
theme
What: Access the application’s theme palette, loading or caching as needed.
try_load_theme_from_content
What: Parse theme configuration text into a Theme without touching disk.
write_full_content
What: Atomically replace the entire content of a config file.