aboutsummaryrefslogtreecommitdiff
path: root/dmenuUmount.sh
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-01-24 14:24:44 +0100
committerInigoGutierrez <inigogf.95@gmail.com>2019-01-24 14:24:44 +0100
commitda8c4b7b65235909b7c03da480689d9d871f8d59 (patch)
tree5dbcadd5a70c172eed8300efec727552eae89301 /dmenuUmount.sh
parent95aa68aeb4b629e9a98a9a480a558b757b2a732e (diff)
downloadscripts-da8c4b7b65235909b7c03da480689d9d871f8d59.tar.gz
scripts-da8c4b7b65235909b7c03da480689d9d871f8d59.zip
Created music mode and added some other little stuff.
Diffstat (limited to 'dmenuUmount.sh')
-rwxr-xr-xdmenuUmount.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/dmenuUmount.sh b/dmenuUmount.sh
index 99e60db..1669706 100755
--- a/dmenuUmount.sh
+++ b/dmenuUmount.sh
@@ -1,15 +1,15 @@
-#!/bin/bash
+#!/bin/sh
# _
-# __| |_ __ ___ ___ _ __ _ _
+# __| |_ __ ___ ___ _ __ _ _
# / _` | '_ ` _ \ / _ \ '_ \| | | |
# | (_| | | | | | | __/ | | | |_| |
# \__,_|_| |_| |_|\___|_| |_|\__,_|
-# _
-# _ _ _ __ ___ ___ _ _ _ __ | |_ ___
+# _
+# _ _ _ __ ___ ___ _ _ _ __ | |_ ___
# | | | | '_ ` _ \ / _ \| | | | '_ \| __/ __|
# | |_| | | | | | | (_) | |_| | | | | |_\__ \
# \__,_|_| |_| |_|\___/ \__,_|_| |_|\__|___/
-#
+#
# Gives a dmenu prompt to umount mounted drives.
# Shows mounted partitions; select one to unmount.
@@ -20,9 +20,9 @@ while read -r line
do
i=$((i+1))
drives="$drives$i. $( echo "$line" | awk '{print $1, "(" $4 ")", "on", $7}' )"$'\n'
-done <<< "$(lsblk -lp | grep "part /" | grep -v "$exclusionregex" )"
-[[ "$drives" = "" ]] && exit
+done <<< "$(lsblk -lp | grep "part /" | grep -v "$exclusionregex")"
+[ "$drives" == "" ] && exit
lines=$(echo "$drives" | wc -l)
chosen=$(echo "$drives" | dmenu -i -l $lines -p "Unmount which drive?" | awk '{print $2}')
-[[ "$chosen" = "" ]] && exit
+[ "$chosen" == "" ] && exit
umount $chosen && pgrep -x dunst && notify-send "$chosen unmounted."