summaryrefslogtreecommitdiffstats
path: root/.local/bin/dmenuumount
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2023-02-17 11:01:07 -0500
committerLuke Smith <luke@lukesmith.xyz>2023-02-17 11:01:07 -0500
commitb04d4c9ac83ecf8a5f26ec85e368ed234ca52eec (patch)
treece49c6f04142f8c974a2438ac7a21f7a464886da /.local/bin/dmenuumount
parenta2e767e4f4224cb74b2159833bec598e2e9b72e2 (diff)
downloadeibhear-b04d4c9ac83ecf8a5f26ec85e368ed234ca52eec.tar.gz
eibhear-b04d4c9ac83ecf8a5f26ec85e368ed234ca52eec.tar.zst
eibhear-b04d4c9ac83ecf8a5f26ec85e368ed234ca52eec.zip
mounter improvements, old scripts removed
now checks fstab for info, also one less android prompt
Diffstat (limited to '.local/bin/dmenuumount')
-rwxr-xr-x.local/bin/dmenuumount21
1 files changed, 0 insertions, 21 deletions
diff --git a/.local/bin/dmenuumount b/.local/bin/dmenuumount
deleted file mode 100755
index 656d1f1..0000000
--- a/.local/bin/dmenuumount
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-# A dmenu prompt to unmount drives.
-# Provides you with mounted partitions, select one to unmount.
-# Drives mounted at /, /boot and /home will not be options to unmount.
-
-drives="$(lsblk -nrpo "name,type,size,mountpoint,label" | awk -F':' '{gsub(/ /,":")}$4!~/\/boot|\/efi|\/home$|SWAP/&&length($4)>1{printf "%s (%s) %s\n",$4,$3,$5}'; awk '/simple-mtpfs/ { print "📱", $2; }' /etc/mtab)"
-
-chosen="$(echo "$drives" | dmenu -i -p "Unmount which drive?")" || exit 1
-
-case "$chosen" in
- 📱*)
- chosen="${chosen#📱 }"
- sudo -A umount -l "$chosen"
- ;;
- *)
- chosen="${chosen% (*}"
- sudo -A umount -l "$chosen"
- ;;
-esac && notify-send "🖥️ Drive unmounted." "$chosen successfully unmounted." ||
- notify-send "🖥️ Drive failed to unmount." "Possibly a permissions or I/O issue."