samedami 9d56d3e272
Add 'shelp' script
Also add simple description comment to all script.
2020-05-15 20:56:33 +02:00

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"