Is It possible to make workspaces in Unity act like they do in GNOME Shell?

Problem:

Unfortunately not yet. There has been some talk about dynamic workspaces in Unity, but I don't know of any concrete plans for this as yet.

Partial solution:

While dynamic workspaces is not yet a feature of Unity, you can get a similar feature pretty easily. This solution uses a script that was posted on Webupd8, so I cannot take the credit for the actual script and .desktop file, but the Keyboard Shortcut method is mine.

First create a script (text) file with this content:

#!/bin/bash

case $1 in 
rows)t=v;;
cols)t=h;;
esac;

check=`gconftool-2 --get /apps/compiz-1/general/screen0/options/${t}size`

if [[ ! ($2 = - && $check < 2 ) ]]
then
    [[ $2 = [-+] ]] && gconftool-2 --set /apps/compiz-1/general/screen0/options/${t}size --type int $(( $check $2 1 ))
fi
  • Save it as workspaces (no file extension).
  • Right click on the file and click properties.
  • Mark it as executable in the file properties.
  • Now move it to /opt:
    Either:
    • Run sudo mv workspaces /opt in a terminal,
    • or press alt+f2. Type gksu nautilus /opt. When the new window opens, cut and paste the script into that folder.

Keyboard Shortcuts Method:

Now, you can assign some shortcuts to enable adding and removing workspaces.

  • Open System Settings.
    enter image description here
  • Click on "Keyboard".
    enter image description here
  • Go to "Shortcuts".
  • Click "Custom Shortcuts", and click on the plus button (highlighted).
    enter image description here
  • You can choose your own shortcuts that suite you, but here is what they need to contain (One command per shortcut):

    1. /opt/workspaces-shortcuts rows + | (Adds a row)
    2. /opt/workspaces-shortcuts cols + | (Adds a column)
    3. /opt/workspaces-shortcuts rows - | (Removes a row)
    4. /opt/workspaces-shortcuts cols - | (Removes a column)

Quicklist Method:

You can create a .desktop file that does all of these functions for you in two clicks.

Create a new text file and enter the following:

[Desktop Entry]
Version=1.0
Name=Workspaces
Comment=Change Workspace Numbers
GenericName=Workspace Editor
Terminal=false
Type=Application
Icon=desktop
X-Ayatana-Desktop-Shortcuts=AddRow;RmRow;AddColumn;RmColumn;

[AddRow Shortcut Group]
Name=Add Row
Exec=/opt/workspaces-shortcuts rows +
TargetEnvironment=Unity

[AddColumn Shortcut Group]
Name=Add Column
Exec=/opt/workspaces-shortcuts cols +
TargetEnvironment=Unity

[RmRow Shortcut Group]
Name=Remove Row
Exec=/opt/workspaces-shortcuts rows -
TargetEnvironment=Unity

[RmColumn Shortcut Group]
Name=Remove Column
Exec=/opt/workspaces-shortcuts cols -
TargetEnvironment=Unity
  • Save this file as workspaces.desktop and mark it as executable.
  • Move the file to ~/.local/share/applications.
    • You can do this by opening the file manager, pressing CTRL+L (the letter) and typing the address (it will autocomplete), then pressing enter.
  • Drag and drop the file to your Unity launcher.
  • When you right click on it, it will give you the option to add or remove rows and columns of workspaces.
    The Quicklist

How to make it more like GNOME Shell:

  • Open Compiz Config Settings Manager (install if you don't have it already)

    sudo apt-get install compizconfig-settings-manager
    
  • Go to General Options and click Desktop Size. enter image description here

  • Set the "Horizontal Size" to 1.
  • Set the "Vertical Size" to 2.
  • When you need more workspaces you can use your Keyboard Shortcut or the Quicklist.
    Workspace demo