Update dotfiles/.local/motd.sh
This commit is contained in:
parent
db50e8a72d
commit
e2ca9295fd
1 changed files with 12 additions and 15 deletions
|
@ -371,22 +371,19 @@ print_diskspace() {
|
||||||
|
|
||||||
diskspace_disk_size="$(echo "$diskspace_partitions" | grep "$diskspace_disk_name " | awk '{ print $2 }')"
|
diskspace_disk_size="$(echo "$diskspace_partitions" | grep "$diskspace_disk_name " | awk '{ print $2 }')"
|
||||||
diskspace_disk_used="$(echo "$diskspace_partitions" | grep "$diskspace_disk_name " | awk '{ print $3 }')"
|
diskspace_disk_used="$(echo "$diskspace_partitions" | grep "$diskspace_disk_name " | awk '{ print $3 }')"
|
||||||
|
if [[ "$diskspace_disk_mount" != '/var/lib/snapd/snap'* ]]; then
|
||||||
if [ -z "$diskspace_disk_size" ]; then
|
if [ -z "$diskspace_disk_size" ]; then
|
||||||
diskspace_disk_size="$(echo "$diskspace_partitions" | grep "$diskspace_disk_mount" | awk '{ print $2 }')"
|
diskspace_disk_size="$(echo "$diskspace_partitions" | grep "$diskspace_disk_mount" | awk '{ print $2 }')"
|
||||||
|
fi
|
||||||
|
if [ -z "$diskspace_disk_used" ]; then
|
||||||
|
diskspace_disk_used="$(echo "$diskspace_partitions" | grep "$diskspace_disk_mount" | awk '{ print $3 }')"
|
||||||
|
fi
|
||||||
|
if [ "$diskspace_index" -ne 0 ]; then
|
||||||
|
printf "\\n"
|
||||||
|
fi
|
||||||
|
diskspace_index=$((diskspace_index + 1))
|
||||||
|
generate_bar_disk "$DISKSPACE_ICON" "$diskspace_disk_size" "$diskspace_disk_used" "$diskspace_disk_mount"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$diskspace_disk_used" ]; then
|
|
||||||
diskspace_disk_used="$(echo "$diskspace_partitions" | grep "$diskspace_disk_mount" | awk '{ print $3 }')"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$diskspace_index" -ne 0 ]; then
|
|
||||||
printf "\\n"
|
|
||||||
fi
|
|
||||||
|
|
||||||
diskspace_index=$((diskspace_index + 1))
|
|
||||||
|
|
||||||
generate_bar_disk "$DISKSPACE_ICON" "$diskspace_disk_size" "$diskspace_disk_used" "$diskspace_disk_mount"
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue