summaryrefslogtreecommitdiff
path: root/keyboard/mnt
diff options
context:
space:
mode:
authorTimmy Keller <tjk@tjkeller.xyz>2021-09-11 00:36:13 -0500
committerTimmy Keller <tjk@tjkeller.xyz>2021-09-11 00:36:13 -0500
commit0a9053c2902adab8b94eaacdb15390441143078c (patch)
tree1f1a38272dbd554cde8cdec263187112b9c6a7e8 /keyboard/mnt
downloadscripts-0a9053c2902adab8b94eaacdb15390441143078c.tar.xz
scripts-0a9053c2902adab8b94eaacdb15390441143078c.zip
redid repo cus of fucking chromium rip old commit messages
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