
3d-Desktop
----------

3d Desktop is a GNOME OpenGL program that allows you to switch virtual
desktops in a 3-dimensional way.  The default "visualization" maps
your screen onto an N-sided "carousel" which is rotated to select the
next screen.  The face is zoomed in and out to make your desktop
appear to be actually in a 3d environment.


Requirements
------------
  OpenGL/Mesa (Hardware acceleration is strongly recommended)
  GLX
  XF86VidMode extensions (XFree86-devel)
  Image Magick is required for capturing your screen for the textures.
 

Installation
------------

To build, install and setup:

  tar zxvf 3ddesktop-x.y.z.tar.gz
  ./configure
  make
  make install
  Bind a key to /usr/local/bin/3ddesk  


Add a global keybinding ("shortcut") via the window manager to run
/usr/local/bin/3ddesk.  Something like C-M-s (Control-Meta/Alt-s) or
whatever won't conflict with anything else.  When you press this key
combination 3ddesk starts up and zooms out to show you the "3d
visualization" of your desktop.  Then you select the screen you want
to switch to by pressing ENTER.

In Gnome/Sawfish you can add keybindings by going to the Gnome Control
Center (gnomecc) --> Sawfish --> Shortcuts --> Add --> "Run Shell
Command"

Do "3ddesk --help" for some options.




**NOTE** When you start 3ddesktop it can only take a snapshot of your
current desktop -- there is no way to get the other desktops until you
move from them using 3ddesktop.  Your other virtual desktops *will*
show up but only *after* you've been to them.

The texture for the current desktop is acquired when you start 3ddesk
so once you start 3ddesk from each virtual desktop your screens will
all show up.  They will only stay consistent if you only use 3ddesk to
switch desktops (if you don't use deskguide).  Mess around with it
you'll see how it works.

This was developed using Redhat 7.1 and 7.2 on GNOME using sawfish.
It does NOT work in KDE ... yet.  If anybody has knowledge about
switching desktops in KDE let me know.


Control
-------
KEYS:
Left .................... previous desktop
Right ................... next desktop
Down .................... previous desktop
Up ...................... next desktop
1-9,0 ................... go to desktops 1 thru 10
Enter,Space,Escape ...... choose current desktop
     
MOUSE:
Left button ............. previous desktop
Right button ............ next desktop
Middle button ........... choose current desktop
Wheel down .............. previous desktop
Wheel up ................ next desktop



Window Managers
---------------

All the window managers seem to have different terminology for what
they call virtual desktops/viewports/workspaces.  Here is a breakdown.

GNOME:

In general you can have a grid of "areas" made up of some number of
rows by some number of columns.  Then you can have "workspaces" which
are some number of layers of these grids.  So if you have a 2x2 grid
of areas and 2 workspaces you have 8 virtual desktops (4 areas per
workspace times 2 workspaces).

Right now 3ddesktop will display each row one after the other linearly
- sort of unrolls time into a line.

3ddesktop can be told to use the layered workspaces instead of the
grid of areas with the command line option --workspaces.  You can use
3ddesktop to switch between areas or you can use it to switch between
workspaces but not both (not yet!).  Things get weird if you try to
use both.

   Enlightenment:

   In Enlightenment, the workspaces are configured in the "Multiple
   Desktop Settings" dialog as layered virtual desktops.  You
   configure the areas as a grid in the "Virtual Desktop Settings"
   dialog.

   It is recommended you turn off the "Slide desktops around when
   changing" option in Special FX Settings.  This has an unnatural
   effect when using 3ddesktop (thanks Nick!).

   WindowMaker:

   WindowMaker only supports workspaces and calls them by the same
   name.  To my knowledge you can't do any kind of "area" or grid
   setup.  Use the --workspaces option.

   Sawfish:

   In Sawfish you go to the configuration section called "Workspaces"
   and the grid size of the areas is specified with the columns and
   rows values.

   Not tryed: fvwm, icewm, twm, fu-wm, yada-wm etc...

KDE:

I have not been able to figure out how to get desktop switching to
work yet in KDE.




Other random comments
---------------------

This is my first OpenGL program so I'm sure there are lots of things
that aren't perfect or need work.  I'm open to any kind of feedback
positive or otherwise.  Please let me know your thoughts at
bard@systemtoolbox.com

The desktop switching is done with code based off of STPH by Rob
Hodges.  See http://stph.sourceforge.net/ for more info.  Thanks Rob!

For some fun try a command line option like: 
   3ddesk --mode=linear --nozoom

Do 3ddesk --help for more command line options.

There are several things that I know need work.  (See the TODO file)

The biggest issue right now is the load time.  The reason it takes so
long to startup is because it has to take a screenshot.  Right now I
call "import" (ImageMagic) to create a file in /tmp/.3ddesktop-user
and then read the file into shared memory.  I would like to do the
screenshot directly into memory and optimize the screenshot stuff
possibly sacrificing quality for speed.  Maybe have like a daemon that
updates bits and portions of the screen in the background kinda like
the desk-guide.

Anyway because it takes a bit of time to activate (its not snappy -
like 1 or 2 seconds on my AMD 1ghz) its not really that usuable when
you want to switch between viewports a lot.  I am going to try to
speed it up.

If you are going to mess with the texture size you may need to delete
the shared memmory with "./3ddesk --delshm".  The size of the shared
memmory is directly related to the texture size.  Texture size must be
in powers of 2 (ie 256, 512, 1024 etc).

I switched from using GLUT to using GLX and XF86VidMode extensions to
fix some fullscreen problems.  The problem was that with
glutFullScreen (and game mode) any gnome panels that were "autohide"
would show up on top of 3ddesktop.  Additionally the window
decorations in enlightenment were staying visible.  So by using GLX
and XF86VidMode both these problems were solved.  In addition I was
able to hide the mouse pointer.  If somebody can show me how to do
this in GLUT I'd use glut.


Brad Wasson
bard@systemtoolbox.com





Contributors
------------
Nathan Grennan
 * support additional rows of areas (verticle areas)
 * change to use /tmp/3ddesktop-user

Bryan Smith
 * goto_face()

hope I didn't miss anybody - let me know


Reported successful operation on
--------------------------------
Redhat 7.2
Redhat 7.1
Mandrake 8.1
Gnome 1.4
Gnome 1.2
Enlightenment
WindowMaker
Sawfish
16MB nVidia Go Mobile
64MB nVidia GeForce3
32MB nVidia GeForce2 GTS
nVidia Riva TNT2
FreeBSD (wo!)


Wow, you made it all the way through, I'm impressed!

