mirror of https://git.sr.ht/~nixgoat/vento
common: Add Item hierarchy in config
To avoid confusion, this moves the config "display_dir" to a new section named "Item". For now this is the only config this new section will have.
This commit is contained in:
parent
1506dc811c
commit
e9aa1b2ee1
|
@ -48,6 +48,12 @@ pub struct DeserializedConfig {
|
|||
pub display_colors: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[allow(unused)]
|
||||
struct Item {
|
||||
display_dir: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[allow(unused)]
|
||||
struct History {
|
||||
|
@ -117,7 +123,7 @@ pub fn parse_config() -> Result<DeserializedConfig> {
|
|||
Err(_) => String::new(),
|
||||
};
|
||||
|
||||
display_dir = settings.get_bool("display_dir").unwrap_or(true);
|
||||
display_dir = settings.get_bool("item.display_dir").unwrap_or(true);
|
||||
history_display_dir = settings.get_bool("history.display_dir").unwrap_or(true);
|
||||
display_emoji = settings.get_bool("display_emoji").unwrap_or(true);
|
||||
display_colors = settings.get_bool("display_colors").unwrap_or(true);
|
||||
|
|
Loading…
Reference in New Issue