diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2022-01-20 17:07:39 -0600 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2022-01-20 17:07:39 -0600 |
commit | 1ffe58f3ee6eeb2d81729eb7c458a8979eb2df68 (patch) | |
tree | abf5bd1cfa67232bc349174135814e316be3de3b /old/mnt | |
parent | 32d34ac9c5e3b682800f65f24743f2f29af04347 (diff) | |
download | scripts-1ffe58f3ee6eeb2d81729eb7c458a8979eb2df68.tar.xz scripts-1ffe58f3ee6eeb2d81729eb7c458a8979eb2df68.zip |
moved many scripts around, small tweaks/rewrites, mounter verify xsudo and xclick scripts
Diffstat (limited to 'old/mnt')
-rwxr-xr-x | old/mnt | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -0,0 +1,11 @@ +#!/bin/sh +# '/part\s*$\|rom\s*$/!d; s/\s*[^[:space:]]*\s*$/\)/; s/\s/ \(/' # More correct in my opinion, but slower +if partition=`lsblk -npro "name,size,type,mountpoint" | sed '/part $\|rom $/!d; s/ [a-z]* $/\)/; s/ / \(/' | dmenu -p "Choose drive to mount: " | cut -d' ' -f1` \ +&& [ -n "$partition" ] \ +&& mountpoint=`ls -d /media/mnt/slot*/ | dmenu -p "Choose mountpoint: "` \ +&& [ -n "$mountpoint" ] +then + doas mount "$partition" "$mountpoint"; user="$(whoami)"; ug="$(groups | cut -d' ' -f1)"; doas chown "$user":"$ug" "$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 |