Skip to content

Commit 25123ff

Browse files
authored
Update default memory format (#1932)
Based on conversation in #1930
1 parent 06f3dc4 commit 25123ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/blocks/memory.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//!
55
//! Key | Values | Default
66
//! ----|--------|--------
7-
//! `format` | A string to customise the output of this block when in "Memory" view. See below for available placeholders. | `" $icon $mem_avail.eng(prefix:M)/$mem_total.eng(prefix:M)($mem_total_used_percents.eng(w:2)) "`
7+
//! `format` | A string to customise the output of this block when in "Memory" view. See below for available placeholders. | `" $icon $mem_used.eng(prefix:Mi)/$mem_total.eng(prefix:Mi)($mem_used_percents.eng(w:2)) "`
88
//! `format_alt` | If set, block will switch between `format` and `format_alt` on every click | `None`
99
//! `interval` | Update interval in seconds | `5`
1010
//! `warning_mem` | Percentage of memory usage, where state is set to warning | `80.0`
@@ -45,7 +45,7 @@
4545
//! [[block]]
4646
//! block = "memory"
4747
//! format = " $icon $mem_used_percents.eng(w:1) "
48-
//! format_alt = " $icon_swap $swap_free.eng(w:3,u:B,p:M)/$swap_total.eng(w:3,u:B,p:M)($swap_used_percents.eng(w:2)) "
48+
//! format_alt = " $icon_swap $swap_free.eng(w:3,u:B,p:Mi)/$swap_total.eng(w:3,u:B,p:Mi)($swap_used_percents.eng(w:2)) "
4949
//! interval = 30
5050
//! warning_mem = 70
5151
//! critical_mem = 90
@@ -86,7 +86,7 @@ pub async fn run(config: &Config, api: &CommonApi) -> Result<()> {
8686
.await?;
8787

8888
let mut format = config.format.with_default(
89-
" $icon $mem_avail.eng(prefix:M)/$mem_total.eng(prefix:M)($mem_total_used_percents.eng(w:2)) ",
89+
" $icon $mem_used.eng(prefix:Mi)/$mem_total.eng(prefix:Mi)($mem_used_percents.eng(w:2)) ",
9090
)?;
9191
let mut format_alt = match &config.format_alt {
9292
Some(f) => Some(f.with_default("")?),

0 commit comments

Comments
 (0)