Implement a semi-automatic mounter
authorSiraaj Khandkar <siraaj@khandkar.net>
Fri, 28 Feb 2020 04:44:30 +0000 (23:44 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Fri, 28 Feb 2020 04:44:30 +0000 (23:44 -0500)
home/bin/semi-auto-mount [new file with mode: 0755]

diff --git a/home/bin/semi-auto-mount b/home/bin/semi-auto-mount
new file mode 100755 (executable)
index 0000000..1bd5e8a
--- /dev/null
@@ -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)"
This page took 0.022505 seconds and 4 git commands to generate.