2020-05-15 13:00:36 +02:00

11 lines
295 B
Bash
Executable File

#!/bin/sh
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"