term_model::config

Struct Config

Source
pub struct Config<T> {
Show 17 fields pub padding: Option<Delta<u8>>, pub env: HashMap<String, String>, pub font: Font, pub colors: Colors, pub window: WindowConfig, pub selection: Selection, pub shell: Option<Shell<'static>>, pub config_path: Option<PathBuf>, pub visual_bell: VisualBellConfig, pub scrolling: Scrolling, pub cursor: Cursor, pub working_directory: Option<PathBuf>, pub debug: Debug, pub ui_config: T, pub hold: bool, pub render_timer: Option<bool>, pub persistent_logging: Option<bool>, /* private fields */
}
Expand description

Top-level config type

Fields§

§padding: Option<Delta<u8>>

Pixel padding

§env: HashMap<String, String>

TERM env variable

§font: Font

Font configuration

§colors: Colors§window: WindowConfig

Window configuration

§selection: Selection§shell: Option<Shell<'static>>

Path to a shell program to run on startup

§config_path: Option<PathBuf>

Path where config was loaded from

§visual_bell: VisualBellConfig

Visual bell configuration

§scrolling: Scrolling

How much scrolling history to keep

§cursor: Cursor

Cursor configuration

§working_directory: Option<PathBuf>

Shell startup directory

§debug: Debug

Debug options

§ui_config: T

Additional configuration options not directly required by the terminal

§hold: bool

Remain open after child process exits

§render_timer: Option<bool>§persistent_logging: Option<bool>

Implementations§

Source§

impl<T> Config<T>

Source

pub fn tabspaces(&self) -> usize

Source

pub fn draw_bold_text_with_bright_colors(&self) -> bool

Source

pub fn render_timer(&self) -> bool

Should show render timer

Source

pub fn live_config_reload(&self) -> bool

Live config reload

Source

pub fn set_live_config_reload(&mut self, live_config_reload: bool)

Source

pub fn dynamic_title(&self) -> bool

Source

pub fn cursor_text_color(&self) -> Option<Rgb>

Cursor foreground color

Source

pub fn cursor_cursor_color(&self) -> Option<Color>

Cursor background color

Source

pub fn set_dynamic_title(&mut self, dynamic_title: bool)

Source

pub fn alt_send_esc(&self) -> bool

Send escape sequences using the alt key

Source

pub fn persistent_logging(&self) -> bool

Keep the log file after quitting Alacritty

Source

pub fn background_opacity(&self) -> f32

Trait Implementations§

Source§

impl<T: Debug> Debug for Config<T>

Source§

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

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

impl<T: Default> Default for Config<T>

Source§

fn default() -> Config<T>

Returns the “default value” for a type. Read more
Source§

impl<'de, T> Deserialize<'de> for Config<T>
where T: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T: PartialEq> PartialEq for Config<T>

Source§

fn eq(&self, other: &Config<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> StructuralPartialEq for Config<T>

Auto Trait Implementations§

§

impl<T> Freeze for Config<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Config<T>
where T: RefUnwindSafe,

§

impl<T> Send for Config<T>
where T: Send,

§

impl<T> Sync for Config<T>
where T: Sync,

§

impl<T> Unpin for Config<T>
where T: Unpin,

§

impl<T> UnwindSafe for Config<T>
where T: UnwindSafe,

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,