1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-05-31 15:40:51 +00:00
starship/src/configs/memory_usage.rs
2022-04-01 17:14:05 +02:00

25 lines
613 B
Rust

use serde::{Deserialize, Serialize};
#[derive(Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "config-schema", derive(schemars::JsonSchema))]
#[serde(default)]
pub struct MemoryConfig<'a> {
pub threshold: i64,
pub format: &'a str,
pub style: &'a str,
pub symbol: &'a str,
pub disabled: bool,
}
impl<'a> Default for MemoryConfig<'a> {
fn default() -> Self {
MemoryConfig {
threshold: 75,
format: "via $symbol[$ram( | $swap)]($style) ",
style: "white bold dimmed",
symbol: "🐏 ",
disabled: true,
}
}
}