dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 5f92f3ceccd0c5583a53697fc8d4eaccbb0d5c74
parent 4139a6a0e7fd463ddaac98b9628702e20c8f3424
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Mon,  1 Apr 2019 17:51:00 -0400

Merge pull request #258 from TomJansen/master

Prune existing mountpoints from find in dmenumount
Diffstat:
M.scripts/i3cmds/dmenumount | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.scripts/i3cmds/dmenumount b/.scripts/i3cmds/dmenumount @@ -18,7 +18,8 @@ getmount() { \ mountusb() { \ chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')" sudo -A mount "$chosen" && notify-send "$chosen mounted." && exit 0 - getmount "/mnt /media /mount /home -maxdepth 5 -type d" + 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")" case "$partitiontype" in "vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;