Skip to main content

Module config

Module config 

Source
Expand description

Terminal configuration management.

Re-exports all configuration types from the par-term-config sub-crate. All configuration types, defaults, and utilities are defined in par-term-config.

§Re-exports from par-term-config

This module is a thin facade: it re-exports every public type from par-term-config so the rest of the main crate can write crate::config::Config instead of par_term_config::Config. This keeps call sites insulated from the sub-crate boundary and makes future refactoring easier (types can be relocated inside par-term-config without touching every call site in the main crate).

Direct dependencies on par-term-config types should route through this module rather than importing from par_term_config directly, unless the code is inside a sub-crate that already depends on par-term-config explicitly.

Modules§

automation
Configuration types for triggers, coprocesses, and trigger security.
cell
config
Terminal configuration management.
defaults
Default value functions for configuration.
profile
Profile configuration types.
profile_types
Profile types and manager for terminal session configurations.
scripting
Configuration types for external observer scripts.
scrollback_mark
shader_config
Shader configuration resolution.
shader_metadata
Shader metadata parsing and caching.
snippets
Configuration types for snippets and custom actions.
status_bar
Status bar widget configuration types.
themes
watcher
Config file watcher for automatic reload.

Structs§

AlertSoundConfig
Configuration for an alert sound tied to a specific event
AutomationConfig
Regex triggers, coprocess definitions and external observer scripts.
BackgroundConfig
Background image source and how window transparency applies to cells and text.
BadgeConfig
Badge overlay text, colour, font and placement.
Cell
A single terminal cell with styled content for rendering.
ClipboardConfig
Clipboard sync event retention and whether OSC 52 may set the system clipboard.
Color
A color in RGB format
CommandSeparatorConfig
Horizontal separator lines drawn between shell commands.
Config
Configuration for the terminal emulator Aligned with par-tui-term naming conventions for consistency
CoprocessDefConfig
Configuration for a coprocess that runs alongside a terminal session.
CursorShaderConfig
Cursor shader specific configuration.
CursorShaderMetadata
Metadata embedded in cursor shader files via YAML block comments.
CustomAcpAgentActionConfig
Action metadata for a custom ACP agent entry.
CustomAcpAgentConfig
User-defined ACP agent configuration sourced from config.yaml.
DividerRect
A divider rectangle between panes
DynamicProfileSource
A remote profile source configuration stored in the main config file
FontRange
Font mapping for a specific Unicode range
ImageConfig
Inline image scaling (Sixel/iTerm2/Kitty) and the terminal background source.
InputConfig
Option/Alt key behaviour, modifier remapping and physical key positions.
IntegrationConfig
Install prompts and version tracking for bundled shaders and shell integration.
IntegrationVersions
Tracks installed and prompted versions for integrations
KeyBinding
A keybinding configuration entry
ModifierRemapping
Modifier remapping configuration.
PaneBackground
Per-pane background image configuration (runtime state)
PaneBackgroundConfig
Per-pane background image configuration (for config persistence)
PaneConfig
Split-pane divider, padding, title-bar and focus-indicator settings.
PowerConfig
Shader pausing and reduced frame rates for unfocused windows and inactive tabs.
Profile
A terminal session profile containing configuration for how to start a session
ProfileManager
Manages a collection of profiles
ProgressBarConfig
Progress bar overlay style, placement and state colours.
RenderingConfig
Frame rate target, VSync mode, GPU preference and output batching.
ResolvedCursorShaderConfig
Fully resolved cursor shader configuration with all values filled in.
ResolvedShaderConfig
Fully resolved shader configuration with all values filled in.
ScriptConfig
Configuration for an external observer script that receives terminal events via JSON protocol.
ScrollbackMark
Public-facing metadata for a mark anchored to a scrollback line.
ScrollbarConfig
Scrollbar placement, size, colours, command marks and auto-hide.
SecurityConfig
Environment variable substitution allowlist and plain-HTTP profile fetching.
SelectionConfig
Copy-on-select, paste behaviour and dropped-file quoting.
SemanticHistoryConfig
File-path/URL detection, the editor that opens them, and link highlighting.
SessionLogConfig
Automatic session recording: format, destination and redaction.
SessionRestoreConfig
Startup arrangement restore, session restore and closed-tab undo retention.
ShaderConfig
Per-shader configuration settings.
ShaderMetadata
Metadata embedded in shader files via YAML block comments.
ShaderOverridesConfig
Per-file overrides for background and cursor shader settings.
ShaderWatchConfig
Automatic reloading of background and cursor shader files on change.
ShellConfig
Which shell runs, where it starts, what it is sent, and what happens when it exits.
SmartSelectionRule
A smart selection rule for pattern-based text selection.
SnippetConfig
A text snippet that can be inserted into the terminal.
SnippetLibrary
A portable snippet library for import/export.
StatusBarWidgetConfig
Configuration for a single status bar widget.
TabBarColorsConfig
Tab bar palette, dimming, sizing and border appearance.
TabConfig
Tab style presets, tab bar placement and new-tab behaviour.
Theme
Terminal color theme with 16 ANSI colors plus foreground/background
ThemeColorsConfig
Terminal colour theme, plus the light/dark pair used by auto dark mode.
TmuxConfig
tmux control-mode integration: discovery, auto-attach and status bar.
TriggerConfig
A trigger definition that matches terminal output and fires actions.
TriggerRateLimiter
Rate limiter for output-triggered actions.
WindowPlacementConfig
Window type, target monitor/Space, resize lock and window numbering.
WordSelectionConfig
Word boundary characters and pattern-based smart selection rules.

Enums§

AlertEvent
Terminal events that can trigger alert sounds
AmbiguousWidth
Treatment of East Asian Ambiguous width characters.
BackgroundImageMode
Background image display mode
BackgroundMode
Background source selection
BuiltInVariable
Built-in variables available for snippet substitution.
ConflictResolution
How to resolve conflicts when a remote profile has the same ID as a local one
CursorStyle
Cursor style
CustomActionConfig
A custom action that can be triggered via keybinding.
DividerStyle
Style of dividers between panes
DownloadSaveLocation
Default save location for downloaded files
DroppedFileQuoteStyle
Quote style for dropped file paths
ImageScalingMode
Image scaling quality for inline graphics (Sixel, iTerm2, Kitty)
InstallPromptState
State of an integration’s install prompt
KeyModifier
Keyboard modifier for keybindings.
LinkUnderlineStyle
Style for link highlight underlines.
LogLevel
Log level for debug logging to file.
ModifierTarget
Target modifier for remapping.
NewTabPosition
Controls where newly created tabs are inserted in the tab bar.
NormalizationForm
Unicode normalization form for terminal text.
OptionKeyMode
Option/Alt key behavior mode
PaneTitlePosition
Position of pane title bars
PowerPreference
GPU power preference for adapter selection
ProfileSource
Tracks where a profile came from (runtime-only, not persisted)
ProgressBarPosition
Progress bar position on screen
ProgressBarStyle
Progress bar visual style
RestartPolicy
Policy for restarting a coprocess when it exits
SemanticHistoryEditorMode
Editor selection mode for semantic history
SessionLogFormat
Log format for session logging
ShaderInstallPrompt
Shader install prompt mode
ShellExitAction
Action to take when the shell process exits
ShellType
Detected shell type
SmartSelectionPrecision
Precision level for smart selection rules.
StartupDirectoryMode
Startup directory mode
StatusBarPosition
Status bar position
StatusBarSection
Section of the status bar where a widget is placed.
TabBarMode
Tab bar visibility mode
TabBarPosition
Tab bar position
TabStyle
Tab visual style preset
TabTitleMode
Controls how tab titles are automatically updated
ThinStrokesMode
Thin strokes / font smoothing mode
TriggerActionConfig
An action fired when a trigger pattern matches terminal output.
UnfocusedCursorStyle
Unfocused cursor style - how the cursor appears when window loses focus
UnicodeVersion
Unicode version for width calculation tables.
UpdateCheckFrequency
Update check frequency
VsyncMode
VSync mode (presentation mode)
WidgetId
Identifier for a built-in or custom status bar widget.
WindowType
Window type for different display modes

Constants§

ALLOWED_ENV_VARS
Environment variables that are safe to substitute in config files.

Functions§

check_command_allowlist
SEC-002: Check if a command is allowed by the optional allowlist.
check_command_denylist
Check if a command string matches any denied pattern.
color_tuple_to_f32_a
Convert an (u8, u8, u8) RGB tuple to [f32; 4] normalized to 0.0..1.0 with the given alpha value appended.
color_u8_to_f32
Convert a [u8; 3] RGB color to [f32; 3] normalized to 0.0..1.0.
color_u8_to_f32_a
Convert a [u8; 3] RGB color to [f32; 4] normalized to 0.0..1.0 with the given alpha value appended.
color_u8x4_rgb_to_f32
Convert the RGB channels of a [u8; 4] color to [f32; 3] normalized to 0.0..1.0, discarding the alpha channel.
color_u8x4_rgb_to_f32_a
Convert the RGB channels of a [u8; 4] color to [f32; 4] normalized to 0.0..1.0, replacing the alpha channel with the provided value.
color_u8x4_to_f32
Convert a [u8; 4] RGBA color to [f32; 4] normalized to 0.0..1.0.
default_smart_selection_rules
Get the default smart selection rules (based on iTerm2’s defaults)
default_widgets
Default widget configuration set.
is_env_var_allowed
Check whether a variable name is on the substitution allowlist.
parse_cursor_shader_metadata
Parse cursor shader metadata from GLSL source code.
parse_shader_metadata
Parse shader metadata from GLSL source code.
resolve_cursor_shader_config
Resolve a cursor shader configuration by merging sources in priority order.
resolve_shader_config
Resolve a shader configuration by merging sources in priority order.
substitute_variables
Substitute ${VAR_NAME} patterns in a string with environment variable values.
substitute_variables_with_allowlist
Substitute variables with explicit allowlist control.
substitute_variables_with_lookup
Substitute variables, resolving names through lookup instead of the process environment.
update_cursor_shader_metadata_file
Update cursor shader metadata in a shader file.
update_shader_metadata_file
Update metadata in a shader file.

Type Aliases§

CursorShaderMetadataCache
Cache for parsed cursor shader metadata.
PaneId
Unique identifier for a pane
ProfileId
Unique identifier for a profile
SeparatorMark
Visible command separator mark: (row, col_offset, optional_color)
ShaderMetadataCache
Cache for parsed background shader metadata.
TabId
Unique identifier for a tab