pub struct Config {Show 75 fields
pub cols: usize,
pub rows: usize,
pub font_size: f32,
pub font_family: String,
pub font_family_bold: Option<String>,
pub font_family_italic: Option<String>,
pub font_family_bold_italic: Option<String>,
pub font_ranges: Vec<FontRange>,
pub line_spacing: f32,
pub char_spacing: f32,
pub enable_text_shaping: bool,
pub enable_ligatures: bool,
pub enable_kerning: bool,
pub window_title: String,
pub allow_title_change: bool,
pub max_fps: u32,
pub vsync_mode: VsyncMode,
pub window_padding: f32,
pub window_opacity: f32,
pub window_always_on_top: bool,
pub window_decorations: bool,
pub window_width: u32,
pub window_height: u32,
pub background_image: Option<String>,
pub background_image_enabled: bool,
pub background_image_mode: BackgroundImageMode,
pub background_image_opacity: f32,
pub custom_shader: Option<String>,
pub custom_shader_enabled: bool,
pub custom_shader_animation: bool,
pub custom_shader_animation_speed: f32,
pub custom_shader_text_opacity: f32,
pub custom_shader_full_content: bool,
pub cursor_shader: Option<String>,
pub cursor_shader_enabled: bool,
pub cursor_shader_animation: bool,
pub cursor_shader_animation_speed: f32,
pub cursor_shader_color: [u8; 3],
pub cursor_shader_trail_duration: f32,
pub cursor_shader_glow_radius: f32,
pub cursor_shader_glow_intensity: f32,
pub auto_copy_selection: bool,
pub copy_trailing_newline: bool,
pub middle_click_paste: bool,
pub mouse_scroll_speed: f32,
pub mouse_double_click_threshold: u64,
pub mouse_triple_click_threshold: u64,
pub scrollback_lines: usize,
pub cursor_blink: bool,
pub cursor_blink_interval: u64,
pub cursor_style: CursorStyle,
pub cursor_color: [u8; 3],
pub scrollbar_autohide_delay: u64,
pub theme: String,
pub screenshot_format: String,
pub exit_on_shell_exit: bool,
pub custom_shell: Option<String>,
pub shell_args: Option<Vec<String>>,
pub working_directory: Option<String>,
pub shell_env: Option<HashMap<String, String>>,
pub login_shell: bool,
pub scrollbar_position: String,
pub scrollbar_width: f32,
pub scrollbar_thumb_color: [f32; 4],
pub scrollbar_track_color: [f32; 4],
pub clipboard_max_sync_events: usize,
pub clipboard_max_event_bytes: usize,
pub notification_bell_desktop: bool,
pub notification_bell_sound: u8,
pub notification_bell_visual: bool,
pub notification_activity_enabled: bool,
pub notification_activity_threshold: u64,
pub notification_silence_enabled: bool,
pub notification_silence_threshold: u64,
pub notification_max_buffer: usize,
}Expand description
Configuration for the terminal emulator Aligned with par-tui-term naming conventions for consistency
Fields§
§cols: usizeNumber of columns in the terminal
rows: usizeNumber of rows in the terminal
font_size: f32Font size in points
font_family: StringFont family name (regular/normal weight)
font_family_bold: Option<String>Bold font family name (optional, defaults to font_family)
font_family_italic: Option<String>Italic font family name (optional, defaults to font_family)
font_family_bold_italic: Option<String>Bold italic font family name (optional, defaults to font_family)
font_ranges: Vec<FontRange>Custom font mappings for specific Unicode ranges Format: Vec of (start_codepoint, end_codepoint, font_family_name) Example: [(0x4E00, 0x9FFF, “Noto Sans CJK SC”)] for CJK Unified Ideographs
line_spacing: f32Line height multiplier (1.0 = tight, 1.2 = default, 1.5 = spacious)
char_spacing: f32Character width multiplier (0.5 = narrow, 0.6 = default, 0.7 = wide)
enable_text_shaping: boolEnable text shaping for ligatures and complex scripts When enabled, uses HarfBuzz for proper ligature, emoji, and complex script rendering
enable_ligatures: boolEnable ligatures (requires enable_text_shaping)
enable_kerning: boolEnable kerning adjustments (requires enable_text_shaping)
window_title: StringWindow title
allow_title_change: boolAllow applications to change the window title via OSC escape sequences When false, the window title will always be the configured window_title
max_fps: u32Maximum frames per second (FPS) target Controls how frequently the terminal requests screen redraws. Note: On macOS, actual FPS may be lower (~22-25) due to system-level VSync throttling in wgpu/Metal, regardless of this setting. Default: 60
vsync_mode: VsyncModeVSync mode - controls GPU frame synchronization
- immediate: No VSync, render as fast as possible (lowest latency, highest power)
- mailbox: Cap at monitor refresh rate with triple buffering (balanced)
- fifo: Strict VSync with double buffering (lowest power, slight input lag)
Default: immediate (for maximum performance)
window_padding: f32Window padding in pixels
window_opacity: f32Window opacity/transparency (0.0 = fully transparent, 1.0 = fully opaque)
window_always_on_top: boolKeep window always on top of other windows
window_decorations: boolShow window decorations (title bar, borders)
window_width: u32Initial window width in pixels
window_height: u32Initial window height in pixels
background_image: Option<String>Background image path (optional, supports ~ for home directory)
background_image_enabled: boolEnable or disable background image rendering (even if a path is set)
background_image_mode: BackgroundImageModeBackground image display mode
- fit: Scale to fit window while maintaining aspect ratio (default)
- fill: Scale to fill window while maintaining aspect ratio (may crop)
- stretch: Stretch to fill window (ignores aspect ratio)
- tile: Repeat image in a tiled pattern
- center: Center image at original size
background_image_opacity: f32Background image opacity (0.0 = fully transparent, 1.0 = fully opaque)
custom_shader: Option<String>Custom shader file path (GLSL format, relative to shaders folder or absolute) Shaders are loaded from ~/.config/par-term/shaders/ by default Supports Ghostty/Shadertoy-style GLSL shaders with iTime, iResolution, iChannel0
custom_shader_enabled: boolEnable or disable the custom shader (even if a path is set)
custom_shader_animation: boolEnable animation in custom shader (updates iTime uniform each frame) When disabled, iTime is fixed at 0.0 for static effects
custom_shader_animation_speed: f32Animation speed multiplier for custom shader (1.0 = normal speed)
custom_shader_text_opacity: f32Text opacity when using custom shader (0.0 = transparent, 1.0 = fully opaque) This allows text to remain readable while the shader effect shows through the background
custom_shader_full_content: boolWhen enabled, the shader receives the full rendered terminal content (text + background) and can manipulate/distort it. When disabled (default), the shader only provides a background and text is composited on top cleanly.
cursor_shader: Option<String>Cursor shader file path (GLSL format, relative to shaders folder or absolute) This is a separate shader specifically for cursor effects (trails, glows, etc.)
cursor_shader_enabled: boolEnable or disable the cursor shader (even if a path is set)
cursor_shader_animation: boolEnable animation in cursor shader (updates iTime uniform each frame)
cursor_shader_animation_speed: f32Animation speed multiplier for cursor shader (1.0 = normal speed)
cursor_shader_color: [u8; 3]Cursor color for shader effects [R, G, B] (0-255) This color is passed to the shader via iCursorShaderColor uniform
cursor_shader_trail_duration: f32Duration of cursor trail effect in seconds Passed to shader via iCursorTrailDuration uniform
cursor_shader_glow_radius: f32Radius of cursor glow effect in pixels Passed to shader via iCursorGlowRadius uniform
cursor_shader_glow_intensity: f32Intensity of cursor glow effect (0.0 = none, 1.0 = full) Passed to shader via iCursorGlowIntensity uniform
auto_copy_selection: boolAutomatically copy selected text to clipboard
copy_trailing_newline: boolInclude trailing newline when copying lines Note: Inverted logic from old strip_trailing_newline_on_copy
middle_click_paste: boolPaste on middle mouse button click
mouse_scroll_speed: f32Mouse wheel scroll speed multiplier
mouse_double_click_threshold: u64Double-click timing threshold in milliseconds
mouse_triple_click_threshold: u64Triple-click timing threshold in milliseconds (typically same as double-click)
scrollback_lines: usizeMaximum number of lines to keep in scrollback buffer
cursor_blink: boolEnable cursor blinking
cursor_blink_interval: u64Cursor blink interval in milliseconds
cursor_style: CursorStyleCursor style (block, beam, underline)
cursor_color: [u8; 3]Cursor color [R, G, B] (0-255)
scrollbar_autohide_delay: u64Auto-hide scrollbar after inactivity (milliseconds, 0 = never hide)
theme: StringColor theme name to use for terminal colors
screenshot_format: StringFile format for screenshots (png, jpeg, svg, html)
exit_on_shell_exit: boolExit when shell exits
custom_shell: Option<String>Custom shell command (defaults to system shell if not specified)
shell_args: Option<Vec<String>>Arguments to pass to the shell
working_directory: Option<String>Working directory for the shell (defaults to current directory)
shell_env: Option<HashMap<String, String>>Environment variables to set for the shell
login_shell: boolWhether to spawn the shell as a login shell (passes -l flag) This is important on macOS to properly initialize PATH from Homebrew, /etc/paths.d, etc. Default: true
scrollbar_position: StringScrollbar position (left or right)
scrollbar_width: f32Scrollbar width in pixels
scrollbar_thumb_color: [f32; 4]Scrollbar thumb color (RGBA: [r, g, b, a] where each is 0.0-1.0)
scrollbar_track_color: [f32; 4]Scrollbar track color (RGBA: [r, g, b, a] where each is 0.0-1.0)
clipboard_max_sync_events: usizeMaximum clipboard sync events retained for diagnostics
clipboard_max_event_bytes: usizeMaximum bytes stored per clipboard sync event
notification_bell_desktop: boolForward BEL events to desktop notification centers
notification_bell_sound: u8Volume (0-100) for backend bell sound alerts (0 disables)
notification_bell_visual: boolEnable backend visual bell overlay
notification_activity_enabled: boolEnable notifications when activity resumes after inactivity
notification_activity_threshold: u64Seconds of inactivity required before an activity alert fires
notification_silence_enabled: boolEnable notifications after prolonged silence
notification_silence_threshold: u64Seconds of silence before a silence alert fires
notification_max_buffer: usizeMaximum number of OSC 9/777 notification entries retained by backend
Implementations§
Source§impl Config
impl Config
Sourcepub fn config_path() -> PathBuf
pub fn config_path() -> PathBuf
Get the configuration file path (using XDG convention)
Sourcepub fn shaders_dir() -> PathBuf
pub fn shaders_dir() -> PathBuf
Get the shaders directory path (using XDG convention)
Sourcepub fn shader_path(shader_name: &str) -> PathBuf
pub fn shader_path(shader_name: &str) -> PathBuf
Get the full path to a shader file If the shader path is absolute, returns it as-is Otherwise, resolves it relative to the shaders directory
Sourcepub fn with_dimensions(self, cols: usize, rows: usize) -> Self
pub fn with_dimensions(self, cols: usize, rows: usize) -> Self
Set window dimensions
Sourcepub fn with_font_size(self, size: f32) -> Self
pub fn with_font_size(self, size: f32) -> Self
Set font size
Sourcepub fn with_font_family(self, family: impl Into<String>) -> Self
pub fn with_font_family(self, family: impl Into<String>) -> Self
Set font family
Sourcepub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
Set the window title
Sourcepub fn with_scrollback(self, size: usize) -> Self
pub fn with_scrollback(self, size: usize) -> Self
Set the scrollback buffer size
Sourcepub fn load_theme(&self) -> Theme
pub fn load_theme(&self) -> Theme
Load theme configuration
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().