Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was using GNOME Shell but switched back to Unity due to the amount of screen space I lost using shell. One thing I miss from Shell is the workspace switcher it uses compared to Unity's and IMO, it is better done in Shell. Is there a way to implement that in Unity at all?

share|improve this question
add comment

1 Answer

up vote 14 down vote accepted

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. (You can install it if you don't have it already: compizconfig-settings-manager 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
share|improve this answer
    
That's truly a shame... :/ I constantly have the urge to use GNOME Shell over Unity due to that feature... –  Jordan Dec 13 '11 at 5:39
    
@Jordan I have a partial solution though. I will post it tomorrow :) –  RolandiXor Dec 13 '11 at 6:49
    
Thanks for the partial solution. –  Scott Severance Dec 14 '11 at 0:00
    
@ScottSeverance: You're welcome! –  RolandiXor Dec 14 '11 at 0:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.