2021-03-15 10:40:52 +00:00
|
|
|
use crate::config::ModuleConfig;
|
2019-10-26 06:20:20 +00:00
|
|
|
|
2021-03-31 15:31:55 +00:00
|
|
|
use serde::Serialize;
|
2019-10-26 06:20:20 +00:00
|
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
|
2021-03-31 15:31:55 +00:00
|
|
|
#[derive(Clone, ModuleConfig, Serialize)]
|
2019-10-26 06:20:20 +00:00
|
|
|
pub struct GitStatusConfig<'a> {
|
2020-07-07 22:45:32 +00:00
|
|
|
pub format: &'a str,
|
|
|
|
pub style: &'a str,
|
|
|
|
pub stashed: &'a str,
|
|
|
|
pub ahead: &'a str,
|
|
|
|
pub behind: &'a str,
|
|
|
|
pub diverged: &'a str,
|
|
|
|
pub conflicted: &'a str,
|
|
|
|
pub deleted: &'a str,
|
|
|
|
pub renamed: &'a str,
|
|
|
|
pub modified: &'a str,
|
|
|
|
pub staged: &'a str,
|
|
|
|
pub untracked: &'a str,
|
2019-10-26 06:20:20 +00:00
|
|
|
pub disabled: bool,
|
|
|
|
}
|
|
|
|
|
2021-03-15 10:40:52 +00:00
|
|
|
impl<'a> Default for GitStatusConfig<'a> {
|
|
|
|
fn default() -> Self {
|
2019-10-26 06:20:20 +00:00
|
|
|
GitStatusConfig {
|
2020-07-07 22:45:32 +00:00
|
|
|
format: "([\\[$all_status$ahead_behind\\]]($style) )",
|
|
|
|
style: "red bold",
|
|
|
|
stashed: "\\$",
|
|
|
|
ahead: "⇡",
|
|
|
|
behind: "⇣",
|
|
|
|
diverged: "⇕",
|
|
|
|
conflicted: "=",
|
|
|
|
deleted: "✘",
|
|
|
|
renamed: "»",
|
|
|
|
modified: "!",
|
|
|
|
staged: "+",
|
|
|
|
untracked: "?",
|
2019-10-26 06:20:20 +00:00
|
|
|
disabled: false,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|