Files
starship/src/configs/sudo.rs
T

29 lines
640 B
Rust
Raw Normal View History

use serde::{Deserialize, Serialize};
2021-11-15 02:46:13 -03:00
#[derive(Clone, Deserialize, Serialize)]
2022-09-09 14:59:38 +02:00
#[cfg_attr(
feature = "config-schema",
derive(schemars::JsonSchema),
schemars(deny_unknown_fields)
)]
#[serde(default)]
2021-11-15 02:46:13 -03:00
pub struct SudoConfig<'a> {
pub format: &'a str,
pub symbol: &'a str,
pub style: &'a str,
pub allow_windows: bool,
pub disabled: bool,
}
impl<'a> Default for SudoConfig<'a> {
fn default() -> Self {
SudoConfig {
format: "[as $symbol]($style)",
symbol: "🧙 ",
style: "bold blue",
allow_windows: false,
disabled: true,
}
}
}