Added virtualbox-openbox

master
Steven Saus 5 years ago
parent 2402863dff
commit cdc480da8f
  1. 5
      README.md
  2. 34
      virtualbox-openbox.sh

@ -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

@ -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 '<item label="'"${REPLY}"'">'
echo -n '<action name="Execute"><execute>'
echo -n "$VBox_launcher_command '${REPLY}'"
echo '</execute></action>'
echo '</item>'
done
}
echo '<openbox_pipe_menu>'
echo '<separator label="VirtualBox" />'
# First, we'll create a launcher specifically for PlayOnLinux
echo '<item label="VirtualBox">'
echo -n '<action name="Execute"><execute>'
echo -n "virtualbox"
echo '</execute></action>'
echo '</item>'
generate_vbox_menu
echo '</openbox_pipe_menu>'
Loading…
Cancel
Save