From e2ca9295fd6cdee3c3cf91360bd8d032a5a6e8f1 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Sat, 29 Oct 2022 23:39:34 +0000 Subject: [PATCH] Update dotfiles/.local/motd.sh --- dotfiles/.local/motd.sh | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/dotfiles/.local/motd.sh b/dotfiles/.local/motd.sh index f67b111c..bc6d4d71 100644 --- a/dotfiles/.local/motd.sh +++ b/dotfiles/.local/motd.sh @@ -371,22 +371,19 @@ print_diskspace() { 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 }')" - - if [ -z "$diskspace_disk_size" ]; then - diskspace_disk_size="$(echo "$diskspace_partitions" | grep "$diskspace_disk_mount" | awk '{ print $2 }')" + if [[ "$diskspace_disk_mount" != '/var/lib/snapd/snap'* ]]; then + if [ -z "$diskspace_disk_size" ]; then + 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 - - 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 fi }