1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-06-26 11:42:36 +00:00
starship/src/configs/status.rs

36 lines
946 B
Rust
Raw Normal View History

use crate::config::ModuleConfig;
use serde::Serialize;
use starship_module_config_derive::ModuleConfig;
#[derive(Clone, ModuleConfig, Serialize)]
pub struct StatusConfig<'a> {
pub format: &'a str,
pub symbol: &'a str,
pub not_executable_symbol: &'a str,
pub not_found_symbol: &'a str,
pub sigint_symbol: &'a str,
pub signal_symbol: &'a str,
pub style: &'a str,
pub map_symbol: bool,
pub recognize_signal_code: bool,
pub disabled: bool,
}
impl<'a> Default for StatusConfig<'a> {
fn default() -> Self {
StatusConfig {
format: "[$symbol$status]($style) ",
symbol: "",
not_executable_symbol: "🚫",
not_found_symbol: "🔍",
sigint_symbol: "🧱",
signal_symbol: "",
style: "bold red",
map_symbol: false,
recognize_signal_code: true,
disabled: true,
}
}
}