aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2024-01-23 23:00:05 +0100
committerGitHub <noreply@github.com>2024-01-24 02:00:05 +0400
commit79b686df419d90e5557d1b7000f51f012986c141 (patch)
tree81013bc5251cb8a1d512612bb6831e930636ef0d
parent4c0c368e7ac8233b3fca848a25b42f0875a2494b (diff)
downloadalacritty-79b686df419d90e5557d1b7000f51f012986c141.tar.gz
alacritty-79b686df419d90e5557d1b7000f51f012986c141.zip
Allow specifying all config keys on all platforms
Closes #7592.
-rw-r--r--CHANGELOG.md4
-rw-r--r--alacritty/src/config/bindings.rs16
-rw-r--r--alacritty/src/config/window.rs6
-rw-r--r--alacritty/src/input/mod.rs2
4 files changed, 5 insertions, 23 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12df09f9..79893703 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- CLI env variables clearing configuration file variables
- Vi inline search/semantic selection expanding across newlines
+### Changed
+
+- No unused-key warnings will be emitted for OS-specific config keys
+
## 0.13.1
### Added
diff --git a/alacritty/src/config/bindings.rs b/alacritty/src/config/bindings.rs
index 9e989419..794cb04d 100644
--- a/alacritty/src/config/bindings.rs
+++ b/alacritty/src/config/bindings.rs
@@ -120,7 +120,6 @@ pub enum Action {
/// Store current selection into clipboard.
Copy,
- #[cfg(not(any(target_os = "macos", windows)))]
/// Store current selection into selection buffer.
CopySelection,
@@ -167,7 +166,6 @@ pub enum Action {
Hide,
/// Hide all windows other than Alacritty on macOS.
- #[cfg(target_os = "macos")]
HideOtherApplications,
/// Minimize the Alacritty window.
@@ -182,58 +180,45 @@ pub enum Action {
/// Spawn a new instance of Alacritty.
SpawnNewInstance,
- #[cfg(target_os = "macos")]
/// Select next tab.
SelectNextTab,
- #[cfg(target_os = "macos")]
/// Select previous tab.
SelectPreviousTab,
- #[cfg(target_os = "macos")]
/// Select the first tab.
SelectTab1,
- #[cfg(target_os = "macos")]
/// Select the second tab.
SelectTab2,
- #[cfg(target_os = "macos")]
/// Select the third tab.
SelectTab3,
- #[cfg(target_os = "macos")]
/// Select the fourth tab.
SelectTab4,
- #[cfg(target_os = "macos")]
/// Select the fifth tab.
SelectTab5,
- #[cfg(target_os = "macos")]
/// Select the sixth tab.
SelectTab6,
- #[cfg(target_os = "macos")]
/// Select the seventh tab.
SelectTab7,
- #[cfg(target_os = "macos")]
/// Select the eighth tab.
SelectTab8,
- #[cfg(target_os = "macos")]
/// Select the ninth tab.
SelectTab9,
- #[cfg(target_os = "macos")]
/// Select the last tab.
SelectLastTab,
/// Create a new Alacritty window.
CreateNewWindow,
- #[cfg(target_os = "macos")]
/// Create new window in a tab.
CreateNewTab,
@@ -244,7 +229,6 @@ pub enum Action {
ToggleMaximized,
/// Toggle simple fullscreen on macOS.
- #[cfg(target_os = "macos")]
ToggleSimpleFullscreen,
/// Clear active selection.
diff --git a/alacritty/src/config/window.rs b/alacritty/src/config/window.rs
index ed84622e..380f7a6f 100644
--- a/alacritty/src/config/window.rs
+++ b/alacritty/src/config/window.rs
@@ -48,7 +48,6 @@ pub struct WindowConfig {
pub blur: bool,
/// Controls which `Option` key should be treated as `Alt`.
- #[cfg(target_os = "macos")]
option_as_alt: OptionAsAlt,
/// Resize increments.
@@ -80,7 +79,6 @@ impl Default for WindowConfig {
dynamic_padding: Default::default(),
resize_increments: Default::default(),
decorations_theme_variant: Default::default(),
- #[cfg(target_os = "macos")]
option_as_alt: Default::default(),
}
}
@@ -176,7 +174,6 @@ pub enum StartupMode {
Windowed,
Maximized,
Fullscreen,
- #[cfg(target_os = "macos")]
SimpleFullscreen,
}
@@ -184,9 +181,7 @@ pub enum StartupMode {
pub enum Decorations {
#[default]
Full,
- #[cfg(target_os = "macos")]
Transparent,
- #[cfg(target_os = "macos")]
Buttonless,
None,
}
@@ -280,7 +275,6 @@ impl<'de> Deserialize<'de> for Class {
}
}
-#[cfg(target_os = "macos")]
#[derive(ConfigDeserialize, Default, Debug, Clone, Copy, PartialEq, Eq)]
pub enum OptionAsAlt {
/// The left `Option` key is treated as `Alt`.
diff --git a/alacritty/src/input/mod.rs b/alacritty/src/input/mod.rs
index 5e8a4bfd..5bc95bdf 100644
--- a/alacritty/src/input/mod.rs
+++ b/alacritty/src/input/mod.rs
@@ -410,7 +410,7 @@ impl<T: EventListener> Execute<T> for Action {
Action::SelectTab9 => ctx.window().select_tab_at_index(8),
#[cfg(target_os = "macos")]
Action::SelectLastTab => ctx.window().select_last_tab(),
- Action::ReceiveChar | Action::None => (),
+ _ => (),
}
}
}