2021-03-15 10:40:52 +00:00
|
|
|
use crate::config::ModuleConfig;
|
2019-10-19 01:51:38 +00:00
|
|
|
|
2021-03-31 15:31:55 +00:00
|
|
|
use serde::Serialize;
|
2019-10-19 01:51:38 +00:00
|
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
|
2021-03-31 15:31:55 +00:00
|
|
|
#[derive(Clone, ModuleConfig, Serialize)]
|
2020-07-07 22:45:32 +00:00
|
|
|
pub struct UsernameConfig<'a> {
|
|
|
|
pub format: &'a str,
|
|
|
|
pub style_root: &'a str,
|
|
|
|
pub style_user: &'a str,
|
2019-10-19 01:51:38 +00:00
|
|
|
pub show_always: bool,
|
|
|
|
pub disabled: bool,
|
|
|
|
}
|
|
|
|
|
2021-03-15 10:40:52 +00:00
|
|
|
impl<'a> Default for UsernameConfig<'a> {
|
|
|
|
fn default() -> Self {
|
2019-10-19 01:51:38 +00:00
|
|
|
UsernameConfig {
|
2020-09-08 16:09:21 +00:00
|
|
|
format: "[$user]($style) in ",
|
2020-07-07 22:45:32 +00:00
|
|
|
style_root: "red bold",
|
|
|
|
style_user: "yellow bold",
|
2019-10-19 01:51:38 +00:00
|
|
|
show_always: false,
|
|
|
|
disabled: false,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|