Skip to main content

par_term_config/
lib.rs

1//! Configuration system for par-term terminal emulator.
2//!
3//! This crate provides configuration loading, saving, and default values
4//! for the terminal emulator. It includes:
5//!
6//! - Terminal configuration types and settings
7//! - Theme definitions and color schemes
8//! - Shader configuration management
9//! - Snippets and automation support
10//! - Configuration file watching
11//! - Status bar widget configuration
12//! - Profile configuration types and manager
13
14pub mod automation;
15pub mod cell;
16pub mod config;
17pub mod defaults;
18pub mod profile;
19pub mod profile_types;
20pub mod scripting;
21pub mod scrollback_mark;
22pub mod shader_config;
23pub mod shader_metadata;
24pub mod snippets;
25pub mod status_bar;
26pub mod themes;
27mod types;
28#[cfg(feature = "watcher")]
29pub mod watcher;
30
31// Re-export main types for convenience
32pub use cell::Cell;
33pub use config::{Config, substitute_variables};
34pub use scrollback_mark::ScrollbackMark;
35pub use themes::{Color, Theme};
36
37// Re-export config types
38pub use types::{
39    AlertEvent, AlertSoundConfig, BackgroundImageMode, BackgroundMode, CursorShaderConfig,
40    CursorShaderMetadata, CursorStyle, DividerRect, DividerStyle, DownloadSaveLocation,
41    DroppedFileQuoteStyle, FontRange, ImageScalingMode, InstallPromptState, IntegrationVersions,
42    KeyBinding, LinkUnderlineStyle, LogLevel, ModifierRemapping, ModifierTarget, OptionKeyMode,
43    PaneBackground, PaneBackgroundConfig, PaneId, PaneTitlePosition, PowerPreference,
44    ProgressBarPosition, ProgressBarStyle, SemanticHistoryEditorMode, SeparatorMark,
45    SessionLogFormat, ShaderConfig, ShaderInstallPrompt, ShaderMetadata, ShellExitAction,
46    ShellType, SmartSelectionPrecision, SmartSelectionRule, StartupDirectoryMode,
47    StatusBarPosition, TabBarMode, TabBarPosition, TabId, TabStyle, ThinStrokesMode,
48    UnfocusedCursorStyle, UpdateCheckFrequency, VsyncMode, WindowType,
49    default_smart_selection_rules,
50};
51// KeyModifier is exported for potential future use (e.g., custom keybinding UI)
52pub use automation::{CoprocessDefConfig, RestartPolicy, TriggerActionConfig, TriggerConfig};
53// Scripting / observer scripts
54pub use scripting::ScriptConfig;
55// Snippets and custom actions
56pub use snippets::{BuiltInVariable, CustomActionConfig, SnippetConfig, SnippetLibrary};
57// Status bar configuration
58pub use status_bar::{StatusBarSection, StatusBarWidgetConfig, WidgetId, default_widgets};
59// Profile configuration
60pub use profile::{ConflictResolution, DynamicProfileSource};
61// Profile types and manager
62pub use profile_types::{Profile, ProfileId, ProfileManager, ProfileSource};
63// Shader config resolution
64pub use shader_config::{resolve_cursor_shader_config, resolve_shader_config};
65// Shader metadata
66pub use shader_metadata::{CursorShaderMetadataCache, ShaderMetadataCache};
67pub use shader_metadata::{
68    parse_cursor_shader_metadata, parse_shader_metadata, update_cursor_shader_metadata_file,
69    update_shader_metadata_file,
70};
71
72// Re-export par-term-emu-core-rust types used by settings UI
73pub use par_term_emu_core_rust::{AmbiguousWidth, NormalizationForm, UnicodeVersion};
74#[allow(unused_imports)]
75pub use types::KeyModifier;
76#[allow(unused_imports)]
77pub use types::{ResolvedCursorShaderConfig, ResolvedShaderConfig};