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
|
fi
|
||||||
|
|
||||||
if [ -z "$diskspace_disk_used" ]; then
|
if [ -z "$diskspace_disk_used" ]; then
|
||||||
diskspace_disk_used="$(echo "$diskspace_partitions" | grep "$diskspace_disk_mount" | awk '{ print $3 }')"
|
diskspace_disk_used="$(echo "$diskspace_partitions" | grep "$diskspace_disk_mount" | awk '{ print $3 }')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$diskspace_index" -ne 0 ]; then
|
if [ "$diskspace_index" -ne 0 ]; then
|
||||||
printf "\\n"
|
printf "\\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
diskspace_index=$((diskspace_index + 1))
|
diskspace_index=$((diskspace_index + 1))
|
||||||
|
|
||||||
generate_bar_disk "$DISKSPACE_ICON" "$diskspace_disk_size" "$diskspace_disk_used" "$diskspace_disk_mount"
|
generate_bar_disk "$DISKSPACE_ICON" "$diskspace_disk_size" "$diskspace_disk_used" "$diskspace_disk_mount"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue