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

25 lines
591 B
Rust

use crate::config::{ModuleConfig, RootModuleConfig};
use starship_module_config_derive::ModuleConfig;
#[derive(Clone, ModuleConfig)]
pub struct MemoryConfig<'a> {
pub threshold: i64,
pub format: &'a str,
pub style: &'a str,
pub symbol: &'a str,
pub disabled: bool,
}
impl<'a> RootModuleConfig<'a> for MemoryConfig<'a> {
fn new() -> Self {
MemoryConfig {
threshold: 75,
format: "via $symbol[$ram( | $swap)]($style) ",
style: "white bold dimmed",
symbol: "🐏 ",
disabled: true,
}
}
}