#!/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