status bar cleanup
This commit is contained in:
parent
08308327d6
commit
7ad78ec92b
|
@ -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")
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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))}'
|
||||
|
|
Loading…
Reference in New Issue