From 1f6dbfea037366656a7184385957008d7504cd4a Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 10 Apr 2019 19:56:09 -0400 Subject: dmenu mount and umount fixes --- .scripts/i3cmds/dmenuumount | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.scripts/i3cmds/dmenuumount') diff --git a/.scripts/i3cmds/dmenuumount b/.scripts/i3cmds/dmenuumount index 260c1c8..dee53e7 100755 --- a/.scripts/i3cmds/dmenuumount +++ b/.scripts/i3cmds/dmenuumount @@ -7,17 +7,17 @@ unmountusb() { [ -z "$drives" ] && exit chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}') [ -z "$chosen" ] && exit - sudo -A umount "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted." + sudo -A umount "$chosen" && notify-send "💻 USB unmounting" "$chosen unmounted." } unmountandroid() { \ chosen=$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?") [ -z "$chosen" ] && exit - sudo -A umount -l "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted." + sudo -A umount -l "$chosen" && notify-send "🤖 Android unmounting" "$chosen unmounted." } asktype() { \ - case $(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?") in + case "$(printf "USB\\nAndroid" | dmenu -i -p "Unmount a USB drive or Android device?")" in USB) unmountusb ;; Android) unmountandroid ;; esac -- cgit v1.3.1