diff options
Diffstat (limited to 'alacritty/src/config')
-rw-r--r-- | alacritty/src/config/bindings.rs | 5 | ||||
-rw-r--r-- | alacritty/src/config/monitor.rs | 10 | ||||
-rw-r--r-- | alacritty/src/config/ui_config.rs | 8 |
3 files changed, 17 insertions, 6 deletions
diff --git a/alacritty/src/config/bindings.rs b/alacritty/src/config/bindings.rs index 8289fc20..533573c8 100644 --- a/alacritty/src/config/bindings.rs +++ b/alacritty/src/config/bindings.rs @@ -180,6 +180,9 @@ pub enum Action { /// Spawn a new instance of Alacritty. SpawnNewInstance, + /// Create a new Alacritty window. + CreateNewWindow, + /// Toggle fullscreen. ToggleFullscreen, @@ -1099,7 +1102,7 @@ impl<'a> Deserialize<'a> for RawBinding { let mode = mode.unwrap_or_else(BindingMode::empty); let not_mode = not_mode.unwrap_or_else(BindingMode::empty); - let mods = mods.unwrap_or_else(ModifiersState::default); + let mods = mods.unwrap_or_default(); let action = match (action, chars, command) { (Some(action @ Action::ViMotion(_)), None, None) diff --git a/alacritty/src/config/monitor.rs b/alacritty/src/config/monitor.rs index e3dd0556..9d37172e 100644 --- a/alacritty/src/config/monitor.rs +++ b/alacritty/src/config/monitor.rs @@ -2,19 +2,20 @@ use std::path::PathBuf; use std::sync::mpsc; use std::time::Duration; +use glutin::event_loop::EventLoopProxy; use log::{debug, error}; use notify::{watcher, DebouncedEvent, RecursiveMode, Watcher}; use alacritty_terminal::thread; -use crate::event::{Event, EventProxy}; +use crate::event::{Event, EventType}; #[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] const DEBOUNCE_DELAY: Duration = Duration::from_millis(10); #[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows")))] const DEBOUNCE_DELAY: Duration = Duration::from_millis(1000); -pub fn watch(mut paths: Vec<PathBuf>, event_proxy: EventProxy) { +pub fn watch(mut paths: Vec<PathBuf>, event_proxy: EventLoopProxy<Event>) { // Don't monitor config if there is no path to watch. if paths.is_empty() { return; @@ -77,9 +78,10 @@ pub fn watch(mut paths: Vec<PathBuf>, event_proxy: EventProxy) { if paths.contains(&path) => { // Always reload the primary configuration file. - event_proxy.send_event(Event::ConfigReload(paths[0].clone())); + let event = Event::new(EventType::ConfigReload(paths[0].clone()), None); + let _ = event_proxy.send_event(event); } - _ => {}, + _ => (), } } }); diff --git a/alacritty/src/config/ui_config.rs b/alacritty/src/config/ui_config.rs index 3ce02161..3ba59ea8 100644 --- a/alacritty/src/config/ui_config.rs +++ b/alacritty/src/config/ui_config.rs @@ -62,6 +62,10 @@ pub struct UiConfig { /// Regex hints for interacting with terminal content. pub hints: Hints, + /// Offer IPC through a unix socket. + #[cfg(unix)] + pub ipc_socket: bool, + /// Keybindings. key_bindings: KeyBindings, @@ -76,8 +80,10 @@ pub struct UiConfig { impl Default for UiConfig { fn default() -> Self { Self { - alt_send_esc: true, live_config_reload: true, + alt_send_esc: true, + #[cfg(unix)] + ipc_socket: true, font: Default::default(), window: Default::default(), mouse: Default::default(), |