Better disk output

This commit is contained in:
Mattia Basaglia 2022-02-21 07:59:20 +01:00
parent ca711550d1
commit 43b51b408d

View file

@ -122,7 +122,7 @@ function ponyget_Disk()
{ {
local dfoption=$FSTYPE local dfoption=$FSTYPE
[ "$dfoption" ] && dfoption="-t $FSTYPE" [ "$dfoption" ] && dfoption="-t $FSTYPE"
local diskusage=$(df -lh $dfoption --total | tail -n 1 | sed -r "s/ +/\t/g" ) local diskusage=$(df -lh $dfoption -x overlay -x tmpfs -x devtmpfs --total | tail -n 1 | sed -r "s/ +/\t/g" )
local used=$(echo "$diskusage" | cut -f 3) local used=$(echo "$diskusage" | cut -f 3)
local total=$(echo "$diskusage" | cut -f 2) local total=$(echo "$diskusage" | cut -f 2)
local percent=$(echo "$diskusage" | cut -f 5 | sed s/%// ) local percent=$(echo "$diskusage" | cut -f 5 | sed s/%// )