diff options
Diffstat (limited to 'qmenu/qmenu_vm/fqvm_run')
-rw-r--r-- | qmenu/qmenu_vm/fqvm_run | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/qmenu/qmenu_vm/fqvm_run b/qmenu/qmenu_vm/fqvm_run new file mode 100644 index 0000000..18db4f3 --- /dev/null +++ b/qmenu/qmenu_vm/fqvm_run @@ -0,0 +1,14 @@ +if user=$(printf 'Default user\nRoot' | dmenu-unlinked -i -l 2 -p "Run commands as:"); then + + [ "$user" = Root ] && as_root='-u root' && user=# || user=$ + + commandtr=1 + + while [ -n "$commandtr" ]; do + + if commandtr=$(: | dmenu-unlinked -p "[@$qube]$user"); then + + qvm-run -q $as_root "$qube" "$commandtr"& + fi + done +fi |