Unity Opera!

Unity Opera Tab Count

With Unity in the recent spot light and a little free time on my hands, I decided it was time to dabble with the Launcher API. What better combination that my two favorite pieces of software: Unity in Ubuntu and Opera!

With my Unity Opera script, you’ll be able to get extra functionality for Opera by simply downloading a script and adding it to your Startup Applications list. No technical modifications necessary!

The Launcher API provides four features at the moment: Count, Progress, Urgency, Quicklists.

At the moment I’m only able to implement functionality for three of these, with the exception being Progress. In its current implementation, Unity Opera has the following features:

Count

The total number of tabs you have open appears on the Launcher icon and is updated in real time as you open and close tabs.

One item to note here is that Opera’s Private tabs are not included in this tab count. Since information about these tabs and their contents are not stored anywhere on your computer, Unity Opera has no way of discovering them.

Progress

At this point in time, the progress functionality for this script is not available. Until I find a way to programmatically determine download progress in Opera, I will not be able to implement this.

If you have any information regarding a way to implement this feature then please let me know!

Urgency

When browsing the net, not every link you click on is from inside the web browser. Sometimes you click a link from an instant message, mail client, Gwibber, etc. This is where urgency comes into play.

Typically clicking these links automatically opens the tab in your browser, but it doesn’t always pull you’re browser into focus. When this happens, you may not know which browser the link opened in or if clicking it was even successful.

When Opera is not in focus and a new tab is opened, the Opera icon in the Launcher now enters urgency mode and wiggles onces. An urgency highlight is also applied to the icon and a small attention reminder in the upper left corner until you focus Opera again (this clears the urgency setting).

Quicklists

Previously I shared a tip on how to customize your Quicklists for Opera. That method meant that you had to manually open and edit the desktop file.

This is no longer the case, as these features are already built into Unity Opera.

On top of that, your Speed Dial items are also appended to the Quicklist, making your life that much easier! ;)

If you use Opera’s built in Mail client, also known as M2, then you will see an Opera for Mail, which is intended to open M2 directly. At the moment, this feature doesn’t work as intended, but hopefully in due time it will.

Download Unity Opera

Unity Opera is written in python and can easily be updated and maintained. I suggest you save and extract it to your Home directory and use it there, but you are free to place it anywhere you wish.

Download

Running Unity Opera

You can run Unity Opera in one of two ways:

1. The easiest way in my opinion is to simply add it to your Startup Applications.

To do this simply open your dash and search for ‘Startup Applications‘. Once there, click ‘Add‘ and fill in the blanks!

To run Unity Opera on startup, I place the script in my home folder. You can place it where ever you wish, but if you pick a place other than your home folder then you will need to provide a full path the script in your startup command.

An example of what I use is as follows:

python unity-opera.py

2. The other option is to open a terminal when you want to use this script and run the command above.

Options

This script has several options. For help and more information type:

python unity-opera.py –help

This script accepts two optional args:

1. Opera Channel: This is used for setting Unity Opera to run against regular Opera and the new Opera Next channel. By default, if you exclude this arg, Opera is set as the browser to run against. Examples of this command include:

python unity-opera.py opera

python unity-opera.py opera-next

2. Enable features: This is used to enable specific features. You can enable only basic quicklists [q], quicklists with Speed Dial entries [qs], tab count [c], urgency notification [u], and progress [p].

As mentioned before, progress is not functional at the moment, but I’ve built the script with this feature ready to include as soon as I find a way. ;)

This second argument requires the use of the first argument. Examples of this command include:

python unity-opera.py opera -qs

python unity-opera.py opera-next -qsu

Troubleshooting

If you experience trouble with this script, please try running it from a terminal to see if there are any errors output to the console. If so, copy and paste these in the comments below and I will take a look at them.

Quicklists for Opera in Unity

Opera Extended Unity Menu

Thanks goes to Jorge Castro and a recent post of his about Quicklists in Unity.

After reading his post and seeing how easy it was to add new Quicklist entries, I decided to give it a go with Opera.

As you can see, my efforts were successful, but there are many more list items you could add to customize Opera’s Quicklist to suit your needs.

Get It for Yourself

If you’re using Ubuntu 11.04 with Unity and want to customize this menu for yourself then just follow follow these simple steps.

1. Open a terminal and type the following (and enter your password when prompted):
sudo gedit /usr/share/applications/opera-browser.desktop

2. Scroll down to the bottom of this open file and paste the following:
X-Ayatana-Desktop-Shortcuts=NewTab;NewPrivateTab;NewWindow;Mail;

[NewTab Shortcut Group]
Name=New Tab
Exec=opera -newtab
TargetEnvironment=Unity

[NewPrivateTab Shortcut Group]
Name=New Private Tab
Exec=opera -newprivatetab
TargetEnvironment=Unity

[NewWindow Shortcut Group]
Name=New Window
Exec=opera -newwindow
TargetEnvironment=Unity

[Mail Shortcut Group]
Name=Mail
Exec=opera -mail
TargetEnvironment=Unity

3. Save and close the text editor. You may need to restart Unity or your computer before changes take effect.

Customize your Quicklist

If you’d like to add more items to the Quicklist, simply add a shortcut name for it in “X-Ayatana-Desktop-Shortcuts" and create a "Shortcut Group" for it.

A couple of things that I considered adding were Gmail and Google Reader so that they simply open in new tabs. I’m sure you can find other useful shortcuts to add or maybe even more Opera command line options!

Remove your Changes

If you don’t like the Quicklist items that you’ve added, all you need to do is open the opera-browser.desktop file and remove the lines that were added. Save, close and voila.

Conclusion

Quicklists are great, but they would be more useful with Opera if we were able to select from a list of open or recent tabs.

The new tab and window shortcuts that I’ve added are enough for me at the moment, but I would really love to see them added by default in the near future!

Windicators

Screen shot 2010-12-29 at 9.51.33 PM

Just a quick thought about windicators that were proposed by Mark Shuttleworth back in May 2010 and similarities to Mac OS X.

It seems that nearly everyone agrees that Windicators in Ubuntu is a bad idea. Not only will they add a little confusion to the Ubuntu learning curve, but they will also just add clutter to the title bar. That being said, I for one would like to see them implemented as long as there is an option to enable/disable them freely.

Over the past year or so, Ubuntu has received a great deal of criticism regarding the placement of the window controls for close, minimize and maximize. If you’ve not kept up with this, basically the controls moved from the right side of the title bar (like in Windows) to the left side of the title bar (like in Mac OS X). I still see complaints about this every other day (even though there are ways to change this already posted throughout the net).

With many people accusing Ubuntu of simply trying to look like Mac OS X, I wasn’t as quick to point fingers and agree. I like to hold judgment on products at least until they are completed or deemed “stable”. Lately, however, its beginning to be a chore to deny this “OS X”-like transition with the changes that are coming in Ubuntu 11.04.

Two major changes in Ubuntu 11.04 include:

  • a new panel that seems more like a hybrid between the new Windows 7 taskbar and the Mac OS X Dock.
  • application menus and application titles in the top panel.

These new changes, paired with the window controls on the left and indicator style menus in the top panel give Ubuntu 11.04 an eerily similar appearance to OS X. Not to mention the windicators (as this post started out talking about)..

If you visit a secure web address in Safari, a lock icon appears in the upper right corner of the title bar to indicate a secure page. I’d not noticed this before, being an Opera fanatic and all, so I’m unable to tell who was first: the idea of Windicators or this feature in Safari.

Safari seems to pull this off well and the icon isn’t in my way at all. This is one reason why I would like to see them appear in Ubuntu eventually, but only if they can easily be disabled and they are implemented correctly.

Last that I heard, Windicators were put on the back burner to let more important features reach the public first (as they should be). Lets just hope that if Ubuntu continues to follow a close path to Mac OS X that they follow a better path. :D

What do you think about the similarities? Too similar? Not similar enough? Not similar at all? Or you don’t care? :D

Interesting Unity Mockup

icontests

As usual, when Ubuntu starts the developmental process on the next best ‘buntu I’m quick to begin testing and eagerly lurking in the forums and launchpad bugs.

The next version of Ubuntu is currently, as you may already know, undergoing some fairly drastic interface changes. Ubuntu will be abandoning the use of the traditional GNOME panels and instead use an improved version of their Unity interface.

Lurking through several bugs on launchpad, I stumbled across an interesting one with one interesting mockup in particular.

While its just a suggestion mockup, I think it actually looks rather slick. I’m not saying its the best approach, but certainly one worth noting! According to a follow-up comment, this design is similar to what Gnome Shell is doing, but I’ve not yet looked into Gnome Shell so I can’t confirm this. Either way, its a smooth approach.

Currently Unity doesn’t have a method of letting you know which application’s menu its showing in the top panel. There is an indicator icon in the side dock/panel, but as best I can tell they are planning to add the app name to the top panel similar to the way Mac OS X handles this. Maybe it will be in some Unity updates tomorrow!