9d56d3e272
Also add simple description comment to all script.
13 lines
321 B
Bash
Executable File
13 lines
321 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Umount partition menu.
|
|
|
|
data() { lsblk -r | awk '/t \// { print $1 " - " $7 }' ;}
|
|
m() { rofi -dmenu -i "$@" ;}
|
|
|
|
part="$(data | m -p "Partition" -l "$(data | wc -l)" | awk '{ print $1 }')"
|
|
[ ! "$part" ] && exit 1
|
|
|
|
pass="$(m -l 0 -p "Password" -password)"
|
|
echo "$pass" | sudo -S -v && sudo umount /dev/"$part"
|