diff options
Diffstat (limited to 'alacritty_terminal/src/config/mod.rs')
-rw-r--r-- | alacritty_terminal/src/config/mod.rs | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/alacritty_terminal/src/config/mod.rs b/alacritty_terminal/src/config/mod.rs index 0b313598..09161e03 100644 --- a/alacritty_terminal/src/config/mod.rs +++ b/alacritty_terminal/src/config/mod.rs @@ -15,37 +15,43 @@ pub use crate::config::scrolling::Scrolling; pub const LOG_TARGET_CONFIG: &str = "alacritty_config_derive"; const MIN_BLINK_INTERVAL: u64 = 10; -pub type MockConfig = Config<HashMap<String, serde_yaml::Value>>; - /// Top-level config type. #[derive(ConfigDeserialize, Debug, PartialEq, Default)] -pub struct Config<T> { +pub struct Config { /// TERM env variable. pub env: HashMap<String, String>, pub selection: Selection, - /// Path to a shell program to run on startup. - pub shell: Option<Program>, - /// How much scrolling history to keep. pub scrolling: Scrolling, /// Cursor configuration. pub cursor: Cursor, + #[config(flatten)] + pub pty_config: PtyConfig, +} + +#[derive(ConfigDeserialize, Clone, Debug, PartialEq, Default)] +pub struct PtyConfig { + /// Path to a shell program to run on startup. + pub shell: Option<Program>, + /// Shell startup directory. pub working_directory: Option<PathBuf>, - /// Additional configuration options not directly required by the terminal. - #[config(flatten)] - pub ui_config: T, - /// Remain open after child process exits. #[config(skip)] pub hold: bool, } +impl PtyConfig { + pub fn new() -> Self { + Default::default() + } +} + #[derive(ConfigDeserialize, Clone, Debug, PartialEq, Eq)] pub struct Selection { pub semantic_escape_chars: String, |