From da8c4b7b65235909b7c03da480689d9d871f8d59 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Thu, 24 Jan 2019 14:24:44 +0100 Subject: Created music mode and added some other little stuff. --- dmenuMount.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dmenuMount.sh') diff --git a/dmenuMount.sh b/dmenuMount.sh index c94543b..a5fb0d7 100755 --- a/dmenuMount.sh +++ b/dmenuMount.sh @@ -29,10 +29,10 @@ done <<< "$(lsblk -lp | grep "part $" )" [[ "$mountable" = "" ]] && exit 1 lines=$(echo "$mountable" | wc -l) chosen=$(echo "$mountable" | dmenu -i -l $lines -p "Mount which drive?" | awk '{print $2}') -[[ "$chosen" = "" ]] && exit 1 -mount "$chosen" && pgrep -x dunst && notify-send "$chosen mounted" && exit 0 +[ "$chosen" == "" ] && exit 1 +sudo mount "$chosen" && pgrep -x dunst && notify-send "$chosen mounted" && exit 0 -# Select mount point +# Select mount point (reached if previous mount failed, e.g. device not in /etc/fstab) directories="" i=0 while read -r line @@ -42,7 +42,7 @@ do done <<< "$(find /media ~/mounts -type d -maxdepth 3 -empty 2>/dev/null)" lines=$(echo "$directories" | wc -l) mountpoint=$(echo "$directories" | dmenu -i -l $lines -p "Type in mount point." | awk '{print $2}') -[[ "$mountpoint" = "" ]] && exit 1 +[ "$mountpoint" == "" ] && exit 1 if [[ ! -d "$mountpoint" ]]; then bash ~/scripts/prompt.sh "$mountpoint does not exist. Create it?" "mkdir -p $mountpoint" fi -- cgit v1.2.1