summaryrefslogtreecommitdiffstats
path: root/.scripts/i3cmds/dmenumount
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-04-10 19:56:09 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-04-10 19:56:09 -0400
commit1f6dbfea037366656a7184385957008d7504cd4a (patch)
tree9294cf4454812e4484c2780de3aac3a5dce8e530 /.scripts/i3cmds/dmenumount
parentb937082b98cb2210497a9e6766b46ddfd5a4548f (diff)
downloadeibhear-1f6dbfea037366656a7184385957008d7504cd4a.tar.gz
eibhear-1f6dbfea037366656a7184385957008d7504cd4a.tar.zst
eibhear-1f6dbfea037366656a7184385957008d7504cd4a.zip
dmenu mount and umount fixes
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() { \