2019-10-19 01:51:38 +00:00
|
|
|
use crate::config::{ModuleConfig, RootModuleConfig, SegmentConfig};
|
|
|
|
|
|
|
|
use ansi_term::{Color, Style};
|
|
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
|
|
|
|
#[derive(Clone, ModuleConfig)]
|
|
|
|
pub struct PackageConfig<'a> {
|
|
|
|
pub symbol: SegmentConfig<'a>,
|
|
|
|
pub style: Style,
|
2020-04-28 08:53:30 +00:00
|
|
|
pub display_private: bool,
|
2019-10-19 01:51:38 +00:00
|
|
|
pub disabled: bool,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> RootModuleConfig<'a> for PackageConfig<'a> {
|
|
|
|
fn new() -> Self {
|
|
|
|
PackageConfig {
|
|
|
|
symbol: SegmentConfig::new("📦 "),
|
2020-02-01 23:10:12 +00:00
|
|
|
style: Color::Fixed(208).bold(),
|
2020-04-28 08:53:30 +00:00
|
|
|
display_private: false,
|
2019-10-19 01:51:38 +00:00
|
|
|
disabled: false,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|