Skip to main content

par_term/config/
mod.rs

1//! Terminal configuration management.
2//!
3//! Re-exports all configuration types from the `par-term-config` sub-crate.
4//! All configuration types, defaults, and utilities are defined in `par-term-config`.
5//!
6//! # Re-exports from `par-term-config`
7//!
8//! This module is a thin facade: it re-exports every public type from `par-term-config`
9//! so the rest of the main crate can write `crate::config::Config` instead of
10//! `par_term_config::Config`. This keeps call sites insulated from the sub-crate
11//! boundary and makes future refactoring easier (types can be relocated inside
12//! `par-term-config` without touching every call site in the main crate).
13//!
14//! Direct dependencies on `par-term-config` types should route through this module
15//! rather than importing from `par_term_config` directly, unless the code is
16//! inside a sub-crate that already depends on `par-term-config` explicitly.
17
18// --- Modules ---
19pub use par_term_config::automation;
20pub use par_term_config::cell;
21pub use par_term_config::config;
22pub use par_term_config::defaults;
23pub use par_term_config::profile;
24pub use par_term_config::profile_types;
25pub use par_term_config::scripting;
26pub use par_term_config::scrollback_mark;
27pub use par_term_config::shader_config;
28pub use par_term_config::shader_metadata;
29pub use par_term_config::snippets;
30pub use par_term_config::status_bar;
31pub use par_term_config::themes;
32pub use par_term_config::watcher;
33
34// --- Types and structs ---
35pub use par_term_config::{
36    ALLOWED_ENV_VARS, Cell, Color, Config, CustomAcpAgentActionConfig, CustomAcpAgentConfig,
37    ScrollbackMark, Theme, is_env_var_allowed, substitute_variables,
38    substitute_variables_with_allowlist, substitute_variables_with_lookup,
39};
40
41// --- Color conversion helpers ---
42pub use par_term_config::{
43    color_tuple_to_f32_a, color_u8_to_f32, color_u8_to_f32_a, color_u8x4_rgb_to_f32,
44    color_u8x4_rgb_to_f32_a, color_u8x4_to_f32,
45};
46
47// --- Config types ---
48pub use par_term_config::{
49    AlertEvent, AlertSoundConfig, AutomationConfig, BackgroundConfig, BackgroundImageMode,
50    BackgroundMode, BadgeConfig, ClipboardConfig, CommandSeparatorConfig, CursorShaderConfig,
51    CursorShaderMetadata, CursorStyle, DividerRect, DividerStyle, DownloadSaveLocation,
52    DroppedFileQuoteStyle, FontRange, ImageConfig, ImageScalingMode, InputConfig,
53    InstallPromptState, IntegrationConfig, IntegrationVersions, KeyBinding, KeyModifier,
54    LinkUnderlineStyle, LogLevel, ModifierRemapping, ModifierTarget, NewTabPosition, OptionKeyMode,
55    PaneBackground, PaneBackgroundConfig, PaneConfig, PaneId, PaneTitlePosition, PowerConfig,
56    PowerPreference, ProgressBarConfig, ProgressBarPosition, ProgressBarStyle, RenderingConfig,
57    ResolvedCursorShaderConfig, ResolvedShaderConfig, ScrollbarConfig, SecurityConfig,
58    SelectionConfig, SemanticHistoryConfig, SemanticHistoryEditorMode, SeparatorMark,
59    SessionLogConfig, SessionLogFormat, SessionRestoreConfig, ShaderConfig, ShaderInstallPrompt,
60    ShaderMetadata, ShaderOverridesConfig, ShaderWatchConfig, ShellConfig, ShellExitAction,
61    ShellType, SmartSelectionPrecision, SmartSelectionRule, StartupDirectoryMode,
62    StatusBarPosition, TabBarColorsConfig, TabBarMode, TabBarPosition, TabConfig, TabId, TabStyle,
63    TabTitleMode, ThemeColorsConfig, ThinStrokesMode, TmuxConfig, UnfocusedCursorStyle,
64    UpdateCheckFrequency, VsyncMode, WindowPlacementConfig, WindowType, WordSelectionConfig,
65    default_smart_selection_rules,
66};
67
68// --- Automation ---
69pub use par_term_config::{
70    CoprocessDefConfig, RestartPolicy, TriggerActionConfig, TriggerConfig, TriggerRateLimiter,
71    check_command_allowlist, check_command_denylist,
72};
73
74// --- Scripting ---
75pub use par_term_config::ScriptConfig;
76
77// --- Snippets ---
78pub use par_term_config::{BuiltInVariable, CustomActionConfig, SnippetConfig, SnippetLibrary};
79
80// --- Status bar ---
81pub use par_term_config::{StatusBarSection, StatusBarWidgetConfig, WidgetId, default_widgets};
82
83// --- Profiles ---
84pub use par_term_config::{ConflictResolution, DynamicProfileSource};
85pub use par_term_config::{Profile, ProfileId, ProfileManager, ProfileSource};
86
87// --- Shader config/metadata ---
88pub use par_term_config::{CursorShaderMetadataCache, ShaderMetadataCache};
89pub use par_term_config::{
90    parse_cursor_shader_metadata, parse_shader_metadata, update_cursor_shader_metadata_file,
91    update_shader_metadata_file,
92};
93pub use par_term_config::{resolve_cursor_shader_config, resolve_shader_config};
94
95// --- Core re-exports ---
96pub use par_term_config::{AmbiguousWidth, NormalizationForm, UnicodeVersion};