From 3c38c7d32d30106791b3d3ebc7833de26c4591b6 Mon Sep 17 00:00:00 2001 From: koksnuss Date: Thu, 31 May 2018 23:14:17 +0200 Subject: [PATCH] Fix ram and show only ram by default. --- config | 2 +- modules/ram | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index 39a1faa..bf19d8e 100644 --- a/config +++ b/config @@ -25,7 +25,7 @@ interval=60 [ram] label=⚟ # instance=long -# instance=ram +instance=ram # [ram] # instance=swap diff --git a/modules/ram b/modules/ram index 34d726f..8757775 100755 --- a/modules/ram +++ b/modules/ram @@ -5,7 +5,7 @@ [[ "$BLOCK_INSTANCE" =~ "long" || "$BLOCK_BUTTON" == 1 ]] && LONG=true if [[ "$BLOCK_INSTANCE" =~ "ram" ]]; then - TYPE='swap' + TYPE='ram' elif [[ "$BLOCK_INSTANCE" =~ "swap" ]]; then TYPE='swap' fi @@ -59,7 +59,7 @@ gawk -v TYPE="$TYPE" -v LONG="$LONG" ' } } } else { - load = mfg / mtg + load = 100 - mfg / mtg * 100 if (load < 100 / 9) { printf("▁\n▁\n") } else if (load < 100 / 9 * 2 ) {