From 8681f71084894db6d1e258be17db1f80bb669314 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Mon, 22 Nov 2021 21:34:09 +0300 Subject: Add parameters to `msg create-window` subcommand Alacritty's `msg create-window` subcommand would previously inherit all the CLI parameters from the original executable. However not only could this lead to unexpected behavior, it also prevents multi-window users from making use of parameters like `-e`, `--working-directory`, or `--hold`. This is solved by adding a JSON-based message format to the IPC socket messages which instructs the Alacritty server on which CLI parameters should be used to create the new window. Fixes #5562. Fixes #5561. Fixes #5560. --- alacritty/src/config/ui_config.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'alacritty/src/config/ui_config.rs') diff --git a/alacritty/src/config/ui_config.rs b/alacritty/src/config/ui_config.rs index 3ba59ea8..353249d5 100644 --- a/alacritty/src/config/ui_config.rs +++ b/alacritty/src/config/ui_config.rs @@ -9,7 +9,9 @@ use serde::{self, Deserialize, Deserializer}; use unicode_width::UnicodeWidthChar; use alacritty_config_derive::ConfigDeserialize; -use alacritty_terminal::config::{Percentage, Program, LOG_TARGET_CONFIG}; +use alacritty_terminal::config::{ + Config as TerminalConfig, Percentage, Program, LOG_TARGET_CONFIG, +}; use alacritty_terminal::term::search::RegexSearch; use crate::config::bell::BellConfig; @@ -66,6 +68,10 @@ pub struct UiConfig { #[cfg(unix)] pub ipc_socket: bool, + /// Config for the alacritty_terminal itself. + #[config(flatten)] + pub terminal_config: TerminalConfig, + /// Keybindings. key_bindings: KeyBindings, @@ -91,6 +97,7 @@ impl Default for UiConfig { config_paths: Default::default(), key_bindings: Default::default(), mouse_bindings: Default::default(), + terminal_config: Default::default(), background_opacity: Default::default(), bell: Default::default(), colors: Default::default(), -- cgit