Is there a way to disable the workspace switcher in unity launcher? [duplicate]

Solution 1:

  1. To disable workspaces completely
    • See @fossfreedom answer https://askubuntu.com/a/211169
  2. To just remove the icon but still preserve workspaces

    • Open the terminal and execute:

      gsettings get com.canonical.Unity.Launcher favorites
      

    the output will be something like,

    ['application://nautilus.desktop', 'application://chromium-browser.desktop', 'application://ubuntu-software-center.desktop', 'application://ubuntuone-installer.desktop', 'application://ubuntu-amazon-default.desktop', 'application://UbuntuOneMusiconeubuntucom.desktop', 'application://gnome-control-center.desktop', 'unity://running-apps', 'unity://expo-icon', 'unity://devices']
    

    To remove the workspaces icon from the dock you should just take out 'unity://expo-icon' from that list. Taking it out, for this case the command should be:

    gsettings set com.canonical.Unity.Launcher favorites "['application://nautilus.desktop', 'application://chromium-browser.desktop', 'application://ubuntu-software-center.desktop', 'application://ubuntuone-installer.desktop', 'application://ubuntu-amazon-default.desktop', 'application://UbuntuOneMusiconeubuntucom.desktop', 'application://gnome-control-center.desktop', 'unity://running-apps', 'unity://devices']"
    

    (Don't forget the double quotes for the list on gsettings set)

Currently I'm using eight workspaces with the help of Unity Tweak Tool. I like to have multiple workspaces, but didn't like the unremovable Unity Launcher icon that much, even more because it could only resemble four workspaces while I was using eight instead.

Solution 2:

For 14.04

Drag the undesirable icon on the trash can.

For 13.04

By default, the workspace-switcher is not enabled in the Launcher. This setting is toggleable via the Appearance - Behaviour tab in System Settings

Untick the option shown in the following picture to remove the workspace-switcher icon.

enter image description here

12.10

If you are prepared to work with just one virtual desktop (i.e. no additional workspaces) then the following will work for 12.10 and later.

gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ hsize 1
gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ vsize 1

Before:

enter image description here

After:

enter image description here