diff options
Diffstat (limited to 'src/config/clean/theme/config.rs')
-rw-r--r-- | src/config/clean/theme/config.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config/clean/theme/config.rs b/src/config/clean/theme/config.rs index 5be88fc..7fd25cd 100644 --- a/src/config/clean/theme/config.rs +++ b/src/config/clean/theme/config.rs @@ -1,3 +1,4 @@ +use lscolors::LsColors; use std::collections::HashMap; use crate::config::raw::theme::AppThemeRaw; @@ -20,6 +21,7 @@ pub struct AppTheme { pub link_invalid: AppStyle, pub socket: AppStyle, pub ext: HashMap<String, AppStyle>, + pub lscolors: Option<LsColors>, } impl AppTheme { @@ -64,6 +66,13 @@ impl From<AppThemeRaw> for AppTheme { (k.clone(), style) }) .collect(); + let lscolors = if raw.lscolors_enabled { + let lscolors = LsColors::from_env(); + let default = Some(LsColors::default()); + lscolors.or(default) + } else { + None + }; Self { selection, @@ -76,6 +85,7 @@ impl From<AppThemeRaw> for AppTheme { socket, ext, tabs: TabTheme::from(tabs), + lscolors, } } } |