summaryrefslogtreecommitdiffstats
path: root/.scripts/i3cmds/dmenumount
diff options
context:
space:
mode:
Diffstat (limited to '.scripts/i3cmds/dmenumount')
-rwxr-xr-x.scripts/i3cmds/dmenumount7
1 files changed, 3 insertions, 4 deletions
diff --git a/.scripts/i3cmds/dmenumount b/.scripts/i3cmds/dmenumount
index 615e94a..9129643 100755
--- a/.scripts/i3cmds/dmenumount
+++ b/.scripts/i3cmds/dmenumount
@@ -3,7 +3,6 @@
# If they're in /etc/fstab, they'll be mounted automatically.
# Otherwise, you'll be prompted to give a mountpoint from already existsing directories.
# If you input a novel directory, it will prompt you to create that directory.
-pgrep -x dmenu && exit
getmount() { \
[ -z "$chosen" ] && exit 1
@@ -17,7 +16,7 @@ getmount() { \
mountusb() { \
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
- sudo -A mount "$chosen" && notify-send "$chosen mounted." && exit 0
+ sudo -A mount "$chosen" && notify-send "💻 USB mounting" "$chosen mounted." && exit 0
alreadymounted=$(lsblk -nrpo "name,type,mountpoint" | awk '$2=="part"&&$3!~/\/boot|\/home$|SWAP/&&length($3)>1{printf "-not \( -path *%s -prune \) \ \n",$3}')
getmount "/mnt /media /mount /home -maxdepth 5 -type d $alreadymounted"
partitiontype="$(lsblk -no "fstype" "$chosen")"
@@ -25,14 +24,14 @@ mountusb() { \
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" 741 "$mp";;
esac
- notify-send "$chosen mounted to $mp."
+ notify-send "💻 USB mounting" "$chosen mounted to $mp."
}
mountandroid() { \
chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1)
getmount "$HOME -maxdepth 3 -type d"
simple-mtpfs --device "$chosen" "$mp"
- notify-send "Android device mounted to $mp."
+ notify-send "🤖 Android Mounting" "Android device mounted to $mp."
}
asktype() { \