wezterm: add automatically_reload_config=false option

closes: https://github.com/wez/wezterm/issues/287
This commit is contained in:
Wez Furlong committed 2020-09-30 08:47:41 -07:00
1 parent d880c2b86f
commit 3f466b1fc3
2 files changed
+13 -2

No files matched your search

+4
View File
@@ -30,6 +30,10 @@ brief notes about them may accumulate here.
* We now bundle JetBrains Mono and use it as the default font,
and add it as a default fallback font. Similarly, we also
bundle Noto Color Emoji as a default fallback for emoji.
* Added `automatically_reload_config=false` option to disable
automatic config reloading. When set to false, you will need
to manually trigger a config reload (default: `SUPER+R` or
`CTRL+SHIFT+R`)
### 20200909-002054-4c9af461
+9 -2
View File
@@ -160,8 +160,10 @@ impl ConfigInner {
self.error.take();
self.generation += 1;
log::debug!("Reloaded configuration! generation={}", self.generation);
if let Some(path) = path {
self.watch_path(path);
if self.config.automatically_reload_config {
if let Some(path) = path {
self.watch_path(path);
}
}
}
Err(err) => {
@@ -539,6 +541,11 @@ pub struct Config {
#[serde(default)]
pub launch_menu: Vec<SpawnCommand>,
/// When true, watch the config file and reload it automatically
/// when it is detected as changing.
#[serde(default = "default_true")]
pub automatically_reload_config: bool,
#[serde(default = "default_true")]
pub add_wsl_distributions_to_launch_menu: bool,