summaryrefslogtreecommitdiff
path: root/keyboard/umnt
blob: d43297d4b5aad5468bae42cc5c7c272d451e450f (plain)
1
2
3
4
5
6
7
8
#!/bin/sh
exclude='\/boot\/|\/home$|tbhdd$|\/$'
if mountedpartition=`lsblk --noheadings --paths --raw | awk "/part .+/ && !/$exclude/ "'{ print $1, "(on", $7 ")" }' | dmenu -p "Unmount Device... "`
then
	doas umount "`echo $mountedpartition | sed 's/ .*//'`" \
	&& notify-send --urgency low "Device Successfully Unmounted" "Partition \"$mountedpartition\" successfully unmounted" \
	|| notify-send --urgency low "Error Unmounting Device" "Could not unmount partition \"$mountedpartition\""
fi