1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-05-28 22:20:53 +00:00
starship/src/configs/shlvl.rs
2022-04-01 17:14:05 +02:00

27 lines
668 B
Rust

use serde::{Deserialize, Serialize};
#[derive(Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "config-schema", derive(schemars::JsonSchema))]
#[serde(default)]
pub struct ShLvlConfig<'a> {
pub threshold: i64,
pub format: &'a str,
pub symbol: &'a str,
pub repeat: bool,
pub style: &'a str,
pub disabled: bool,
}
impl<'a> Default for ShLvlConfig<'a> {
fn default() -> Self {
ShLvlConfig {
threshold: 2,
format: "[$symbol$shlvl]($style) ",
symbol: "↕️ ", // extra space for emoji
repeat: false,
style: "bold yellow",
disabled: true,
}
}
}