aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdmenuMount.sh7
-rwxr-xr-xdmenuUmount.sh7
2 files changed, 12 insertions, 2 deletions
diff --git a/dmenuMount.sh b/dmenuMount.sh
index e79d650..edbf4d7 100755
--- a/dmenuMount.sh
+++ b/dmenuMount.sh
@@ -24,7 +24,12 @@ i=0
while read -r line
do
i=$((i+1))
- mountable="$mountable$i. $( echo "$line" | awk '{print $1, "(" $4 ")"}' )"$'\n'
+ name="$(echo "$line" | awk '{print $1}')"
+ size="$(echo "$line" | awk '{print $4}')"
+ label="$(lsblk -lpo "name,label" | grep "$name" | awk '{print $2}')"
+ fstype="$(lsblk -lpo "name,fstype" | grep "$name" | awk '{print $2}')"
+ mountable="$mountable$i. $name ($size) \"$label\" [$fstype]"$'\n'
+ #$( echo "$line" | awk '{print $, "(" $2 ")", "\"" $3 "\"", "[" $4 "]"}' )"$'\n'
done <<< "$(lsblk -lp | grep "part $" )"
[[ "$mountable" = "" ]] && exit 1
lines=$(echo "$mountable" | wc -l)
diff --git a/dmenuUmount.sh b/dmenuUmount.sh
index 61af1c1..7c19019 100755
--- a/dmenuUmount.sh
+++ b/dmenuUmount.sh
@@ -21,7 +21,12 @@ i=0
while read -r line
do
i=$((i+1))
- drives="$drives$i. $( echo "$line" | awk '{print $1, "(" $4 ")", "on", $7}' )"$'\n'
+ name="$(echo "$line" | awk '{print $1}')"
+ size="$(echo "$line" | awk '{print $4}')"
+ mountpoint="$(echo "$line" | awk '{print $7}')"
+ label="$(lsblk -lpo "name,label" | grep "$name" | awk '{print $2}')"
+ fstype="$(lsblk -lpo "name,fstype" | grep "$name" | awk '{print $2}')"
+ drives="$drives$i. $name ($size) \"$label\" [$fstype] on $mountpoint"$'\n'
done <<< "$list"
[ "$drives" == "" ] && exit
lines=$(echo "$drives" | wc -l)