diff options
author | Casper <me@skylarcloud.xyz> | 2024-12-23 17:13:45 -0700 |
---|---|---|
committer | Casper <me@skylarcloud.xyz> | 2024-12-23 17:13:45 -0700 |
commit | 01a33ab0913d439150065ac23644c4f140ff8917 (patch) | |
tree | 9ad71bd7e6f5a5aad2c2cdbff4bb75de12565998 /qmenu/qmenu_vm/fqvm_remove | |
parent | 7b5a0e9e88f015cb68a46bb657661f4663e287af (diff) |
added qmenu!
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 |