starship/configs/
memory_usage.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Clone, Deserialize, Serialize)]
4#[cfg_attr(
5 feature = "config-schema",
6 derive(schemars::JsonSchema),
7 schemars(deny_unknown_fields)
8)]
9#[serde(default)]
10pub struct MemoryConfig<'a> {
11 pub threshold: i64,
12 pub format: &'a str,
13 pub style: &'a str,
14 pub symbol: &'a str,
15 pub disabled: bool,
16}
17
18impl Default for MemoryConfig<'_> {
19 fn default() -> Self {
20 Self {
21 threshold: 75,
22 format: "via $symbol[$ram( | $swap)]($style) ",
23 style: "white bold dimmed",
24 symbol: "🐏 ",
25 disabled: true,
26 }
27 }
28}