change: Adds advanced kill option to default config text (#462)

Adds advanced_kill to the default config gen.
This commit is contained in:
Clement Tsang 2021-05-06 22:34:22 -04:00 committed by GitHub
parent df13859ef2
commit fbfa708d1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -430,7 +430,8 @@ pub const DEFAULT_BATTERY_LAYOUT: &str = r##"
// Config and flags
pub const DEFAULT_CONFIG_FILE_PATH: &str = "bottom/bottom.toml";
pub const OLD_CONFIG_TEXT: &str = r##"# This is a default config file for bottom. All of the settings are commented
// TODO: Eventually deprecate this.
pub const CONFIG_TEXT: &str = r##"# This is a default config file for bottom. All of the settings are commented
# out by default; if you wish to change them uncomment and modify as you see
# fit.
@ -495,6 +496,8 @@ pub const OLD_CONFIG_TEXT: &str = r##"# This is a default config file for bottom
#network_use_bytes = false
# Displays the network widget with a log scale.
#network_use_log = false
# Show a more advanced process kill screen
#advanced_kill = false
# These are all the components that support custom theming. Note that colour support
# will depend on terminal support.

View file

@ -228,7 +228,7 @@ pub fn create_or_get_config(config_path: &Option<PathBuf>) -> error::Result<Conf
fs::create_dir_all(parent_path)?;
}
// fs::File::create(path)?.write_all(CONFIG_TOP_HEAD.as_bytes())?;
fs::File::create(path)?.write_all(OLD_CONFIG_TEXT.as_bytes())?;
fs::File::create(path)?.write_all(CONFIG_TEXT.as_bytes())?;
Ok(Config::default())
}
} else {