From cdc480da8f625ebc7a5139cd32aa5c74b38807c2 Mon Sep 17 00:00:00 2001 From: Steven Saus Date: Mon, 8 Apr 2019 11:47:22 -0400 Subject: [PATCH] Added virtualbox-openbox --- README.md | 5 +++++ virtualbox-openbox.sh | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100755 virtualbox-openbox.sh diff --git a/README.md b/README.md index 3ade586..e8516bc 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,8 @@ Multiple scripts that are useful but don't deserve their own repository. Used along with Podfox to create a daily briefing without involving Google or Amazon or Apple. The post detailing this is at [ideatrash](https://ideatrash.net/?p=69528). + +## virtualbox-openbox + +To dynamically create a list of virtualbox VM's (and allow you to run them) +as an OpenBox pipe menu diff --git a/virtualbox-openbox.sh b/virtualbox-openbox.sh new file mode 100755 index 0000000..0f51dac --- /dev/null +++ b/virtualbox-openbox.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# openbox_VirtualBox_pipemenu.sh - VirtualBox launcher for openbox +# initially created 2013 - Ryan Fantus for PlayOnLinux +# + +# command to launch VirtualBox +VBox_launcher_command='VBoxManage startvm ' + +function generate_vbox_menu { + +VBoxManage list vms | awk -F '"' '{print $2}' | while read; do + + echo '' + echo -n '' + echo -n "$VBox_launcher_command '${REPLY}'" + echo '' + echo '' + done + +} + +echo '' +echo '' +# First, we'll create a launcher specifically for PlayOnLinux + +echo '' +echo -n '' +echo -n "virtualbox" +echo '' +echo '' + +generate_vbox_menu + +echo ''