summaryrefslogtreecommitdiffstats
path: root/.local/bin/dmenumount
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2023-01-15 08:23:54 -0500
committerLuke Smith <luke@lukesmith.xyz>2023-01-15 08:23:54 -0500
commit9385a569fe356db706ed268a87e77cfa760d58dd (patch)
tree2c8d3b6e3e72f6dd2e211a5cf380baf301d2f545 /.local/bin/dmenumount
parent5c52bd63394aafbb93b6713b74c148e5a4ec17c7 (diff)
parent5c262da7c39fb0b3cd52acca36f45d4e7c629d37 (diff)
downloadeibhear-9385a569fe356db706ed268a87e77cfa760d58dd.tar.gz
eibhear-9385a569fe356db706ed268a87e77cfa760d58dd.tar.zst
eibhear-9385a569fe356db706ed268a87e77cfa760d58dd.zip
Merge branch 'master' of github.com:LukeSmithxyz/voidrice
Diffstat (limited to '.local/bin/dmenumount')
-rwxr-xr-x.local/bin/dmenumount10
1 files changed, 5 insertions, 5 deletions
diff --git a/.local/bin/dmenumount b/.local/bin/dmenumount
index abeb0ce..8cf4a6b 100755
--- a/.local/bin/dmenumount
+++ b/.local/bin/dmenumount
@@ -27,18 +27,18 @@ mountusb() { \
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
"exfat") sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)";;
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" "$mp";;
- esac
- notify-send "💻 USB mounting" "$chosen mounted to $mp."
+ esac && notify-send "💻 USB mounting" "$chosen mounted to $mp." ||
+ notify-send "💻 Drive failed to mount." "Probably a permissions issue or drive is already mounted."
}
mountandroid() { \
chosen="$(echo "$anddrives" | dmenu -i -p "Which Android device?")" || exit 1
chosen="$(echo "$chosen" | cut -d : -f 1)"
getmount "$HOME -maxdepth 3 -type d"
- simple-mtpfs --device "$chosen" "$mp"
echo "OK" | dmenu -i -p "Tap Allow on your phone if it asks for permission and then press enter" || exit 1
- simple-mtpfs --device "$chosen" "$mp"
- notify-send "🤖 Android Mounting" "Android device mounted to $mp."
+ simple-mtpfs --device "$chosen" "$mp" &&
+ notify-send "🤖 Android Mounting" "Android device mounted to $mp." ||
+ notify-send "🤖 Android failed mounting." "Probably a permissions issue or phone is already mounted."
}
asktype() { \