mirror of
https://github.com/alacritty/alacritty.git
synced 2025-11-06 22:44:18 -05:00
Add global config fallback
Co-authored-by: Christian Duerr <contact@christianduerr.com>
This commit is contained in:
parent
fad5360bf0
commit
f440cd4d6d
5 changed files with 8 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ Notable changes to the `alacritty_terminal` crate are documented in its
|
|||
- IPC config retrieval using `alacritty msg get-config`
|
||||
- Multi-sequence touch zoom sequences
|
||||
- Vi action `Y` keybind, yank to the end of line
|
||||
- Add `/etc/alacritty/alacritty.toml` fallback for system wide configuration
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ following locations:
|
|||
2. `$XDG_CONFIG_HOME/alacritty.toml`
|
||||
3. `$HOME/.config/alacritty/alacritty.toml`
|
||||
4. `$HOME/.alacritty.toml`
|
||||
5. `/etc/alacritty/alacritty.toml`
|
||||
|
||||
On Windows, the config file will be looked for in:
|
||||
|
||||
|
|
|
|||
|
|
@ -368,6 +368,7 @@ fn prune_yaml_nulls(value: &mut serde_yaml::Value, warn_pruned: bool) {
|
|||
/// 2. $XDG_CONFIG_HOME/alacritty.toml
|
||||
/// 3. $HOME/.config/alacritty/alacritty.toml
|
||||
/// 4. $HOME/.alacritty.toml
|
||||
/// 5. /etc/alacritty/alacritty.toml
|
||||
#[cfg(not(windows))]
|
||||
pub fn installed_config(suffix: &str) -> Option<PathBuf> {
|
||||
let file_name = format!("alacritty.{suffix}");
|
||||
|
|
@ -390,7 +391,9 @@ pub fn installed_config(suffix: &str) -> Option<PathBuf> {
|
|||
return Some(fallback);
|
||||
}
|
||||
}
|
||||
None
|
||||
|
||||
let fallback = PathBuf::from("/etc/alacritty").join(&file_name);
|
||||
fallback.exists().then_some(fallback)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ set of features with high performance.
|
|||
. _$XDG_CONFIG_HOME/alacritty.toml_
|
||||
. _$HOME/.config/alacritty/alacritty.toml_
|
||||
. _$HOME/.alacritty.toml_
|
||||
. _/etc/alacritty/alacritty.toml_
|
||||
|
||||
On Windows, the config file will be looked for in:
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ following locations on UNIX systems:
|
|||
. _$XDG_CONFIG_HOME/alacritty.toml_
|
||||
. _$HOME/.config/alacritty/alacritty.toml_
|
||||
. _$HOME/.alacritty.toml_
|
||||
. _/etc/alacritty/alacritty.toml_
|
||||
|
||||
On Windows, the config file will be looked for in:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue