1
0
Fork 0

dmenumount: cleanup

This commit is contained in:
Luca Bilke 2025-02-02 13:01:38 +01:00
commit 54daad2bd1
Signed by: luca
GPG key ID: C9E851809C1A5BDE

View file

@ -76,15 +76,21 @@ attemptmount() {
}
case "$chosen" in
*)
*)
chosen="${chosen%% *}"
chosen="${chosen:1}" # This is a bashism.
parttype="$(echo "$lsblkoutput" | grep "$chosen"a)"
attemptmount || getmount
sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)"
case "${parttype##* }" in
vfat) sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000 ;;
btrfs) sudo -A mount "$chosen" "$mp" ;;
*) sudo -A mount "$chosen" "$mp" -o uid="$(id -u)",gid="$(id -g)" ;;
esac
notify-send " Drive Mounted." "$chosen mounted to $mp."
;;
*)
*)
chosen="${chosen%% *}"
chosen="${chosen:1}" # This is a bashism.
# Number the drive.
@ -103,8 +109,8 @@ case "$chosen" in
notify-send " Decrypted drive Mounted." "$chosen decrypted and mounted to $mp."
;;
*)
notify-send "❗Note" "Remember to allow file access on your phone now."
*)
notify-send "󱈸 Note" "Remember to allow file access on your phone now."
getmount
number="${chosen%%:*}"
number="${chosen:1}" # This is a bashism.