1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-15 17:47:13 +00:00
starship/src/configs/kubernetes.rs

26 lines
682 B
Rust
Raw Normal View History

use crate::config::{ModuleConfig, RootModuleConfig};
use starship_module_config_derive::ModuleConfig;
use std::collections::HashMap;
#[derive(Clone, ModuleConfig)]
pub struct KubernetesConfig<'a> {
pub symbol: &'a str,
pub format: &'a str,
pub style: &'a str,
pub disabled: bool,
pub context_aliases: HashMap<String, &'a str>,
}
impl<'a> RootModuleConfig<'a> for KubernetesConfig<'a> {
fn new() -> Self {
KubernetesConfig {
symbol: "",
format: "on [$symbol$context( \\($namespace\\))]($style) ",
style: "cyan bold",
disabled: true,
context_aliases: HashMap::new(),
}
}
}