aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/mounter
diff options
context:
space:
mode:
authorCaleb Noelke <cjn075@firemail.cc>2024-10-21 12:54:52 -0400
committerCaleb Noelke <cjn075@firemail.cc>2024-10-21 12:54:52 -0400
commitfe96c467eec5d66864dde93b4b5186524e258fd1 (patch)
treef9c7550e03241bb087ade674b459667b1f63ae9a /.local/bin/mounter
parent398886b6d4631bb1e695bf7851f1012c64f6895a (diff)
parent628ed4dc995f3c09e33c24a01c817c18b1a268af (diff)
Diffstat (limited to '.local/bin/mounter')
-rwxr-xr-x.local/bin/mounter7
1 files changed, 6 insertions, 1 deletions
diff --git a/.local/bin/mounter b/.local/bin/mounter
index 756d04d..389f2d3 100755
--- a/.local/bin/mounter
+++ b/.local/bin/mounter
@@ -79,8 +79,13 @@ case "$chosen" in
💾*)
chosen="${chosen%% *}"
chosen="${chosen:1}" # This is a bashism.
+ parttype="$(echo "$lsblkoutput" | grep "$chosen")"
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."
;;