From c2aa87085ea9530a67dae203eef191656de075d1 Mon Sep 17 00:00:00 2001 From: "committer@tuxwarrior" Date: Tue, 17 Mar 2026 06:40:14 -0500 Subject: [PATCH] keep parttision number --- dots/bin/resources.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dots/bin/resources.sh b/dots/bin/resources.sh index df59b2b..b17d1e1 100755 --- a/dots/bin/resources.sh +++ b/dots/bin/resources.sh @@ -29,7 +29,7 @@ displayResources() { ps -eo pid,comm,%cpu --sort=-%cpu | head -n 2 | awk 'NR==2 {printf "%s: %s (%s%)", $1, $2, $3}' elif [[ "${operation}" == "drive" ]]; then # display used drive space - main_drive=$(df / | awk 'NR==2 {print $1}' | sed 's/[0-9]*$//') # This gets the device mounted at /, removes partition numbers, and returns the disk (e.g., /dev/sda). + main_drive=$(df / | awk 'NR==2 {print $1}') # gets the device mounted at / extra_arg=${extra_arg:=${main_drive}} echo /home/poq/.config/nwg-panel/icons/noun-storage-5078021.svg df -h ${extra_arg} | awk 'NR==2 {printf "%s/%s (%s)\n", $3, $2, $5}'