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§
- Editable
Setting - 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.
- Patch
Request - 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§
- Config
File - Identifies which Pacsea config file a patch targets.
- Config
Write Error - Failure modes of
patch_key. - Package
Marker - User-configurable application settings parsed from
pacsea.conf. - Patch
Outcome - Successful outcome of a
patch_keycall. - Reload
Behavior - How a saved value reaches the running app.
- Sensitivity
- Whether the value should be redacted in UI/logs by default.
- Value
Kind - 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.conftext 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.confinto the splittheme.confandsettings.conffiles. - 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.conffile 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 fromrepos.conf. - save_
scan_ do_ clamav - What: Persist the
ClamAVscan 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
ShellCheckscan 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
VirusTotalscan 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 legacypacsea.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
VirusTotalAPI 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
Themewithout touching disk. - write_
full_ content - What: Atomically replace the entire content of a config file.