Oct 19, 2011

Customize Unity-2D In 11.10

Unity 2D have come a long way from last release, but it still it is not customizable like Unity 3D. You can do basic customization with Unity-2D Settings tool.


You can do more customization if you edit some source files.
Problem with this is that changes that you made are not permanent and they will be changed to default with new Unity 3D updates.

Before you start make backup of these files

sudo cp /usr/share/unity-2d/launcher/Launcher.qml /usr/share/unity-2d/launcher/Launcher.qml-backup
and
sudo cp /usr/share/unity-2d/launcher/LauncherItem.qml /usr/share/unity-2d/launcher/LauncherItem.qml-backup

Launcher customization. 


If you want to customize launcher you need to edit Launcher.qml in /usr/share/unity-2d/launcher.
So to start open terminal and type:
sudo gedit /usr/share/unity-2d/launcher/Launcher.qml 
Colour and transparency: 
Find this part of code and change:

Rectangle {
    Accessible.name: "background"
    anchors.fill: parent
    color: "black"
    opacity: 0.66
    visible: screen.isCompositingManagerRunning
}
colour - is for launcher colour (you can use hex colour code).
opacity - is for launcher transparency.



Now you are only left with launcher border, you can customize it in following part of code:
Image {
    Accessible.name: "border"
    id: border
    width: 1
    height: parent.height
    anchors.right: parent.right
    fillMode: Image.TileVertically
    source: "artwork/background.png"
}
Here you can only change width of border, if you want to change colour and etc you need to change image located in
/usr/share/unity-2d/launcher/artwork/background.png
Now if you want to make launcher transparent best way is to add code for colour and border into comment to it will not be used.
So put
/*
before
Rectangle {
    Accessible.name: "background"
 and
*/
after
source: "artwork/background.png"


Remove trash, workplaces switcher.
If you don’t want trash or workplaces switcher you can remove theme by adding
/*
before
 WorkspacesList {
and
*/
after
  id: trashes



Remove back-light from icons in launcher
For this you need to edit LauncherItem.qml

sudo gedit /usr/share/unity-2d/launcher/LauncherItem.qml
Add
/*
before
 Image {
            id: tileBackground
            property color color: defaultBackgroundColor    
and
*/
after
  .arg(1.0)
            }
        }




0 comments:

Post a Comment