1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-06-17 15:52:47 +00:00
starship/src/configs/hostname.rs

27 lines
679 B
Rust

use serde::{Deserialize, Serialize};
#[derive(Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "config-schema", derive(schemars::JsonSchema))]
#[serde(default)]
pub struct HostnameConfig<'a> {
pub ssh_only: bool,
pub ssh_symbol: &'a str,
pub trim_at: &'a str,
pub format: &'a str,
pub style: &'a str,
pub disabled: bool,
}
impl<'a> Default for HostnameConfig<'a> {
fn default() -> Self {
HostnameConfig {
ssh_only: true,
ssh_symbol: "🌐 ",
trim_at: ".",
format: "[$ssh_symbol$hostname]($style) in ",
style: "green dimmed bold",
disabled: false,
}
}
}