summaryrefslogtreecommitdiff
path: root/qmenu/qmenu_vm/fqvm_remove
blob: 91ff8dd06a6ab5ea4a958bccbef08c23975cfa65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
if qvm-check -q --running "$qube"; then

	echo Go back... | dmenu-unlinked -p "$qube needs to be powered off, in order to be removed." > /dev/null 2>&1
else
	confirmation=$(: | dmenu-unlinked -p "Enter the name of the qube '$qube' in order to remove it:")

	if [ "$qube" = "$confirmation" ]; then

		if nyprompt "Are you sure you want to remove '$qube' permanently?"; then

				unset chosefrom

				rm -f "$HOME/.local/share/qubes-notes/$qube"

				$(qvm-remove -f "$qube" || notify-send -u normal "Error: Failed to remove "$qube"!")&
		fi
	fi
fi