TechFRP Search

Custom Search

Monday, October 17, 2011

Tweak Unity 2D Launcher Urgency Alerts in Ubuntu 11.10

     It's been a while since we last had an update here but when it's time, it's time. The latest version of Ubuntu has been released bringing us the Oneiric Ocelot. I'll have a full review coming soon but there is one thing that was begging to be tweaked in the New Release Now. 

     If you are running a PC that doesn't have the ability to do 3D compositing, (IE Virtual Box) then you will be forced to run the Unity Desktop in 2D mode. While this isn't in itself bad, it does present one problem when it comes to the Launcher bar. When another program is running and is asking for your attention the Launcher bar does a little animation where it pops up the Icon for that App in the Launcher bar and Wiggles it back and forth for a couple of seconds before disappearing.

     That's the way it works in the full 3D mode. In 2D mode things are a little different. Instead of just the Icon peaking out onto your Desktop to alert you, the entire Launch Bar Pops Over your active app. Again this isn't too bad except that for some reason in the 2D mode the Settings for this Popup have been configured for an Unbelievably long time. I've timed it on my test station to 7 or 8 seconds before it slides away out of view again. In the computer world, 7 or 8 seconds is an intolerable amount of time to be interrupted. It really becomes a complete distraction for me when Running TweetDeck which has constant Alert popups happening all the time. Very, Very Annoying.

     ...but Fear not patient readers, there is a way to Tweak this. It is fairly simple and straight forward to do in a few easy steps. As always, you should make backups of any files you make changes to before proceeding. All the steps outlined below have been tested in my Test Lab and been found to work as presented. I am not responsible for any unintended consequences that you may encounter while attempting to apply these steps. All right now, lets get to it. :-)

1     The first thing you're going to need to do is Open a Terminal window.
2     Now you need to make a backup copy of the file in /usr/share/unity-2d/launcher
3     To do this enter the following at the prompt, Remember to use Sudo:
       
        sudo cp /usr/share/unity-2d/launcher/LauncherItem.qml /home/"YourHomeDir"

       You can see the results of the file copy from my Lab here:


4     Now that we have a backup lets edit the LauncherItem.qml file by typing in:
          
          sudo gedit /usr/share/unity-2d/launcher/LauncherItem.qml

          **Remember: Use Sudo to launch Gedit and the filename is case sensitive. **

5     Now if you've typed everything in correctly you should be looking at the Gedit text editor with the LaunchItem.qml file loaded into it.


6     Scroll down the page until you see this area below. It is approx. 3/4 of the way down the page.

7     The areas to Tweak are:

             loops: (urgent) ? 30 : 0
                    NumberAnimation { target: tile; property: "rotation"; to: 15; duration: 150 }
                    NumberAnimation { target: tile; property: "rotation"; to: -15; duration: 150 }

8     Change "loops: (urgent) ? from 30 to 5 to shorten the number of times the animation runs.

9     Change Both of the "NumberAnimation" entries above from 150 to 75 to increase the speed of the Wiggle.

       When done the entries should look like this.

10   Now, Save the file and close Gedit. You now need to Reboot your PC for the Launcher to pick up the changes. You could kill the Launcher app but I like a clean restart when making changes.


     And that is it. The Launcher Urgency Alerts should take no more than a second or two on your screen before they go away which is much more like the 3D implementation of Unity.

Give it a try, I found this to be Absolutely Necessary with the 2D Unity desktop.

If you found this tip useful, please let me know. Leave a comment or give me shout on Twitter @WJGTech. 

No comments:

Post a Comment