1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-15 17:47:13 +00:00
starship/src/configs/shlvl.rs
2020-12-14 15:40:21 -05:00

27 lines
646 B
Rust

use crate::config::{ModuleConfig, RootModuleConfig};
use starship_module_config_derive::ModuleConfig;
#[derive(Clone, ModuleConfig)]
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> RootModuleConfig<'a> for ShLvlConfig<'a> {
fn new() -> Self {
ShLvlConfig {
threshold: 2,
format: "[$symbol$shlvl]($style) ",
symbol: "↕️ ", // extra space for emoji
repeat: false,
style: "bold yellow",
disabled: true,
}
}
}