VirtuaSam is a Samurize plugin to interface with the virtual desktop manager VirtuaWin.
As such, it can be seen as two things:
VirtuaWin has no graphical interface of its own. It is controlled with the keyboard or through a systray icon, or as in this case, with an external application. This makes it an ideal companion for Samurize, providing virtual desktops integrated in your Samurize config.
VirtuaSam is freeware.
Unpack the zip-file into your Samurize directory.
You should now be able to use the VirtuaSam plugin in the Samurize config tool. You should also have a sample config called 'VirtuaSam' which demonstrates the various features of the plugin. You can study it for reference, or use it as a basis for your own config.
Remember, you must have VirtuaWin installed and running for this plugin to work.
At this point, you should be familiar with making configs in Samurize. If not, check out the Samurize site for docs and tutorials etc.
Tip
You can have different images for each control by naming them desktop1current.png, desktop1.png, desktop2current.png, desktop2.png etc.
The virtual desktop controller is made by adding an individual plugin meter for each desktop. The meter can be any display type that accepts text as input, but you will probably want to show an image.
Prepare two images, one to show when the desktop is current, and one for when it's not. Which one is shown is determined by making the return value from the plugin part of the name, so the naming is important. You can call the first one desktopcurrent.png and the second one desktop.png (assuming it's png files).
Follow these steps to create a virtual desktop controller in your config:
Now you have a meter showing desktopcurrent.png if desktop 1 is the current one, and desktop.png if it is not. But you're not finished yet. You probably also want to be able to switch to desktop 1 when you click on the meter. This is done by setting up VirtuaSam as input plugin for the meter.
Tip
Adjust the refresh interval for the meter for faster update when you switch desktop (Remember to adjust the display refresh for the project as well). It wont make the switch faster, but you will get faster visual feedback.
Now you can switch to desktop 1 by left clicking on the meter.
You might have noticed the input option called 'Drag and Drop'. If you add this option as well, you will be able to drag and drop files on the meter, and have them launched on the corresponding desktop. Just repeat step 8-11, but select 'Drag and Drop' in step 11.
When you're done with the control for desktop 1, copy/paste the meter and adjust the parameters for the 'isCurrentDesktop' function for desktop 2, 3, 4 etc.
As of version 3.1, VirtuaWin can generate screenshots of your Virtual desktops. This feature can be used in VirtuaSam to get desktop screenshots to represent your virtual desktops.
The VirtuaWin image generation has to be triggered from VirtuaSam, so you need to create another plugin meter to take care of that.
The function will return OK or ERR to make it easier to test your config. You probably don't want to see that when you're done fiddling around, so you can either put the meter behind another meter, or delete the %v from the 'Text' field on the 'Display' tab.
Tip
The screenshots generated by VirtuaWin are not antialiased. To get antialiased images in Samurize, set the image height to e.g. 4 times the desired height, and let Samurize do the antialiasing.
To put the actual screenshots in your config, add a plugin meter for each virtual desktop:
You can add input events to switch between desktops on the screenshots, but you probably want to be able to see which desktop is the current as well. This can be achieved by adding a meter with isCurrentDesktop, as described above. Place the meter on top of the screenshot, and use semitransparent images, so that you will still be able to see the screenshots of the inactive desktops. Check the sample config for an example.
The plugin provides four source functions:
Check if the specified desktop is the current one, and return one of two strings, according to the result. Takes the following parameters:
Tells VirtuaWin to generate a screenshot of the current screen.
Parameter:
Returns OK or ERR to indicate the result of the operation.
Returns the path of the screenshot generated for the specified desktop.
In fact, it doesn't return the actual path, but tries to reconstruct the path where VirtuaWin saves it's data. It works for me on both Windows XP and Vista, but if it for some reason doesn't work for you, just find the images yourself and use the actual path in your meter.
Parameter:
The plugin also functions as an input plugin. It provides the following actions:
1.1: |
|
---|---|
1.0: |
|
Homepage: | http://niboan.dk/virtuasam.html |
---|---|
Main site: | http://niboan.dk/ |
email: | niels@niboan.dk |
Jabber: | niels@niboan.dk |
ICQ: | 64338027 |
MSN: | niels@niboan.dk |
AIM: | niboan |