dmenumount: cleanup
This commit is contained in:
parent
b1edd86b46
commit
54daad2bd1
1 changed files with 37 additions and 31 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue