From 01a33ab0913d439150065ac23644c4f140ff8917 Mon Sep 17 00:00:00 2001 From: Casper Date: Mon, 23 Dec 2024 17:13:45 -0700 Subject: added qmenu! --- qmenu/qmenu_vm/fqvm_remove | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 qmenu/qmenu_vm/fqvm_remove (limited to 'qmenu/qmenu_vm/fqvm_remove') 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 -- cgit v1.2.3