Is there a way to have the number of workspaces automatically increase and decrease intelligently?
For example: I set a minimum of 2 workspaces, but if I have windows on those workspaces, a 3rd workspace is automatically created. If I close out the windows on workspace 2, then workspace 3 is removed.
I am guessing you are using Unity. This idea is a feature in the Gnome-3 desktop environment see the right column on the image below - workspaces are added and removed as necessary. In this case there are two, but if the user puts something in the second workspace, a third one is created.). .
To install the gnome-shell, use these commands here:
Then, log-out and before you log back in, change your desktop by clicking on the Ubuntu icon near your login name. Here are more detailed instructions.
If you don't mind puzzling pieces together yourself, you can use
wmctrl
and a bit of bash scripting.wmctrl -d | wc -l
wmctrl -n 4
wmctrl -l
wmctrl -ir 0x0120017b -t 3
Tested on xfce and unity. On unity, however, wmctrl seems to be unable to move xmessage windows.