Files
starship/src/configs/gcloud.rs
T

28 lines
778 B
Rust
Raw Normal View History

use crate::config::ModuleConfig;
use serde::Serialize;
2020-08-04 06:30:20 +09:00
use starship_module_config_derive::ModuleConfig;
use std::collections::HashMap;
#[derive(Clone, ModuleConfig, Serialize)]
2020-08-04 06:30:20 +09:00
pub struct GcloudConfig<'a> {
pub format: &'a str,
pub symbol: &'a str,
pub style: &'a str,
pub disabled: bool,
pub region_aliases: HashMap<String, &'a str>,
2022-02-14 21:16:45 +09:00
pub project_aliases: HashMap<String, &'a str>,
2020-08-04 06:30:20 +09:00
}
impl<'a> Default for GcloudConfig<'a> {
fn default() -> Self {
2020-08-04 06:30:20 +09:00
GcloudConfig {
format: "on [$symbol$account(@$domain)(\\($region\\))]($style) ",
symbol: "☁️ ",
2020-08-04 06:30:20 +09:00
style: "bold blue",
disabled: false,
region_aliases: HashMap::new(),
2022-02-14 21:16:45 +09:00
project_aliases: HashMap::new(),
2020-08-04 06:30:20 +09:00
}
}
}