From 2e67bb28b3a71340cdbb69e17dbd5fe08189bf2a Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Thu, 15 Jun 2023 13:27:35 +0200 Subject: [PATCH] status bar cleanup --- .local/bin/statusbar/sb-cpu | 2 +- .local/bin/statusbar/sb-disk | 2 +- .local/bin/statusbar/sb-memory | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.local/bin/statusbar/sb-cpu b/.local/bin/statusbar/sb-cpu index fc648c348..99a2347fc 100755 --- a/.local/bin/statusbar/sb-cpu +++ b/.local/bin/statusbar/sb-cpu @@ -8,7 +8,7 @@ green="\033[32m" orange="\033[33m" cache=/tmp/cpubarscache -temp=$(sensors | awk '/CPU/ {print $2}' | tr -d "+") +temp=$(sensors | awk '/CPU/ {printf ("%.f°C", $2)}' | tr -d "+") stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat) [ ! -f $cache ] && echo "$stats" >"$cache" old=$(cat "$cache") diff --git a/.local/bin/statusbar/sb-disk b/.local/bin/statusbar/sb-disk index e2a48b8d7..90eaefe27 100755 --- a/.local/bin/statusbar/sb-disk +++ b/.local/bin/statusbar/sb-disk @@ -6,4 +6,4 @@ big="\033[11m" location=${1:-/} [ -d "$location" ] || exit -printf "%b" "$big$reset $(df -h "$location" | awk ' /[0-9]/ {print $3 "/" $2}')\n" +printf "%b" "$big$reset $(df -H "$location" | awk ' /[0-9]/ {print $3 "/" $2}')\n" diff --git a/.local/bin/statusbar/sb-memory b/.local/bin/statusbar/sb-memory index cf552adc8..b844ddd9d 100755 --- a/.local/bin/statusbar/sb-memory +++ b/.local/bin/statusbar/sb-memory @@ -1,3 +1,3 @@ #!/bin/sh printf "%b" "\033[11m\033[10m " -free --mebi | sed -n '2{p;q}' | awk '{printf ("%2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}' +free --mega | sed -n '2{p;q}' | awk '{printf ("%2.2fG/%2.2fG\n", ($3 / 1000), ($2 / 1000))}'