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§

KeyChord
A single keyboard chord (modifiers + key).
KeyMap
Application key bindings. Each action can have multiple chords.
Settings
User-configurable application settings parsed from pacsea.conf.
Theme
Application theme palette used by rendering code.

Enums§

PackageMarker
User-configurable application settings parsed from pacsea.conf.

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.
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.
reload_theme
What: Reload the theme configuration on demand.
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_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.
settings
What: Load user settings and keybinds from config files under HOME/XDG.
theme
What: Access the application’s theme palette, loading or caching as needed.