diff options
author | Kam Kudla <kam@kam.codes> | 2021-04-08 14:01:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 21:01:47 +0000 |
commit | 40bcdb11335cc49d4d42694b953be746cb383cb9 (patch) | |
tree | 7f82911227a6e6e6269e1ab3e632e2ac86a14032 /alacritty | |
parent | 78953e4f7e89d0e90b8e1981bf76b03df16eded3 (diff) | |
download | r-alacritty-40bcdb11335cc49d4d42694b953be746cb383cb9.tar.gz r-alacritty-40bcdb11335cc49d4d42694b953be746cb383cb9.tar.bz2 r-alacritty-40bcdb11335cc49d4d42694b953be746cb383cb9.zip |
Add hide other windows binding on macOS
Fixes #3697.
Diffstat (limited to 'alacritty')
-rw-r--r-- | alacritty/src/config/bindings.rs | 5 | ||||
-rw-r--r-- | alacritty/src/input.rs | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/alacritty/src/config/bindings.rs b/alacritty/src/config/bindings.rs index 732875db..91cc09d6 100644 --- a/alacritty/src/config/bindings.rs +++ b/alacritty/src/config/bindings.rs @@ -161,6 +161,10 @@ pub enum Action { /// Hide the Alacritty window. Hide, + /// Hide all windows other than Alacritty on macOS. + #[cfg(target_os = "macos")] + HideOtherApplications, + /// Minimize the Alacritty window. Minimize, @@ -685,6 +689,7 @@ pub fn platform_key_bindings() -> Vec<KeyBinding> { C, ModifiersState::LOGO; Action::Copy; C, ModifiersState::LOGO, +BindingMode::VI, ~BindingMode::SEARCH; Action::ClearSelection; H, ModifiersState::LOGO; Action::Hide; + H, ModifiersState::LOGO | ModifiersState::ALT; Action::HideOtherApplications; M, ModifiersState::LOGO; Action::Minimize; Q, ModifiersState::LOGO; Action::Quit; W, ModifiersState::LOGO; Action::Quit; diff --git a/alacritty/src/input.rs b/alacritty/src/input.rs index a66511cf..38a346d9 100644 --- a/alacritty/src/input.rs +++ b/alacritty/src/input.rs @@ -255,6 +255,8 @@ impl<T: EventListener> Execute<T> for Action { Action::ToggleSimpleFullscreen => ctx.window_mut().toggle_simple_fullscreen(), #[cfg(target_os = "macos")] Action::Hide => ctx.event_loop().hide_application(), + #[cfg(target_os = "macos")] + Action::HideOtherApplications => ctx.event_loop().hide_other_applications(), #[cfg(not(target_os = "macos"))] Action::Hide => ctx.window().set_visible(false), Action::Minimize => ctx.window().set_minimized(true), |