diff options
Diffstat (limited to 'qmenu/qmenu_vm/fqvm_remove')
-rw-r--r-- | qmenu/qmenu_vm/fqvm_remove | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/qmenu/qmenu_vm/fqvm_remove b/qmenu/qmenu_vm/fqvm_remove new file mode 100644 index 0000000..91ff8dd --- /dev/null +++ b/qmenu/qmenu_vm/fqvm_remove @@ -0,0 +1,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 |