Saturday, 24 February 2007

To Quote Destinys Child...

..."Get on the bus", which, as of revision 125, Awn is on :).

Awn now has a DBus backend! Which brings to life one of my main features for Awn, which was the ability for applications to control their Icons on Awn!

It is *very* new, and I haven't added all of my ideas, but Imy top 3 are now working:

Ability To Change Task Icon
This is especially important for media applications, so they can set the icon to whatever cover-art they have:

Yes, its FutureSex/LoveSounds, and that says alot for my music taste, but leaving that aside for the minute, you'll be happy to know that Mr. Timberlakes cover art is actually the Rhythmbox launcher :).

I basically have hacked the standard artdisplay plugin for Rhythmbox and added support for the cover to be shown on Awn. If there is no cover, it reverts back to the standard icon. I have included it in svn, under the new 'plugins' folder. Installation instructions are also included.

Little Information Bubbles
These would be important for applications such as Evolution, which could show how many unread emails you have:This is not a real-life plugin, its just a demo of what can be done. If I have time, I will make this into a proper plugin.

Progress Information
This is probably my favourite! In-built progress reports into the task icon:

*Update* An example video showing Firefox downloading a file:

This, again, is not a real plugin for Firefox, but demonstrates whats possible.

There is still a lot of work to do, regarding drawing, alignment, etc etc. However, now the basic boilerplate stuff is in, this should be easy to do.

Here are some things that I am going to add over the weekend:
  • Ability to have a small icon composited on the main task icon. Think Epiphany settinging the current favicon onto its task icon.
  • Ability to add menu items over dbus, and listen to their signals if clicked by the user. For instance, menu item for evolution to add a contact, Totem to pause a movie etc.
  • Predefined 'types' of apps, with special buttons, i.e. a MEDIA_TYPE that shows buttons for reverse, play/pause, and forward.
  • Some more styles to display the progress 'bar'.
  • Option to attach a larger pixbuf to the 'tile' which shows on hover. So, Rhythmbox can attach a 400x400px sized album art, which would show with the window title.
Making Your Own
If you want to write a plugin for your favourite app, heres some info that you'll need, the code is in Python, but should be easy to adopt for other languages.

bus = dbus.SessionBus()
obj = bus.get_object("", "/com/google/code/Awn")
awn = dbus.Interface(obj, "")

Gets you the basic awn object.

There are two main ways to get at your task,
  1. By the name of the application (string). This works best for single-instance applications.
  2. By the xid (long), which is best for multi-instance apps , as it will only effect the icon for that window. One way to get the xid is by calling GDK_WINDOW_XID(window->window).
  3. I am adding support for using the pid to reference your application.
Setting Icons
To set the icon for a task, you need to call either SetTaskIconByName or SetTaskIconByXid. In python, it would be :

awn.SetTaskIconByName ("rhythmbox", "/tmp/rhythmbox-album-art.png")


awn.SetTaskIconByXid (long(xid), "/tmp/rhythmbox-album-art.png")

Yes, the second argument has to be a /local/path/to/the/image/file. Using /tmp is the best idea, as it will get wiped when you restart.
You have to call awn.SetTaskIconByName/Xid every time you want to update, even you are using the same file name (recommended as to avoid unneccessary junk in /tmp).
If you need to unset the icon, use :

awn.UnsetTaskIconByName ("rhythmbox")


awn.UnsetTaskIconByXid (xid)

The name may not always match, I am working on this, so be patient if your fav app does not work :).

Setting Information
Setting information is easy:
awn.SetInfoByName ("evolution", "23")


awn.SetInfoByXid (xid, "23")

Unset using:
awn.UnsetInfoByName ("evolution")


awn.UnsetInfoByXid (xid)

Setting Progress
This is very easy:
awn.SetProgressByName ("firefox", 60)


awn.SetProgressByXid (xid, 60)

There is no 'unset' function, just set the progress to 100 to clear the icon of the progress meter.

If you need any help, or need better API, just drop me a line. Also, we have a forum, thanks to Mike Jones (searayman), so if you do make anything based on the DBus backend, post it there so we can all have a look! I'll probably include some plugins with the main tarball, so let me know if you make something.

*Update* The forum seems to be down at the moment, so I recommend using the wiki to upload your creations. Just add a page under the 'DBus Plugins' page, you can also attach files to the pages you create. I have added the Rhythmbox plugin as an example.

*Update 2* Just to annoy me, the forum is actually back up again. So its up to you where you want to post your plugins, forum or wiki, whichever suits you best.

And Finally
I am going to do mass amounts of bug fixing over the next few days, and therefore expect svn to be in a bit of a flux as I sort some things out.

Tuesday, 20 February 2007

Where'd You Go...

...not that far actually, just been very busy at home!

I have, however, had time to straighten up some cool tracker stuff!

Nautilus Metadata Tile
After speaking to Alex in #nautilus, it seems that we could really make something very cool, utilizing nautilus & tracker/beagle. He has given me direction regarding what would be accepted into Nautilus. He had some sweet ideas regarding file previews etc. As far as I know, no other OS has these capabilities. I am going to dedicate a whole entry to it later on in the week, with mockups etc.

Tracker Search Tool (TST)
I have been adding the code from Nautilus Metadata Tile into TST recently, trying to get it in before the 0.6 release of tracker (at the time of writing I still don't know whether it will make it) :(. However, to whet your appetite, I can show you some early screenshots :

As you can see, it works quite well :). The tags bit is my favourite, because it is really simple to add/remove tags:
  • Clicking the "add" button shows you a GtkEntry, where you type in tags separated by spaces, then click "apply" to apply or "cancel" to, er, cancel.
  • The tags themselves are clickable, so they will launch a new TST, and set it to search for the tag.
  • Right clicking the tag gives you a popup, letting you search for the tag, or delete it.
I am going to send the patch tomorrow, and hopefully, Jamie can add it to tracker svn ASAP (if I, you know, haven't broken every single coding rule known to man).

Avant Window Navigator
I have been a bit short of time regarding Awn, but I am dedicating tomorrow to it, so expect some cool stuff (as per usual), and thanks to everyone who has been bug reporting, sending translations and sending patches! Translations and patches will be merged tomorrow. Also, I have a little ace up my sleeve...only thing I can say is that it concerns setting up an array of pixbufs at incremental sizes for the launchers & tasks ;).

Friday, 16 February 2007

Nautilus Love

I've spent some time on the Nautilus Metadata Tile, as I had a few ideas regarding the UI. I can't go over the top with the colours and effects, as I hope one day this can be accepted into Nauitlus main. However, I have messed around with GtkStyle & Cairo, and have come up with this so far:

As you can see, I have just done a simple gradient between the base[GTK_STATE_NORMAL] and bg[GTK_STATE_SELECTED] from the active theme. I think it works quite well in practice, and doesn't 'steal' the focus away from the main icon/list view.

I have also added a GTK_STOCK_EDIT button in the bottom right, clicking this will swap the tags GtkLabel, to a GtkEntry, so you can edit the tags.

I also got round to adding some of the other tiles, and some icon/thumbnail support. Below are some screenshots (with different colour schemes to show how well behaved the gradient is ;).

As you can see in the Image tile, if an image has data about the camera/camera model, the title will reflect this (don't laugh at my camera model ;), exactly like what happens with a music file.

I still need to add the document tile, but I have left that till last because it will have a snippet of the contents, and I need to decide on how to present this!

I am still making code changes, so if you have any more ideas, or want to add anything to the tiles, let me know in the usual ways.

Wednesday, 14 February 2007

Bubbles & more

I have actually been doing some Awn hacking today, and here are some updates:

  • "Text Bubbles" feature is now implemented. You can choose the colour and alpha.
  • "The dock" style arrows have also been implemented.
  • Arrow colour and alpha can be changed.
  • Updated avant-preferences to handle the new options.
*Update* forgot to mention that these features are in SVN, so feel free to test them!!

Heres a clip of the text bubbles (google video page):

No auto-hide just yet, still trying to get rid of the bugs, but hopefully I can commit this soon!

I wanted to know if you guys would be interested in a 'tile' instead of just a text label when you hover over a icon. So this would be like:

| | | Application Name |
| | icon | Launcher details/Window Name |
| | | Some other useful info |

This would be constrained to a certain width and height, But I think it would look quite sweet. It will also be useful when I get round to adding the DBus backend for apps to control their icons.

Let me know if your interested in this feature, and I'll code it.

Tuesday, 13 February 2007

Nautilus & Metadata, love at first sight

Last week, John Stowers and I spoke about Tracker and Nautilus integration. After looking at Affinity and some of my mockups, he pointed me to some excellent work he, and others, had been doing to get Tracker more integrated with the GNOME Desktop.

This gave me some ideas, so I agreed to try and see what I could do to help the effort, and after some pointers from John's current work on emblem support, Jamie's help on #tracker, and a Alex's help in #nautilus, I can bring you this:

What you see there is a 'metadata tile', which goes and fetches metadata from Tracker about the currently selected file in Nautilus. It is all done asynchronously, so you do not feel a difference while browsing, even when you frantically click folder after folder looking for a file (which I still manage to do, even with Beagle & Tracker installed :-s ). Also, if it cannot find any metadata, it will hide itself, letting you have more viewing space.

This is extremely alpha software ATM, so no released code yet, expect some by Sunday/Monday. It doesn't crash Nautilus or anything that sinister, but I need to clean up the code, and also complete support for Documents, Videos, & Images.

You may also notice the little 'Tags' label at the bottom. Well, this works exactly like on all those web 2.0 sites. Clicking the label with allow you to edit the tags in an GtkEntry. You just type in all the relevant tags, separated by spaces, and it will update them for you. This, together with planned better support for tags around GNOME, will have you tagging anything & everything.

Regarding the UI, please bear in mind that this is alpha software ATM, I need to make the edit ting capabilities more apparent for the user, plus the font weights & sizes need to be sorted out. Also, I haven't touched this with cairo yet ;), so expect some 'eye-candy' stuff soon.

The tile also supports folder.jpg/png files, as most of my Music collection & Video collection is organised like this!

Here are some ideas which I am aiming for:
* Beagle support (if possible).
* Let the user specify which fields to show.
* Editing of Tags & Comments (and maybe some other fields also).
* Document tile which shows a snippet of the document (together with the usual Author, Word Count etc).
* Video tile which shows various video metadata.
* Picture tile which shows EXIF metadata, and failing that, basic picture metadata.
* Proper thumbnailing support for PDFs, Videos, Pictures etc.
* Be able to read the album art from the file directly.
* Allow it to be disabled from the menu.

There are more ideas, but I cannot think of them right now! If you have ideas, express them here, or mail me, I am especially open to UI ideas right now, as I want to decide on a set UI scheme soon. I am also intrested to hear what you want to see in the tile for different mimetypes.

That's about it for now, I am going to hack Awn for the rest of the evening, as I have been neglecting it, so expect a blog post for new Awn features sometime soon!

Friday, 9 February 2007

Awn Updates

I've been working hard to make the general usage of Awn a bit better, so here's the newest stuff:

1. Awn itself now has a popup menu, access able from the left or right edge. It has two options for now, Preferences (which I totally missed for some reason, until it was pointed out to me!), and Close, which will close Awn properly, and not kill your tasks that you have launched with the launchers ;).

2. You can D&D to the bar as well now, so basically the two edges are D&D hot spots for launchers.

3. Due to popular demand, the launchers and tasks are now separate. Therefore even if you D&D a application, it will popup on the launchers side, rather than at the end of the bar.

4. Continuing from 3, you can have a visible separator between the two. avant-preferences has been updated to reflect this. You can also choose the colour of the separator. Its only a 1px line for now, but I will make it look better soon. *UPDATE* Not any more, now its much sexier, take a look at the second screenshot!

Also, Awn now has a wiki, which was kindly put together by MikeJones3. So it should be easier for you to discuss ideas and such.

I would also like to say a big thanks to everyone who has commented on my ideas over the past two days! I got Dugg again, I've been twice on Planet GNOME (Jeff Waugh linked to my blog, and just now, Ross Burton has linked to Awn!). Its really cool to be able to read everyones thoughts and see everyones reaction! I promise to make this stuff a reality as soon as I can!

P.S: Maybe its time to put some resize code into Awn:

Wednesday, 7 February 2007

While I have your attention

I've been promising this for a while, below is an account of ideas regarding Awn, the GNOME Desktop, and also some information on future projects.

Awn and the desktop
I have been thinking about Awn for a very long time. Although it is young in terms of releases, its been rattling inside my head for ages, questions like What more can it do with task icons? How else can it fit into the desktop? What else does it need to complete the effect?

Now, below I have included some mock-ups of my ideas. You will notice a little search window in there, well that my friends, is the continuation of Awn, Affinity.

The best way to describe affinity is to say that it will be a front-end to all the information on your desktop, imagine it as 'Planet' to different feeds on your desktop, such as beagle/tracker, recent documents, bookmarks, tags, contacts, etc. It can be called from either a key-stroke or from the gnome-panel. Some features :
* It has search-as-you-type.
* Actions (like typing "" will present you with an option to open it).
* Written in C, its extremely fast, even on a old system.

I haven't released any code yet, but expect some in the next few weeks, once I have cleaned it up. It, like Awn, is in early stages of development, and just like Awn, everyone's views count!

Speaking of Awn, you may have noticed the bar on those mock ups...looks familiar doesn't it? Those are the mock ups I used to make Awn. As you can see, the bar has a mock up for startup notification (the spinner), yes it looks a bit simple now...just wait till I'm done ;).

Below is also a mockup of whats coming in 0.3 for the 'I have a wide screen, cater for me!' guys!

As you can see from the previous mock ups, there are some funky themes in there! That leads me to my next point, which is this: I love having a composited desktop, Awn doing its thing, Beryl throwing windows all around the screen, cairo-clok ticking away, however, in my day-to-day tasks, I am left a bit disenchanted, therefore, as a side project for me to show my cairo/gtk prowess(:p), I am also going to start work on a gtk theme that takes advantage of the composited environment. Now, please bear in mind that a theme has to be used all around your desktop, and I am guessing that any theme that uses extensive cairo drawing + transparency is going to have an effect on your cpu, but I still think its worth it as a proof-of-concept.

Regarding the actual theme, I will have a separate post on that later, but until then, click here to see some of my mock ups (going from pretty standard to extreme). If anyone has ideas, please let me know in the usual ways.

That's enough for now! I have SO many other ideas for desktop linux its not even funny, but I will document them as/and when I have time to implement them. Some are desktop-orientated, but don't worry, most revolve around eye-candy like this:

Anyway, I better get back to Awn...still a lot of features/fixes to write ;).

Please Ignore

Pressing 'Ctrl+S' will publish the post, after 4 years, I still have the windows habit :(.

Tuesday, 6 February 2007

Some updates

People who have been having problems with Awn regarding artifacts appearing on the icons, this has been fixed in SVN. Its an wonder what properly clearing the cairo_context_t will make ;).

Also, I have been working on improving the D&D code, and you can now drop URI's to a launcher and it will start the program with that file. It works quite well around the desktop, i.e. dragging a movie file to the Totem launcher starts Totem!

Also, this works for multiple selections aswell, i.e. high-lighting more than one picture in Nautilus, and dragging it to the GThumb launcher will start GThumb with all the selected files displayed!

You can continue to D&D to a launcher even after it has become associated with another window!

Please bear in mind that not all of the desktop works the same ie. dragging the URL from Firefox to the Epiphany launcher does nothing, however it works if you drag a URL from Epiphany to Firefox! Its up to the application as to how well-behaved it is in a D&D situation. However, I am working to support more targets if I can.

Also, please remember that the launched application is still under the control of Awn, therefore if Awn dies, the application goes with it! If anyone can shed some light how I can launch an application in a way that it survives if Awn closes, I would be most grateful!

I have changed the gconf code , so you should not be getting anymore segfaults after the make install. Some people have commented that it is hard to keep track of SVN changes, so whenever there is a new feature implemented, I am going to add it into the README file, so its easier everyone to know whats new. (I also update the Changelog file, but I can be more descriptive in the README).

Sunday, 4 February 2007

Oh, thats smooth

Well, its finally done! I just committed the smart launcher code to svn! After the rework of the internals (not entirely without its problems), the move to cairo for drawing, and much smoother operations, Awn now has launcher support!

The fine-tuning has yet to be done, but heres the jist of it:

* Drag and drop an Application file (a .desktop file) to any part of the bar (including another task/launcher).
* The launcher will now pop-up at the end of the bar. Ready for you to use it. To show that it is a launcher, it has a little upwards facing arrow at the bottom.
* Right clicking on the launcher gives you an option to remove it.
* Left clicking launches the program. The icon will bounce until the window opens, and suddenly the little arrow is gone, the launcher just like any other task on the bar.
* Right clicking now presents you with the normal window menu.
* Upon closing the application, the launcher will revert to its previous state, and the little arrow pops back to tell you its a launcher again!

A demo (click to go to download site):
Bear the usual in mind when watching the video (ie. jerkyness is not apparent in real-world use).

Now as this is new, here are a few facts/known issues:

* Your launchers data is automatically kept in a gconf uri list, but yuo cannot modify it outside the program (in the sense Awn will not read the modified code until it restarts, not that it will blow up your computer, I waiting for svn revision 88 to do that)
* ATM, the code that associates a launcher with a launched application works about 90% of the time, but some applications have a special way of spawning, which confuses Awn. A good example is Realplayer, which you will execute as 'realplayer' but will run as 'realplayer.bin'. If this occurs, you'll just get another task on the bar.
* ATM launched applications are connected to Awn, so if you exit Awn, say bye bye to the applications which you lauched using Awn (its a new idea I had to keep people using Awn).

Also, apart from lots of small fixes, I have added support for _NET_WM_ICON_GEOMETRY XProperty (thanks to Quinn of Beryl Project). This is basically what tells the window manager where the windows icon is on screen, so the WM can do its effects (such as Beryl's Magic Lamp effect). This should also allow some of the new Beryl plugins, like the live-thumbnailer, to work, although I need feedback on this.

A quick vid (click to go to download site):

Well, thats it for now, its 02:38, and i'm off to bed!

Friday, 2 February 2007

New code

Since changing to GObject based code for the task-manager (what keeps track of open windows) & task (a representation of on window on the bar), I can say that Awn feels much more resilient! Especially when opening and closing lots of windows. I am experimenting with the idea of the bar knowing when you have opened lots of windows, and therefore skipping the effects, to make it feel slightly faster.

Each 'Task' is actually a GtkDrawingArea, which is then made transparent, and the Task's icon is drawn onto it, using with necessary padding for the effects. Speaking of effects, moving to Cairo for the rendering is allowing much more freedom regarding what effects you can do. I will be demoing some ideas later on, but for now:

This is the current open and close effects, the idea being that the icon 'pops' in at the bottom of the screen, and then 'evaporates' away when you close the window.

P.S. Excuse the jerkiness and the redrawing you can see of Gtk, lets just say I am not developing on the fastest of machines, just be sure that it is not as jerky in real life!

Thursday, 1 February 2007

Sweet mother of all that is holy!

756 Diggs and counting for Awn!
I now feel I should have tried harder with the website ;)

Anyway, I feel this is a good a time as any to clear some things up:

1) I don't work for Google (I wish I did :), but do use their excellent project-hosting services.

2) This differs from previous docks in that it is firstly a task switcher, just like the task list in GNOME, and therefore it will keep track of all open windows on the desktop.

3) Although this look like the MAC OS X dock, it does not try to imitate it. Awn is fully configurable, it has planned features not available elsewhere, such as the ability for applications to control their icons through dbus, and allow progress indicators on the icon.

4) Launching applications from Awn and tracking the application windows (like 'The Dock') is planned, and is being implemented as we speak.

5) The dependency on a patched libwnck is not required in svn.

6) I you are getting a segfault, this is a problem with schema installation, and can be overcome by entering the 'data' directory (after make install), and executing:
$  gconftool-2 --install-schema-file=avant-window-navigator.schemas
Also, if you are using svn, be sure to try the new task-manger launching Awn like this:
$ avant-window-navigator -x