diff options
author | Liu Wei <liuw@liuw.name> | 2017-08-29 17:32:08 +0100 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-08-29 09:32:08 -0700 |
commit | b38d825921ac20d9f6543c23ed3bc0a44a0bdf2d (patch) | |
tree | 226a3e48f82392933ee218efc336b08aa71c43b8 /src/config.rs | |
parent | 6495ab34d2043440f138242cf58d39e687e6c02e (diff) | |
download | alacritty-b38d825921ac20d9f6543c23ed3bc0a44a0bdf2d.tar.gz alacritty-b38d825921ac20d9f6543c23ed3bc0a44a0bdf2d.zip |
Implement options to not start the config_monitor thread (#689)
Provide a command line option as well as a configuration file option.
The command line option takes precedence.
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 450ab09e..b88723f5 100644 --- a/src/config.rs +++ b/src/config.rs @@ -277,6 +277,10 @@ pub struct Config { /// Hide cursor when typing #[serde(default)] hide_cursor_when_typing: bool, + + /// Live config reload + #[serde(default)] + live_config_reload: bool, } fn default_padding() -> Delta { @@ -329,6 +333,7 @@ impl Default for Config { visual_bell: Default::default(), env: Default::default(), hide_cursor_when_typing: Default::default(), + live_config_reload: Default::default(), padding: default_padding(), } } @@ -1177,6 +1182,12 @@ impl Config { self.hide_cursor_when_typing } + /// Live config reload + #[inline] + pub fn live_config_reload(&self) -> bool { + self.live_config_reload + } + pub fn load_from<P: Into<PathBuf>>(path: P) -> Result<Config> { let path = path.into(); let raw = Config::read_file(path.as_path())?; |