mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-25 14:05:41 -05:00
Add --option
argument to create-window
This patch adds a new CLI parameter to the `create-window` subcommand, matching the existing `--option` parameter when creating a new Alacritty instance. This parameter allows setting up the initial window configuration from the CLI without having to call `alacritty msg config`, making sure that all options are set appropriately right from the start. Closes #6238.
This commit is contained in:
parent
683b5a2cb4
commit
2f097dac5c
13 changed files with 190 additions and 112 deletions
|
@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Debug option `prefer_egl` to prioritize EGL over other display APIs
|
- Debug option `prefer_egl` to prioritize EGL over other display APIs
|
||||||
- Inline vi-mode search using `f`/`F`/`t`/`T`
|
- Inline vi-mode search using `f`/`F`/`t`/`T`
|
||||||
- `window.blur` config option to request blur for transparent windows
|
- `window.blur` config option to request blur for transparent windows
|
||||||
|
- `--option` argument for `alacritty msg create-window`
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,20 @@
|
||||||
use std::cmp::max;
|
use std::cmp::max;
|
||||||
|
use std::ops::{Deref, DerefMut};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
use std::rc::Rc;
|
||||||
|
|
||||||
|
use alacritty_config::SerdeReplace;
|
||||||
use clap::{ArgAction, Args, Parser, Subcommand, ValueHint};
|
use clap::{ArgAction, Args, Parser, Subcommand, ValueHint};
|
||||||
use log::{self, error, LevelFilter};
|
use log::{self, error, LevelFilter};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use toml::Value;
|
use toml::Value;
|
||||||
|
|
||||||
use crate::logging::LOG_TARGET_CONFIG;
|
|
||||||
use alacritty_terminal::tty::Options as PtyOptions;
|
use alacritty_terminal::tty::Options as PtyOptions;
|
||||||
|
|
||||||
use crate::config::ui_config::Program;
|
use crate::config::ui_config::Program;
|
||||||
use crate::config::window::{Class, Identity};
|
use crate::config::window::{Class, Identity};
|
||||||
use crate::config::UiConfig;
|
use crate::config::UiConfig;
|
||||||
|
use crate::logging::LOG_TARGET_IPC_CONFIG;
|
||||||
|
|
||||||
/// CLI options for the main Alacritty executable.
|
/// CLI options for the main Alacritty executable.
|
||||||
#[derive(Parser, Default, Debug)]
|
#[derive(Parser, Default, Debug)]
|
||||||
|
@ -60,7 +63,7 @@ pub struct Options {
|
||||||
|
|
||||||
/// CLI options for config overrides.
|
/// CLI options for config overrides.
|
||||||
#[clap(skip)]
|
#[clap(skip)]
|
||||||
pub config_options: Vec<(String, Value)>,
|
pub config_options: ParsedOptions,
|
||||||
|
|
||||||
/// Options which can be passed via IPC.
|
/// Options which can be passed via IPC.
|
||||||
#[clap(flatten)]
|
#[clap(flatten)]
|
||||||
|
@ -75,22 +78,14 @@ impl Options {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
let mut options = Self::parse();
|
let mut options = Self::parse();
|
||||||
|
|
||||||
for option in options.window_options.option.drain(..) {
|
// Parse CLI config overrides.
|
||||||
let parsed = match toml::from_str(&option) {
|
options.config_options = options.window_options.config_overrides();
|
||||||
Ok(parsed) => parsed,
|
|
||||||
Err(err) => {
|
|
||||||
eprintln!("Ignoring invalid CLI option '{option}': {err}");
|
|
||||||
continue;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
options.config_options.push((option, parsed));
|
|
||||||
}
|
|
||||||
|
|
||||||
options
|
options
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Override configuration file with options from the CLI.
|
/// Override configuration file with options from the CLI.
|
||||||
pub fn override_config(&self, config: &mut UiConfig) {
|
pub fn override_config(&mut self, config: &mut UiConfig) {
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
{
|
{
|
||||||
config.ipc_socket |= self.socket.is_some();
|
config.ipc_socket |= self.socket.is_some();
|
||||||
|
@ -107,12 +102,7 @@ impl Options {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace CLI options.
|
// Replace CLI options.
|
||||||
use alacritty_config::SerdeReplace;
|
self.config_options.override_config(config);
|
||||||
for (option, parsed) in &self.config_options {
|
|
||||||
if let Err(err) = config.replace(parsed.clone()) {
|
|
||||||
error!(target: LOG_TARGET_CONFIG, "Unable to set CLI option '{}': {}", option, err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Logging filter level.
|
/// Logging filter level.
|
||||||
|
@ -305,16 +295,23 @@ pub struct WindowOptions {
|
||||||
/// The window tabbing identifier to use when building a window.
|
/// The window tabbing identifier to use when building a window.
|
||||||
pub window_tabbing_id: Option<String>,
|
pub window_tabbing_id: Option<String>,
|
||||||
|
|
||||||
/// Override configuration file options [example: cursor.style=Beam].
|
/// Override configuration file options [example: 'cursor.style="Beam"'].
|
||||||
#[clap(short = 'o', long, num_args = 1..)]
|
#[clap(short = 'o', long, num_args = 1..)]
|
||||||
option: Vec<String>,
|
option: Vec<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl WindowOptions {
|
||||||
|
/// Get the parsed set of CLI config overrides.
|
||||||
|
pub fn config_overrides(&self) -> ParsedOptions {
|
||||||
|
ParsedOptions::from_options(&self.option)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Parameters to the `config` IPC subcommand.
|
/// Parameters to the `config` IPC subcommand.
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
#[derive(Args, Serialize, Deserialize, Default, Debug, Clone, PartialEq, Eq)]
|
#[derive(Args, Serialize, Deserialize, Default, Debug, Clone, PartialEq, Eq)]
|
||||||
pub struct IpcConfig {
|
pub struct IpcConfig {
|
||||||
/// Configuration file options [example: cursor.style=Beam].
|
/// Configuration file options [example: 'cursor.style="Beam"'].
|
||||||
#[clap(required = true, value_name = "CONFIG_OPTIONS")]
|
#[clap(required = true, value_name = "CONFIG_OPTIONS")]
|
||||||
pub options: Vec<String>,
|
pub options: Vec<String>,
|
||||||
|
|
||||||
|
@ -329,6 +326,78 @@ pub struct IpcConfig {
|
||||||
pub reset: bool,
|
pub reset: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Parsed CLI config overrides.
|
||||||
|
#[derive(Debug, Default)]
|
||||||
|
pub struct ParsedOptions {
|
||||||
|
config_options: Vec<(String, Value)>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ParsedOptions {
|
||||||
|
/// Parse CLI config overrides.
|
||||||
|
pub fn from_options(options: &[String]) -> Self {
|
||||||
|
let mut config_options = Vec::new();
|
||||||
|
|
||||||
|
for option in options {
|
||||||
|
let parsed = match toml::from_str(option) {
|
||||||
|
Ok(parsed) => parsed,
|
||||||
|
Err(err) => {
|
||||||
|
eprintln!("Ignoring invalid CLI option '{option}': {err}");
|
||||||
|
continue;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
config_options.push((option.clone(), parsed));
|
||||||
|
}
|
||||||
|
|
||||||
|
Self { config_options }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Apply CLI config overrides, removing broken ones.
|
||||||
|
pub fn override_config(&mut self, config: &mut UiConfig) {
|
||||||
|
let mut i = 0;
|
||||||
|
while i < self.config_options.len() {
|
||||||
|
let (option, parsed) = &self.config_options[i];
|
||||||
|
match config.replace(parsed.clone()) {
|
||||||
|
Err(err) => {
|
||||||
|
error!(
|
||||||
|
target: LOG_TARGET_IPC_CONFIG,
|
||||||
|
"Unable to override option '{}': {}", option, err
|
||||||
|
);
|
||||||
|
self.config_options.swap_remove(i);
|
||||||
|
},
|
||||||
|
Ok(_) => i += 1,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Apply CLI config overrides to a CoW config.
|
||||||
|
pub fn override_config_rc(&mut self, config: Rc<UiConfig>) -> Rc<UiConfig> {
|
||||||
|
// Skip clone without write requirement.
|
||||||
|
if self.config_options.is_empty() {
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Override cloned config.
|
||||||
|
let mut config = (*config).clone();
|
||||||
|
self.override_config(&mut config);
|
||||||
|
|
||||||
|
Rc::new(config)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Deref for ParsedOptions {
|
||||||
|
type Target = Vec<(String, Value)>;
|
||||||
|
|
||||||
|
fn deref(&self) -> &Self::Target {
|
||||||
|
&self.config_options
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl DerefMut for ParsedOptions {
|
||||||
|
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||||
|
&mut self.config_options
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
@ -361,7 +430,7 @@ mod tests {
|
||||||
let title = Some(String::from("foo"));
|
let title = Some(String::from("foo"));
|
||||||
let window_identity = WindowIdentity { title, ..WindowIdentity::default() };
|
let window_identity = WindowIdentity { title, ..WindowIdentity::default() };
|
||||||
let new_window_options = WindowOptions { window_identity, ..WindowOptions::default() };
|
let new_window_options = WindowOptions { window_identity, ..WindowOptions::default() };
|
||||||
let options = Options { window_options: new_window_options, ..Options::default() };
|
let mut options = Options { window_options: new_window_options, ..Options::default() };
|
||||||
options.override_config(&mut config);
|
options.override_config(&mut config);
|
||||||
|
|
||||||
assert!(!config.window.dynamic_title);
|
assert!(!config.window.dynamic_title);
|
||||||
|
|
|
@ -126,7 +126,7 @@ impl From<YamlError> for Error {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Load the configuration file.
|
/// Load the configuration file.
|
||||||
pub fn load(options: &Options) -> UiConfig {
|
pub fn load(options: &mut Options) -> UiConfig {
|
||||||
let config_path = options
|
let config_path = options
|
||||||
.config_file
|
.config_file
|
||||||
.clone()
|
.clone()
|
||||||
|
@ -155,7 +155,7 @@ pub fn load(options: &Options) -> UiConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Attempt to reload the configuration file.
|
/// Attempt to reload the configuration file.
|
||||||
pub fn reload(config_path: &Path, options: &Options) -> Result<UiConfig> {
|
pub fn reload(config_path: &Path, options: &mut Options) -> Result<UiConfig> {
|
||||||
debug!("Reloading configuration file: {:?}", config_path);
|
debug!("Reloading configuration file: {:?}", config_path);
|
||||||
|
|
||||||
// Load config, propagating errors.
|
// Load config, propagating errors.
|
||||||
|
@ -167,7 +167,7 @@ pub fn reload(config_path: &Path, options: &Options) -> Result<UiConfig> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Modifications after the `UiConfig` object is created.
|
/// Modifications after the `UiConfig` object is created.
|
||||||
fn after_loading(config: &mut UiConfig, options: &Options) {
|
fn after_loading(config: &mut UiConfig, options: &mut Options) {
|
||||||
// Override config with CLI options.
|
// Override config with CLI options.
|
||||||
options.override_config(config);
|
options.override_config(config);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ use alacritty_terminal::term::search::{Match, RegexSearch};
|
||||||
use alacritty_terminal::term::{self, ClipboardType, Term, TermMode};
|
use alacritty_terminal::term::{self, ClipboardType, Term, TermMode};
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use crate::cli::IpcConfig;
|
use crate::cli::{IpcConfig, ParsedOptions};
|
||||||
use crate::cli::{Options as CliOptions, WindowOptions};
|
use crate::cli::{Options as CliOptions, WindowOptions};
|
||||||
use crate::clipboard::Clipboard;
|
use crate::clipboard::Clipboard;
|
||||||
use crate::config::ui_config::{HintAction, HintInternalAction};
|
use crate::config::ui_config::{HintAction, HintInternalAction};
|
||||||
|
@ -1479,7 +1479,7 @@ pub struct Processor {
|
||||||
windows: HashMap<WindowId, WindowContext, RandomState>,
|
windows: HashMap<WindowId, WindowContext, RandomState>,
|
||||||
gl_display: Option<GlutinDisplay>,
|
gl_display: Option<GlutinDisplay>,
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
global_ipc_options: Vec<String>,
|
global_ipc_options: ParsedOptions,
|
||||||
cli_options: CliOptions,
|
cli_options: CliOptions,
|
||||||
config: Rc<UiConfig>,
|
config: Rc<UiConfig>,
|
||||||
}
|
}
|
||||||
|
@ -1531,16 +1531,16 @@ impl Processor {
|
||||||
) -> Result<(), Box<dyn Error>> {
|
) -> Result<(), Box<dyn Error>> {
|
||||||
let window = self.windows.iter().next().as_ref().unwrap().1;
|
let window = self.windows.iter().next().as_ref().unwrap().1;
|
||||||
|
|
||||||
|
// Overide config with CLI/IPC options.
|
||||||
|
let mut config_overrides = options.config_overrides();
|
||||||
|
#[cfg(unix)]
|
||||||
|
config_overrides.extend_from_slice(&self.global_ipc_options);
|
||||||
|
let mut config = self.config.clone();
|
||||||
|
config = config_overrides.override_config_rc(config);
|
||||||
|
|
||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
let mut window_context =
|
let mut window_context =
|
||||||
window.additional(event_loop, proxy, self.config.clone(), options)?;
|
window.additional(event_loop, proxy, config, options, config_overrides)?;
|
||||||
|
|
||||||
// Apply global IPC options.
|
|
||||||
#[cfg(unix)]
|
|
||||||
{
|
|
||||||
let options = self.global_ipc_options.clone();
|
|
||||||
window_context.add_window_config(self.config.clone(), &options);
|
|
||||||
}
|
|
||||||
|
|
||||||
self.windows.insert(window_context.id(), window_context);
|
self.windows.insert(window_context.id(), window_context);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -1712,7 +1712,7 @@ impl Processor {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load config and update each terminal.
|
// Load config and update each terminal.
|
||||||
if let Ok(config) = config::reload(&path, &self.cli_options) {
|
if let Ok(config) = config::reload(&path, &mut self.cli_options) {
|
||||||
self.config = Rc::new(config);
|
self.config = Rc::new(config);
|
||||||
|
|
||||||
for window_context in self.windows.values_mut() {
|
for window_context in self.windows.values_mut() {
|
||||||
|
@ -1726,15 +1726,10 @@ impl Processor {
|
||||||
payload: EventType::IpcConfig(ipc_config),
|
payload: EventType::IpcConfig(ipc_config),
|
||||||
window_id,
|
window_id,
|
||||||
}) => {
|
}) => {
|
||||||
// Persist global options for future windows.
|
// Try and parse options as toml.
|
||||||
if window_id.is_none() {
|
let mut options = ParsedOptions::from_options(&ipc_config.options);
|
||||||
if ipc_config.reset {
|
|
||||||
self.global_ipc_options.clear();
|
|
||||||
} else {
|
|
||||||
self.global_ipc_options.extend_from_slice(&ipc_config.options);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Override IPC config for each window with matching ID.
|
||||||
for (_, window_context) in self
|
for (_, window_context) in self
|
||||||
.windows
|
.windows
|
||||||
.iter_mut()
|
.iter_mut()
|
||||||
|
@ -1743,8 +1738,16 @@ impl Processor {
|
||||||
if ipc_config.reset {
|
if ipc_config.reset {
|
||||||
window_context.reset_window_config(self.config.clone());
|
window_context.reset_window_config(self.config.clone());
|
||||||
} else {
|
} else {
|
||||||
window_context
|
window_context.add_window_config(self.config.clone(), &options);
|
||||||
.add_window_config(self.config.clone(), &ipc_config.options);
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Persist global options for future windows.
|
||||||
|
if window_id.is_none() {
|
||||||
|
if ipc_config.reset {
|
||||||
|
self.global_ipc_options.clear();
|
||||||
|
} else {
|
||||||
|
self.global_ipc_options.append(&mut options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,8 +20,8 @@ use crate::cli::Options;
|
||||||
use crate::event::{Event, EventType};
|
use crate::event::{Event, EventType};
|
||||||
use crate::message_bar::{Message, MessageType};
|
use crate::message_bar::{Message, MessageType};
|
||||||
|
|
||||||
/// Logging target for per-window config error messages.
|
/// Logging target for IPC config error messages.
|
||||||
pub const LOG_TARGET_WINDOW_CONFIG: &str = "alacritty_log_window_config";
|
pub const LOG_TARGET_IPC_CONFIG: &str = "alacritty_log_window_config";
|
||||||
|
|
||||||
/// Name for the environment variable containing the log file's path.
|
/// Name for the environment variable containing the log file's path.
|
||||||
const ALACRITTY_LOG_ENV: &str = "ALACRITTY_LOG";
|
const ALACRITTY_LOG_ENV: &str = "ALACRITTY_LOG";
|
||||||
|
@ -42,7 +42,7 @@ static EXTRA_LOG_TARGETS: Lazy<Vec<String>> = Lazy::new(|| {
|
||||||
|
|
||||||
/// List of targets which will be logged by Alacritty.
|
/// List of targets which will be logged by Alacritty.
|
||||||
const ALLOWED_TARGETS: &[&str] = &[
|
const ALLOWED_TARGETS: &[&str] = &[
|
||||||
LOG_TARGET_WINDOW_CONFIG,
|
LOG_TARGET_IPC_CONFIG,
|
||||||
LOG_TARGET_CONFIG,
|
LOG_TARGET_CONFIG,
|
||||||
"alacritty_config_derive",
|
"alacritty_config_derive",
|
||||||
"alacritty_terminal",
|
"alacritty_terminal",
|
||||||
|
@ -50,6 +50,7 @@ const ALLOWED_TARGETS: &[&str] = &[
|
||||||
"crossfont",
|
"crossfont",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/// Initialize the logger to its defaults.
|
||||||
pub fn initialize(
|
pub fn initialize(
|
||||||
options: &Options,
|
options: &Options,
|
||||||
event_proxy: EventLoopProxy<Event>,
|
event_proxy: EventLoopProxy<Event>,
|
||||||
|
|
|
@ -122,7 +122,7 @@ impl Drop for TemporaryFiles {
|
||||||
///
|
///
|
||||||
/// Creates a window, the terminal state, PTY, I/O event loop, input processor,
|
/// Creates a window, the terminal state, PTY, I/O event loop, input processor,
|
||||||
/// config change monitor, and runs the main display loop.
|
/// config change monitor, and runs the main display loop.
|
||||||
fn alacritty(options: Options) -> Result<(), Box<dyn Error>> {
|
fn alacritty(mut options: Options) -> Result<(), Box<dyn Error>> {
|
||||||
// Setup winit event loop.
|
// Setup winit event loop.
|
||||||
let window_event_loop = WinitEventLoopBuilder::<Event>::with_user_event().build()?;
|
let window_event_loop = WinitEventLoopBuilder::<Event>::with_user_event().build()?;
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ fn alacritty(options: Options) -> Result<(), Box<dyn Error>> {
|
||||||
info!("Running on Wayland");
|
info!("Running on Wayland");
|
||||||
|
|
||||||
// Load configuration file.
|
// Load configuration file.
|
||||||
let config = config::load(&options);
|
let config = config::load(&mut options);
|
||||||
log_config_path(&config);
|
log_config_path(&config);
|
||||||
|
|
||||||
// Update the log level from config.
|
// Update the log level from config.
|
||||||
|
|
|
@ -14,14 +14,13 @@ use glutin::config::GetGlConfig;
|
||||||
use glutin::display::GetGlDisplay;
|
use glutin::display::GetGlDisplay;
|
||||||
#[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))]
|
#[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))]
|
||||||
use glutin::platform::x11::X11GlConfigExt;
|
use glutin::platform::x11::X11GlConfigExt;
|
||||||
use log::{error, info};
|
use log::info;
|
||||||
use raw_window_handle::HasRawDisplayHandle;
|
use raw_window_handle::HasRawDisplayHandle;
|
||||||
use serde_json as json;
|
use serde_json as json;
|
||||||
use winit::event::{Event as WinitEvent, Modifiers, WindowEvent};
|
use winit::event::{Event as WinitEvent, Modifiers, WindowEvent};
|
||||||
use winit::event_loop::{EventLoopProxy, EventLoopWindowTarget};
|
use winit::event_loop::{EventLoopProxy, EventLoopWindowTarget};
|
||||||
use winit::window::WindowId;
|
use winit::window::WindowId;
|
||||||
|
|
||||||
use alacritty_config::SerdeReplace;
|
|
||||||
use alacritty_terminal::event::Event as TerminalEvent;
|
use alacritty_terminal::event::Event as TerminalEvent;
|
||||||
use alacritty_terminal::event_loop::{EventLoop as PtyEventLoop, Msg, Notifier};
|
use alacritty_terminal::event_loop::{EventLoop as PtyEventLoop, Msg, Notifier};
|
||||||
use alacritty_terminal::grid::{Dimensions, Scroll};
|
use alacritty_terminal::grid::{Dimensions, Scroll};
|
||||||
|
@ -31,7 +30,7 @@ use alacritty_terminal::term::test::TermSize;
|
||||||
use alacritty_terminal::term::{Term, TermMode};
|
use alacritty_terminal::term::{Term, TermMode};
|
||||||
use alacritty_terminal::tty;
|
use alacritty_terminal::tty;
|
||||||
|
|
||||||
use crate::cli::WindowOptions;
|
use crate::cli::{ParsedOptions, WindowOptions};
|
||||||
use crate::clipboard::Clipboard;
|
use crate::clipboard::Clipboard;
|
||||||
use crate::config::UiConfig;
|
use crate::config::UiConfig;
|
||||||
use crate::display::window::Window;
|
use crate::display::window::Window;
|
||||||
|
@ -39,7 +38,8 @@ use crate::display::Display;
|
||||||
use crate::event::{
|
use crate::event::{
|
||||||
ActionContext, Event, EventProxy, InlineSearchState, Mouse, SearchState, TouchPurpose,
|
ActionContext, Event, EventProxy, InlineSearchState, Mouse, SearchState, TouchPurpose,
|
||||||
};
|
};
|
||||||
use crate::logging::LOG_TARGET_WINDOW_CONFIG;
|
#[cfg(unix)]
|
||||||
|
use crate::logging::LOG_TARGET_IPC_CONFIG;
|
||||||
use crate::message_bar::MessageBuffer;
|
use crate::message_bar::MessageBuffer;
|
||||||
use crate::scheduler::Scheduler;
|
use crate::scheduler::Scheduler;
|
||||||
use crate::{input, renderer};
|
use crate::{input, renderer};
|
||||||
|
@ -65,7 +65,7 @@ pub struct WindowContext {
|
||||||
master_fd: RawFd,
|
master_fd: RawFd,
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
shell_pid: u32,
|
shell_pid: u32,
|
||||||
window_config: Vec<toml::Value>,
|
window_config: ParsedOptions,
|
||||||
config: Rc<UiConfig>,
|
config: Rc<UiConfig>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ impl WindowContext {
|
||||||
proxy: EventLoopProxy<Event>,
|
proxy: EventLoopProxy<Event>,
|
||||||
config: Rc<UiConfig>,
|
config: Rc<UiConfig>,
|
||||||
options: WindowOptions,
|
options: WindowOptions,
|
||||||
|
config_overrides: ParsedOptions,
|
||||||
) -> Result<Self, Box<dyn Error>> {
|
) -> Result<Self, Box<dyn Error>> {
|
||||||
// Get any window and take its GL config and display to build a new context.
|
// Get any window and take its GL config and display to build a new context.
|
||||||
let (gl_display, gl_config) = {
|
let (gl_display, gl_config) = {
|
||||||
|
@ -162,7 +163,14 @@ impl WindowContext {
|
||||||
|
|
||||||
let display = Display::new(window, gl_context, &config, tabbed)?;
|
let display = Display::new(window, gl_context, &config, tabbed)?;
|
||||||
|
|
||||||
Self::new(display, config, options, proxy)
|
let mut window_context = Self::new(display, config, options, proxy)?;
|
||||||
|
|
||||||
|
// Set the config overrides at startup.
|
||||||
|
//
|
||||||
|
// These are already applied to `config`, so no update is necessary.
|
||||||
|
window_context.window_config = config_overrides;
|
||||||
|
|
||||||
|
Ok(window_context)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new terminal window context.
|
/// Create a new terminal window context.
|
||||||
|
@ -248,9 +256,9 @@ impl WindowContext {
|
||||||
cursor_blink_timed_out: Default::default(),
|
cursor_blink_timed_out: Default::default(),
|
||||||
inline_search_state: Default::default(),
|
inline_search_state: Default::default(),
|
||||||
message_buffer: Default::default(),
|
message_buffer: Default::default(),
|
||||||
|
window_config: Default::default(),
|
||||||
search_state: Default::default(),
|
search_state: Default::default(),
|
||||||
event_queue: Default::default(),
|
event_queue: Default::default(),
|
||||||
window_config: Default::default(),
|
|
||||||
modifiers: Default::default(),
|
modifiers: Default::default(),
|
||||||
occluded: Default::default(),
|
occluded: Default::default(),
|
||||||
mouse: Default::default(),
|
mouse: Default::default(),
|
||||||
|
@ -264,27 +272,7 @@ impl WindowContext {
|
||||||
let old_config = mem::replace(&mut self.config, new_config);
|
let old_config = mem::replace(&mut self.config, new_config);
|
||||||
|
|
||||||
// Apply ipc config if there are overrides.
|
// Apply ipc config if there are overrides.
|
||||||
if !self.window_config.is_empty() {
|
self.config = self.window_config.override_config_rc(self.config.clone());
|
||||||
let mut config = (*self.config).clone();
|
|
||||||
|
|
||||||
// Apply each option, removing broken ones.
|
|
||||||
let mut i = 0;
|
|
||||||
while i < self.window_config.len() {
|
|
||||||
let option = &self.window_config[i];
|
|
||||||
match config.replace(option.clone()) {
|
|
||||||
Err(err) => {
|
|
||||||
error!(
|
|
||||||
target: LOG_TARGET_WINDOW_CONFIG,
|
|
||||||
"Unable to override option '{}': {}", option, err
|
|
||||||
);
|
|
||||||
self.window_config.swap_remove(i);
|
|
||||||
},
|
|
||||||
Ok(_) => i += 1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self.config = Rc::new(config);
|
|
||||||
}
|
|
||||||
|
|
||||||
self.display.update_config(&self.config);
|
self.display.update_config(&self.config);
|
||||||
self.terminal.lock().set_options(self.config.term_options());
|
self.terminal.lock().set_options(self.config.term_options());
|
||||||
|
@ -357,7 +345,7 @@ impl WindowContext {
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
pub fn reset_window_config(&mut self, config: Rc<UiConfig>) {
|
pub fn reset_window_config(&mut self, config: Rc<UiConfig>) {
|
||||||
// Clear previous window errors.
|
// Clear previous window errors.
|
||||||
self.message_buffer.remove_target(LOG_TARGET_WINDOW_CONFIG);
|
self.message_buffer.remove_target(LOG_TARGET_IPC_CONFIG);
|
||||||
|
|
||||||
self.window_config.clear();
|
self.window_config.clear();
|
||||||
|
|
||||||
|
@ -367,20 +355,11 @@ impl WindowContext {
|
||||||
|
|
||||||
/// Add new window config overrides.
|
/// Add new window config overrides.
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
pub fn add_window_config(&mut self, config: Rc<UiConfig>, options: &[String]) {
|
pub fn add_window_config(&mut self, config: Rc<UiConfig>, options: &ParsedOptions) {
|
||||||
// Clear previous window errors.
|
// Clear previous window errors.
|
||||||
self.message_buffer.remove_target(LOG_TARGET_WINDOW_CONFIG);
|
self.message_buffer.remove_target(LOG_TARGET_IPC_CONFIG);
|
||||||
|
|
||||||
for option in options {
|
self.window_config.extend_from_slice(options);
|
||||||
// Try and parse option as toml.
|
|
||||||
match toml::from_str(option) {
|
|
||||||
Ok(value) => self.window_config.push(value),
|
|
||||||
Err(err) => error!(
|
|
||||||
target: LOG_TARGET_WINDOW_CONFIG,
|
|
||||||
"'{}': Invalid window config value: {:?}", option, err
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reload current config to pull new IPC config.
|
// Reload current config to pull new IPC config.
|
||||||
self.update_config(config);
|
self.update_config(config);
|
||||||
|
|
|
@ -104,8 +104,8 @@ fn ref_test(dir: &Path) {
|
||||||
let grid: Grid<Cell> = json::from_str(&serialized_grid).unwrap();
|
let grid: Grid<Cell> = json::from_str(&serialized_grid).unwrap();
|
||||||
let ref_config: RefConfig = json::from_str(&serialized_cfg).unwrap();
|
let ref_config: RefConfig = json::from_str(&serialized_cfg).unwrap();
|
||||||
|
|
||||||
let mut options = Config::default();
|
let options =
|
||||||
options.scrolling_history = ref_config.history_size as usize;
|
Config { scrolling_history: ref_config.history_size as usize, ..Default::default() };
|
||||||
|
|
||||||
let mut terminal = Term::new(options, &size, Mock);
|
let mut terminal = Term::new(options, &size, Mock);
|
||||||
let mut parser: ansi::Processor = ansi::Processor::new();
|
let mut parser: ansi::Processor = ansi::Processor::new();
|
||||||
|
|
|
@ -18,14 +18,14 @@ _alacritty() {
|
||||||
'--embed=[X11 window ID to embed Alacritty within (decimal or hexadecimal with "0x" prefix)]:EMBED: ' \
|
'--embed=[X11 window ID to embed Alacritty within (decimal or hexadecimal with "0x" prefix)]:EMBED: ' \
|
||||||
'--config-file=[Specify alternative configuration file \[default\: \$XDG_CONFIG_HOME/alacritty/alacritty.toml\]]:CONFIG_FILE:_files' \
|
'--config-file=[Specify alternative configuration file \[default\: \$XDG_CONFIG_HOME/alacritty/alacritty.toml\]]:CONFIG_FILE:_files' \
|
||||||
'--socket=[Path for IPC socket creation]:SOCKET:_files' \
|
'--socket=[Path for IPC socket creation]:SOCKET:_files' \
|
||||||
'*-o+[Override configuration file options \[example\: cursor.style=Beam\]]:OPTION: ' \
|
|
||||||
'*--option=[Override configuration file options \[example\: cursor.style=Beam\]]:OPTION: ' \
|
|
||||||
'--working-directory=[Start the shell in the specified working directory]:WORKING_DIRECTORY:_files' \
|
'--working-directory=[Start the shell in the specified working directory]:WORKING_DIRECTORY:_files' \
|
||||||
'*-e+[Command and args to execute (must be last argument)]:COMMAND: ' \
|
'*-e+[Command and args to execute (must be last argument)]:COMMAND: ' \
|
||||||
'*--command=[Command and args to execute (must be last argument)]:COMMAND: ' \
|
'*--command=[Command and args to execute (must be last argument)]:COMMAND: ' \
|
||||||
'-T+[Defines the window title \[default\: Alacritty\]]:TITLE: ' \
|
'-T+[Defines the window title \[default\: Alacritty\]]:TITLE: ' \
|
||||||
'--title=[Defines the window title \[default\: Alacritty\]]:TITLE: ' \
|
'--title=[Defines the window title \[default\: Alacritty\]]:TITLE: ' \
|
||||||
'--class=[Defines window class/app_id on X11/Wayland \[default\: Alacritty\]]:general> | <general>,<instance: ' \
|
'--class=[Defines window class/app_id on X11/Wayland \[default\: Alacritty\]]:general> | <general>,<instance: ' \
|
||||||
|
'*-o+[Override configuration file options \[example\: '\''cursor.style="Beam"'\''\]]:OPTION: ' \
|
||||||
|
'*--option=[Override configuration file options \[example\: '\''cursor.style="Beam"'\''\]]:OPTION: ' \
|
||||||
'--print-events[Print all events to stdout]' \
|
'--print-events[Print all events to stdout]' \
|
||||||
'--ref-test[Generates ref test]' \
|
'--ref-test[Generates ref test]' \
|
||||||
'(-v)*-q[Reduces the level of verbosity (the min level is -qq)]' \
|
'(-v)*-q[Reduces the level of verbosity (the min level is -qq)]' \
|
||||||
|
@ -68,6 +68,8 @@ _arguments "${_arguments_options[@]}" \
|
||||||
'-T+[Defines the window title \[default\: Alacritty\]]:TITLE: ' \
|
'-T+[Defines the window title \[default\: Alacritty\]]:TITLE: ' \
|
||||||
'--title=[Defines the window title \[default\: Alacritty\]]:TITLE: ' \
|
'--title=[Defines the window title \[default\: Alacritty\]]:TITLE: ' \
|
||||||
'--class=[Defines window class/app_id on X11/Wayland \[default\: Alacritty\]]:general> | <general>,<instance: ' \
|
'--class=[Defines window class/app_id on X11/Wayland \[default\: Alacritty\]]:general> | <general>,<instance: ' \
|
||||||
|
'*-o+[Override configuration file options \[example\: '\''cursor.style="Beam"'\''\]]:OPTION: ' \
|
||||||
|
'*--option=[Override configuration file options \[example\: '\''cursor.style="Beam"'\''\]]:OPTION: ' \
|
||||||
'--hold[Remain open after child process exit]' \
|
'--hold[Remain open after child process exit]' \
|
||||||
'-h[Print help]' \
|
'-h[Print help]' \
|
||||||
'--help[Print help]' \
|
'--help[Print help]' \
|
||||||
|
@ -81,7 +83,7 @@ _arguments "${_arguments_options[@]}" \
|
||||||
'()--reset[Clear all runtime configuration changes]' \
|
'()--reset[Clear all runtime configuration changes]' \
|
||||||
'-h[Print help (see more with '\''--help'\'')]' \
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
'--help[Print help (see more with '\''--help'\'')]' \
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
'*::options -- Configuration file options \[example\: cursor.style=Beam\]:' \
|
'*::options -- Configuration file options \[example\: '\''cursor.style="Beam"'\''\]:' \
|
||||||
&& ret=0
|
&& ret=0
|
||||||
;;
|
;;
|
||||||
(help)
|
(help)
|
||||||
|
|
|
@ -61,7 +61,7 @@ _alacritty() {
|
||||||
|
|
||||||
case "${cmd}" in
|
case "${cmd}" in
|
||||||
alacritty)
|
alacritty)
|
||||||
opts="-q -v -o -e -T -h -V --print-events --ref-test --embed --config-file --socket --option --working-directory --hold --command --title --class --help --version msg migrate help"
|
opts="-q -v -e -T -o -h -V --print-events --ref-test --embed --config-file --socket --working-directory --hold --command --title --class --option --help --version msg migrate help"
|
||||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
|
||||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||||
return 0
|
return 0
|
||||||
|
@ -79,14 +79,6 @@ _alacritty() {
|
||||||
COMPREPLY=($(compgen -f "${cur}"))
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
--option)
|
|
||||||
COMPREPLY=($(compgen -f "${cur}"))
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
-o)
|
|
||||||
COMPREPLY=($(compgen -f "${cur}"))
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
--working-directory)
|
--working-directory)
|
||||||
COMPREPLY=($(compgen -f "${cur}"))
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
return 0
|
return 0
|
||||||
|
@ -111,6 +103,14 @@ _alacritty() {
|
||||||
COMPREPLY=($(compgen -f "${cur}"))
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
--option)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
-o)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
;;
|
;;
|
||||||
|
@ -269,7 +269,7 @@ _alacritty() {
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
alacritty__msg__create__window)
|
alacritty__msg__create__window)
|
||||||
opts="-e -T -h --working-directory --hold --command --title --class --help"
|
opts="-e -T -o -h --working-directory --hold --command --title --class --option --help"
|
||||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||||
return 0
|
return 0
|
||||||
|
@ -299,6 +299,14 @@ _alacritty() {
|
||||||
COMPREPLY=($(compgen -f "${cur}"))
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
--option)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
-o)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
complete -c alacritty -n "__fish_use_subcommand" -l embed -d 'X11 window ID to embed Alacritty within (decimal or hexadecimal with "0x" prefix)' -r
|
complete -c alacritty -n "__fish_use_subcommand" -l embed -d 'X11 window ID to embed Alacritty within (decimal or hexadecimal with "0x" prefix)' -r
|
||||||
complete -c alacritty -n "__fish_use_subcommand" -l config-file -d 'Specify alternative configuration file [default: $XDG_CONFIG_HOME/alacritty/alacritty.toml]' -r -F
|
complete -c alacritty -n "__fish_use_subcommand" -l config-file -d 'Specify alternative configuration file [default: $XDG_CONFIG_HOME/alacritty/alacritty.toml]' -r -F
|
||||||
complete -c alacritty -n "__fish_use_subcommand" -l socket -d 'Path for IPC socket creation' -r -F
|
complete -c alacritty -n "__fish_use_subcommand" -l socket -d 'Path for IPC socket creation' -r -F
|
||||||
complete -c alacritty -n "__fish_use_subcommand" -s o -l option -d 'Override configuration file options [example: cursor.style=Beam]' -r
|
|
||||||
complete -c alacritty -n "__fish_use_subcommand" -l working-directory -d 'Start the shell in the specified working directory' -r -F
|
complete -c alacritty -n "__fish_use_subcommand" -l working-directory -d 'Start the shell in the specified working directory' -r -F
|
||||||
complete -c alacritty -n "__fish_use_subcommand" -s e -l command -d 'Command and args to execute (must be last argument)' -r
|
complete -c alacritty -n "__fish_use_subcommand" -s e -l command -d 'Command and args to execute (must be last argument)' -r
|
||||||
complete -c alacritty -n "__fish_use_subcommand" -s T -l title -d 'Defines the window title [default: Alacritty]' -r
|
complete -c alacritty -n "__fish_use_subcommand" -s T -l title -d 'Defines the window title [default: Alacritty]' -r
|
||||||
complete -c alacritty -n "__fish_use_subcommand" -l class -d 'Defines window class/app_id on X11/Wayland [default: Alacritty]' -r
|
complete -c alacritty -n "__fish_use_subcommand" -l class -d 'Defines window class/app_id on X11/Wayland [default: Alacritty]' -r
|
||||||
|
complete -c alacritty -n "__fish_use_subcommand" -s o -l option -d 'Override configuration file options [example: \'cursor.style="Beam"\']' -r
|
||||||
complete -c alacritty -n "__fish_use_subcommand" -l print-events -d 'Print all events to stdout'
|
complete -c alacritty -n "__fish_use_subcommand" -l print-events -d 'Print all events to stdout'
|
||||||
complete -c alacritty -n "__fish_use_subcommand" -l ref-test -d 'Generates ref test'
|
complete -c alacritty -n "__fish_use_subcommand" -l ref-test -d 'Generates ref test'
|
||||||
complete -c alacritty -n "__fish_use_subcommand" -s q -d 'Reduces the level of verbosity (the min level is -qq)'
|
complete -c alacritty -n "__fish_use_subcommand" -s q -d 'Reduces the level of verbosity (the min level is -qq)'
|
||||||
|
@ -25,6 +25,7 @@ complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subco
|
||||||
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -s e -l command -d 'Command and args to execute (must be last argument)' -r
|
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -s e -l command -d 'Command and args to execute (must be last argument)' -r
|
||||||
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -s T -l title -d 'Defines the window title [default: Alacritty]' -r
|
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -s T -l title -d 'Defines the window title [default: Alacritty]' -r
|
||||||
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -l class -d 'Defines window class/app_id on X11/Wayland [default: Alacritty]' -r
|
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -l class -d 'Defines window class/app_id on X11/Wayland [default: Alacritty]' -r
|
||||||
|
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -s o -l option -d 'Override configuration file options [example: \'cursor.style="Beam"\']' -r
|
||||||
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -l hold -d 'Remain open after child process exit'
|
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -l hold -d 'Remain open after child process exit'
|
||||||
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -s h -l help -d 'Print help'
|
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from create-window" -s h -l help -d 'Print help'
|
||||||
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from config" -s w -l window-id -d 'Window ID for the new config' -r
|
complete -c alacritty -n "__fish_seen_subcommand_from msg; and __fish_seen_subcommand_from config" -s w -l window-id -d 'Window ID for the new config' -r
|
||||||
|
|
|
@ -19,14 +19,24 @@ making it possible to control Alacritty without directly accessing it.
|
||||||
*create-window*
|
*create-window*
|
||||||
Create a new window in the same Alacritty process
|
Create a new window in the same Alacritty process
|
||||||
|
|
||||||
*OPTIONS*
|
*FLAGS*
|
||||||
*--hold*
|
*--hold*
|
||||||
Remain open after child process exits
|
Remain open after child process exits
|
||||||
|
|
||||||
|
*OPTIONS*
|
||||||
*--working-directory* <working-directory>
|
*--working-directory* <working-directory>
|
||||||
Start the shell in the specified working directory
|
Start the shell in the specified working directory
|
||||||
|
|
||||||
*command* <command>...
|
*-T, --title* <TITLE>
|
||||||
|
Defines the window title [default: Alacritty]
|
||||||
|
|
||||||
|
*--class* <GENERAL> | <GENERAL>,<INSTANCE>
|
||||||
|
Defines window class/app_id on X11/Wayland [default: Alacritty]
|
||||||
|
|
||||||
|
*-o, --option* <OPTION>...
|
||||||
|
Override configuration file options [example: 'cursor.style="Beam"']
|
||||||
|
|
||||||
|
*-e, --command* <COMMAND>...
|
||||||
Command and args to execute (must be last argument)
|
Command and args to execute (must be last argument)
|
||||||
|
|
||||||
*config*
|
*config*
|
||||||
|
@ -34,7 +44,11 @@ making it possible to control Alacritty without directly accessing it.
|
||||||
|
|
||||||
*ARGS*
|
*ARGS*
|
||||||
*<CONFIG_OPTIONS>...*
|
*<CONFIG_OPTIONS>...*
|
||||||
Configuration file options [example: cursor.style=Beam]
|
Configuration file options [example: 'cursor.style="Beam"']
|
||||||
|
|
||||||
|
*FLAGS*
|
||||||
|
*-r, --reset*
|
||||||
|
Clear all runtime configuration changes
|
||||||
|
|
||||||
*OPTIONS*
|
*OPTIONS*
|
||||||
*-w, --window-id* <WINDOW_ID>
|
*-w, --window-id* <WINDOW_ID>
|
||||||
|
|
|
@ -61,7 +61,7 @@ set of features with high performance.
|
||||||
X11 window ID to embed Alacritty within (decimal or hexadecimal with _0x_ prefix)
|
X11 window ID to embed Alacritty within (decimal or hexadecimal with _0x_ prefix)
|
||||||
|
|
||||||
*-o, --option* <option>...
|
*-o, --option* <option>...
|
||||||
Override configuration file options [example: cursor.style=Beam]
|
Override configuration file options [example: 'cursor.style="Beam"']
|
||||||
|
|
||||||
*--socket* <socket>
|
*--socket* <socket>
|
||||||
Path for IPC socket creation
|
Path for IPC socket creation
|
||||||
|
|
Loading…
Reference in a new issue