From: Siraaj Khandkar Date: Fri, 28 Feb 2020 04:44:30 +0000 (-0500) Subject: Implement a semi-automatic mounter X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=62cf8a0ef98a707d088f6fcc7af872d135093a39;p=khome.git Implement a semi-automatic mounter --- diff --git a/home/bin/semi-auto-mount b/home/bin/semi-auto-mount new file mode 100755 index 0000000..1bd5e8a --- /dev/null +++ b/home/bin/semi-auto-mount @@ -0,0 +1,10 @@ +#! /bin/sh + +path="$( + lsblk -rpo 'name,type,size,mountpoint' \ + | awk '!$4 && $2 == "part"' \ + | khomenu -l 60 \ + | awk '{print $1}' +)" + +notify-send 'semi-auto-mount' "$(udisksctl mount --block-device "$path" --no-user-interaction 2>&1)"