mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
Partition labels within prompt
Adds an additional column to parse from lsblk to collect partition label. If partition labels exist I probably wrote them and they are probably useful, lets use them I guess.
This commit is contained in:
parent
e82e00d52d
commit
2f95b12a41
@ -16,7 +16,7 @@ getmount() { \
|
|||||||
}
|
}
|
||||||
|
|
||||||
mountusb() { \
|
mountusb() { \
|
||||||
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
|
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $2}')"
|
||||||
sudo -A mount "$chosen" && exit 0
|
sudo -A mount "$chosen" && exit 0
|
||||||
getmount "/mnt /media /mount /home -maxdepth 5 -type d"
|
getmount "/mnt /media /mount /home -maxdepth 5 -type d"
|
||||||
sudo -A mount "$chosen" "$mp" && pgrep -x dunst && notify-send "$chosen mounted to $mp."
|
sudo -A mount "$chosen" "$mp" && pgrep -x dunst && notify-send "$chosen mounted to $mp."
|
||||||
@ -37,7 +37,7 @@ asktype() { \
|
|||||||
}
|
}
|
||||||
|
|
||||||
anddrives=$(simple-mtpfs -l 2>/dev/null)
|
anddrives=$(simple-mtpfs -l 2>/dev/null)
|
||||||
usbdrives="$(lsblk -rpo "name,type,size,mountpoint" | awk '$2=="part"&&$4==""{printf "%s (%s)\n",$1,$3}')"
|
usbdrives="$(lsblk -rpo "name,type,size,mountpoint,label" | awk -F'[ ]' '$2=="part"&&$4==""{printf "[%s] %s (%s)\n",$5,$1,$3}')"
|
||||||
|
|
||||||
if [ -z "$usbdrives" ]; then
|
if [ -z "$usbdrives" ]; then
|
||||||
[ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit
|
[ -z "$anddrives" ] && echo "No USB drive or Android device detected" && exit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user