diff options
Diffstat (limited to '.scripts/i3cmds')
| -rwxr-xr-x | .scripts/i3cmds/dmenumount | 6 | ||||
| -rwxr-xr-x | .scripts/i3cmds/dmenuumount | 11 |
2 files changed, 11 insertions, 6 deletions
diff --git a/.scripts/i3cmds/dmenumount b/.scripts/i3cmds/dmenumount index cdeca18..431141f 100755 --- a/.scripts/i3cmds/dmenumount +++ b/.scripts/i3cmds/dmenumount @@ -17,16 +17,16 @@ getmount() { \ mountusb() { \ chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')" - sudo -A mount "$chosen" && exit 0 + sudo -A mount "$chosen" && notify-send "$chosen mounted." && exit 0 getmount "/mnt /media /mount /home -maxdepth 5 -type d" - sudo -A mount "$chosen" "$mp" && pgrep -x dunst && notify-send "$chosen mounted to $mp." + sudo -A mount "$chosen" "$mp" && notify-send "$chosen mounted to $mp." } mountandroid() { \ chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1) getmount "$HOME -maxdepth 3 -type d" simple-mtpfs --device "$chosen" "$mp" - echo simple-mtpfs --device "$chosen" "$mp" + notify-send "Android device mounted to $mp." } asktype() { \ diff --git a/.scripts/i3cmds/dmenuumount b/.scripts/i3cmds/dmenuumount index c169326..a267010 100755 --- a/.scripts/i3cmds/dmenuumount +++ b/.scripts/i3cmds/dmenuumount @@ -30,7 +30,12 @@ if ! grep simple-mtpfs /etc/mtab; then echo "Unmountable USB drive detected." unmountusb else - [ -z "$drives" ] && echo "Unmountable Android device detected." && unmountandroid - echo "Unmountable USB drive(s) and Android device(s) detected." - asktype + if [ -z "$drives" ] + then + echo "Unmountable Android device detected." + unmountandroid + else + echo "Unmountable USB drive(s) and Android device(s) detected." + asktype + fi fi |
