Settings

Struct Settings 

Source
pub struct Settings {
Show 49 fields pub layout_left_pct: u16, pub layout_center_pct: u16, pub layout_right_pct: u16, pub app_dry_run_default: bool, pub keymap: KeyMap, pub sort_mode: SortMode, pub clipboard_suffix: String, pub show_recent_pane: bool, pub show_install_pane: bool, pub show_keybinds_footer: bool, pub selected_countries: String, pub mirror_count: u16, pub virustotal_api_key: String, pub scan_do_clamav: bool, pub scan_do_trivy: bool, pub scan_do_semgrep: bool, pub scan_do_shellcheck: bool, pub scan_do_virustotal: bool, pub scan_do_custom: bool, pub scan_do_sleuth: bool, pub start_in_news: bool, pub news_filter_show_arch_news: bool, pub news_filter_show_advisories: bool, pub news_filter_show_pkg_updates: bool, pub news_filter_show_aur_updates: bool, pub news_filter_show_aur_comments: bool, pub news_filter_installed_only: bool, pub news_max_age_days: Option<u32>, pub startup_news_configured: bool, pub startup_news_show_arch_news: bool, pub startup_news_show_advisories: bool, pub startup_news_show_aur_updates: bool, pub startup_news_show_aur_comments: bool, pub startup_news_show_pkg_updates: bool, pub startup_news_max_age_days: Option<u32>, pub news_cache_ttl_days: u32, pub package_marker: PackageMarker, pub news_read_symbol: String, pub news_unread_symbol: String, pub preferred_terminal: String, pub skip_preflight: bool, pub locale: String, pub search_startup_mode: bool, pub fuzzy_search: bool, pub updates_refresh_interval: u64, pub installed_packages_mode: InstalledPackagesMode, pub get_announcement: bool, pub use_passwordless_sudo: bool, pub use_terminal_theme: bool,
}
Expand description

User-configurable application settings parsed from pacsea.conf.

Fields§

§layout_left_pct: u16

Percentage width allocated to the Recent pane (left column).

§layout_center_pct: u16

Percentage width allocated to the Search pane (center column).

§layout_right_pct: u16

Percentage width allocated to the Install pane (right column).

§app_dry_run_default: bool

Default value for the application’s dry-run mode on startup. This can be toggled via the --dry-run CLI flag.

§keymap: KeyMap

Configurable key bindings parsed from pacsea.conf

§sort_mode: SortMode

Initial sort mode for results list.

§clipboard_suffix: String

Text appended when copying PKGBUILD to clipboard.

§show_recent_pane: bool

Whether the Search history pane should be shown on startup.

§show_install_pane: bool

Whether the Install/Remove pane should be shown on startup.

§show_keybinds_footer: bool

Whether the keybinds footer should be shown on startup.

§selected_countries: String

Selected countries used when updating mirrors (comma-separated or multiple).

§mirror_count: u16

Number of mirrors to fetch/rank when updating.

§virustotal_api_key: String

VirusTotal API key for security scanning.

§scan_do_clamav: bool

Whether to run ClamAV scan on AUR packages.

§scan_do_trivy: bool

Whether to run Trivy scan on AUR packages.

§scan_do_semgrep: bool

Whether to run Semgrep scan on AUR packages.

§scan_do_shellcheck: bool

Whether to run ShellCheck scan on AUR packages.

§scan_do_virustotal: bool

Whether to run VirusTotal scan on AUR packages.

§scan_do_custom: bool

Whether to run custom scan on AUR packages.

§scan_do_sleuth: bool

Whether to run Sleuth scan on AUR packages.

§start_in_news: bool

Whether to start the app in News mode (true) or Package mode (false).

§news_filter_show_arch_news: bool

Whether to show Arch news items in the News view.

§news_filter_show_advisories: bool

Whether to show security advisories in the News view.

§news_filter_show_pkg_updates: bool

Whether to show installed package update items in the News view.

§news_filter_show_aur_updates: bool

Whether to show AUR package update items in the News view.

§news_filter_show_aur_comments: bool

Whether to show installed AUR comment items in the News view.

§news_filter_installed_only: bool

Whether to restrict advisories to installed packages in the News view.

§news_max_age_days: Option<u32>

Maximum age of news items in days (None = unlimited).

§startup_news_configured: bool

Whether startup news popup setup has been completed.

§startup_news_show_arch_news: bool

Whether to show Arch news in startup news popup.

§startup_news_show_advisories: bool

Whether to show security advisories in startup news popup.

§startup_news_show_aur_updates: bool

Whether to show AUR updates in startup news popup.

§startup_news_show_aur_comments: bool

Whether to show AUR comments in startup news popup.

§startup_news_show_pkg_updates: bool

Whether to show official package updates in startup news popup.

§startup_news_max_age_days: Option<u32>

Maximum age of news items in days for startup news popup (None = unlimited).

§news_cache_ttl_days: u32

How many days to keep Arch news and advisories cached on disk. Default is 7 days. Helps reduce network requests on startup.

§package_marker: PackageMarker

Visual marker style for packages added to Install/Remove/Downgrade lists.

§news_read_symbol: String

Symbol used to mark a news item as read in the News modal.

§news_unread_symbol: String

Symbol used to mark a news item as unread in the News modal.

§preferred_terminal: String

Preferred terminal binary name to spawn for shell commands (e.g., “alacritty”, “kitty”, “gnome-terminal”). When empty, Pacsea auto-detects from available terminals.

§skip_preflight: bool

When true, skip the Preflight modal and execute actions directly (install/remove/downgrade). Defaults to false to preserve the safer, review-first workflow.

§locale: String

Locale code for translations (e.g., “de-DE”, “en-US”). Empty string means auto-detect from system locale.

§search_startup_mode: bool

Search input mode on startup. When false, starts in insert mode (default). When true, starts in normal mode.

§fuzzy_search: bool

Whether fuzzy search is enabled by default on startup. When false, uses normal substring search (default). When true, uses fuzzy matching (fzf-style).

§updates_refresh_interval: u64

Refresh interval in seconds for pacman -Qu and AUR helper checks. Default is 30 seconds. Set to a higher value to reduce resource usage on slow systems.

§installed_packages_mode: InstalledPackagesMode

Filter mode for installed packages display. LeafOnly shows explicitly installed packages with no dependents. AllExplicit shows all explicitly installed packages.

§get_announcement: bool

Whether to fetch remote announcements from GitHub Gist. If true, fetches announcements from the configured Gist URL. If false, remote announcements are disabled (version announcements still show).

§use_passwordless_sudo: bool

Whether to use passwordless sudo for install operations when available. If false (default), password prompt is always shown even if passwordless sudo is configured. If true, passwordless sudo is used when available, skipping the password prompt. This acts as an additional safety barrier requiring explicit opt-in.

§use_terminal_theme: bool

Whether to use the terminal’s theme colors instead of theme.conf. If true, Pacsea queries the terminal for foreground/background colors via OSC 10/11. If false (default), uses theme.conf colors. Note: Terminal theme is also used automatically when theme.conf is missing/invalid and the terminal is on the supported list (alacritty, kitty, konsole, ghostty, xterm, gnome-terminal, xfce4-terminal, tilix, mate-terminal, wezterm-gui, WezTerm).

Trait Implementations§

Source§

impl Clone for Settings

Source§

fn clone(&self) -> Settings

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Settings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Settings

Source§

fn default() -> Self

What: Provide the built-in baseline configuration for Pacsea settings.

Inputs:

  • None.

Output:

  • Returns a Settings instance populated with Pacsea’s preferred defaults.

Details:

  • Sets balanced pane layout percentages and enables all panes by default.
  • Enables all scan types and uses Catppuccin-inspired news glyphs.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more