1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use crate::config::{ModuleConfig, RootModuleConfig};

use ansi_term::{Color, Style};
use starship_module_config_derive::ModuleConfig;

#[derive(Clone, ModuleConfig)]
pub struct UsernameConfig {
    pub style_root: Style,
    pub style_user: Style,
    pub show_always: bool,
    pub disabled: bool,
}

impl<'a> RootModuleConfig<'a> for UsernameConfig {
    fn new() -> Self {
        UsernameConfig {
            style_root: Color::Red.bold(),
            style_user: Color::Yellow.bold(),
            show_always: false,
            disabled: false,
        }
    }
}