blob: 5f82aa41e4e284b9150d8bf826f0a5e7e9987f45 (
plain)
1
2
3
4
5
6
7
8
9
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
|