summaryrefslogtreecommitdiff
path: root/keyboard/mnt
diff options
context:
space:
mode:
Diffstat (limited to 'keyboard/mnt')
-rwxr-xr-xkeyboard/mnt10
1 files changed, 10 insertions, 0 deletions
diff --git a/keyboard/mnt b/keyboard/mnt
new file mode 100755
index 0000000..5f82aa4
--- /dev/null
+++ b/keyboard/mnt
@@ -0,0 +1,10 @@
+#!/bin/sh
+if partition=`lsblk --noheadings --paths --raw | awk '/part $/ { print $1, "(" $4 ")" }' | dmenu -p "Choose drive to mount: " | sed 's/ .*//'` \
+&& [ -n "$partition" ] \
+&& mountpoint=`ls --directory /media/mnt/*/ | dmenu -p "Choose mountpoint: "` \
+&& [ -n "$mountpoint" ]
+then
+ doas mount "$partition" "$mountpoint" \
+ && notify-send --urgency low "Device Successfully Mounted" "Successfully Mounted partition \"$partition\" to mountpoint \"$mountpoint\"" \
+ || notify-send --urgency low "Error Mounting Device" "Could not mount partition \"$partition\" to mountpoint \"$mountpoint\""
+fi