1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-09-26 20:29:03 +00:00
starship/src/configs/username.rs

24 lines
569 B
Rust
Raw Normal View History

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,
}
}
}