aboutsummaryrefslogtreecommitdiff
path: root/dmenuUmount.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dmenuUmount.sh')
-rw-r--r--dmenuUmount.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/dmenuUmount.sh b/dmenuUmount.sh
index 873ad2d..f50f4aa 100644
--- a/dmenuUmount.sh
+++ b/dmenuUmount.sh
@@ -16,7 +16,8 @@
exclusionregex="\(/boot\|/home\|/\)$"
drives=$(lsblk -lp | grep "part /" | grep -v "$exclusionregex" | awk '{print $1, "(" $4 ")", "on", $7}')
[[ "$drives" = "" ]] && exit
-chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}')
+lines=$(echo "$drives" | wc -l)
+chosen=$(echo "$drives" | dmenu -i -l $lines -p "Unmount which drive?" | awk '{print $1}')
[[ "$chosen" = "" ]] && exit
umount $chosen && pgrep -x dunst && notify-send "$chosen unmounted."
#umount $chosen && notify-send "$chosen unmounted."