diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-12-15 11:48:20 -0500 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2020-12-15 11:48:20 -0500 |
commit | 12eb9eed1aeb4f3045b78dd19ae20d07bfea7de9 (patch) | |
tree | a2204b1fbef5f1ed93312f94196ded9a5a8c6ec5 /src/config | |
parent | f5902708a6e597064482edfc076248a67882b7c5 (diff) |
add option to not collapse preview
- add methods to access config_t
- add back home dir path shortening option
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/config.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/config/config.rs b/src/config/config.rs index 8b63c60..c4a3fcc 100644 --- a/src/config/config.rs +++ b/src/config/config.rs @@ -65,6 +65,8 @@ pub struct JoshutoRawConfig { tilde_in_titlebar: bool, #[serde(default = "default_true")] show_preview: bool, + #[serde(default = "default_true")] + collapse_preview: bool, #[serde(default)] xdg_open: bool, #[serde(default = "default_max_preview_size")] @@ -95,6 +97,7 @@ impl Flattenable<JoshutoConfig> for JoshutoRawConfig { scroll_offset: self.scroll_offset, tilde_in_titlebar: self.tilde_in_titlebar, show_preview: self.show_preview, + collapse_preview: self.collapse_preview, xdg_open: self.xdg_open, max_preview_size: self.max_preview_size, column_ratio, @@ -108,6 +111,7 @@ pub struct JoshutoConfig { pub scroll_offset: usize, pub tilde_in_titlebar: bool, pub show_preview: bool, + pub collapse_preview: bool, pub xdg_open: bool, pub max_preview_size: u64, pub sort_option: sort::SortOption, @@ -127,8 +131,9 @@ impl std::default::Default for JoshutoConfig { Self { scroll_offset: default_scroll_offset(), - tilde_in_titlebar: default_true(), - show_preview: default_true(), + tilde_in_titlebar: true, + show_preview: true, + collapse_preview: true, xdg_open: false, max_preview_size: default_max_preview_size(), sort_option, |