Friday, 9 March 2007

Awn Updates

I've been spending all of my free time on Awn recently, cleaning up the code, adding some missing features, and merging some excellant patches, here's a breakdown:
  • Merged a patch by Chirstian Kirbach which cleans up a lot of warning during compilation
  • Fixed a mem leak caused by applications which change their icon many times (ie. Gimp). Also, on my system, g-s-m reports Awn using only 2.6Mb after several hours usage :).
  • Separator will position itself correctly when adding new launchers
  • Fixed bug when closing lots of windows at once, and Awn getting 'stuck'
  • Merged a patch from James Willcox which makes the icons actually 'bounce' on hover, rather than go up & down. I blame him for wasting the next 30 mins of mine as I sat there watching the icons bouncing ;)!
  • When in auto-hide mode, the bar will pop-up when you are dragging a file
  • Launcher icons will change when you change your theme (GNOME/Gtk)

Last week I was talking about having the ability to add menu items to the popup menu of a task through D-Bus, well, now its here!

I have added another Rhythmbox plugin under the plugins/Rhythmbox directory. It's called awn-menus, and you have to move the awn-menus.rb-plugin & awn-menus folder to your ~/.gnome2/rhythmbox/plugins. Heres a preview:



AddTaskMenuItemByName ("rhythmbox", "gtk-media-previous", " "):
where arg1 is the name of the task, arg2 is optionally a gtk-stock-id, and arg3 is a normal name (if you can't use a stock id).

AddTaskCheckItemByName("rhythmbox", "P_lay", False):
where arg1 is the name of the task, arg2 is a mnemonic name for the item, and arg3 is a bool, as to whether it is 'checked' or not.

Both return an ID integer. You then listen for "MenuItemClicked" & "CheckItemClicked" signals on com.google.code.Awn. The "MenuItemClicked" will come with one arg, which is the ID, so if it matches your ID, you should do something. "CheckItemClicked" will come with two args, the ID, and a bool telling you whether the check is active or not.

You can also use AddTaskCheckItemByName ( name, ID, bool) to set the check from your plugin after you've created it. The rhythmbox plugin is the best example, so have a look at it ;). At the moment, I have put a limit of 5 extra items per task, as I think more than that looks a bit over-the-top. I still need to add the code for removing an item, and disabling an item.

Okay, thats it for now, expect lots more bug fixes over the weekend, and some brand new auto-hide code!

20 comments:

pollycoke said...

Neil, Excellent as usual!

Now I think AWN si beginning to need a visual identity of its own, mimicking the macosx dock is now a limitation IMHO.

Have you got plans in that regard?

Thanks, all the best :)

Michael Croes said...

Nice additions, will try to fix the issues the gaim_awn plugin has and then add support for some of the new features... Good work, keep going on!

Anonymous said...

Hmm, I really wonder if it is such a good idea to use D-Bus for these kind of things? I mean, the property system of X11 is pretty extensible, so why not add the supported actions as X11 props to the windows? Seems much more natural to me, and would make it a lot easier for other programs (including window managers) to make use of these features.

Especially stuff like the progress dial in your last demo seems to be stuff that would perfectly fit into a single x11 property.

Also X11 is perfectly network transparent, while D-Bus is not. (at least not yet in a usable way)

To D-Bus people everything looks like a D-Bus problem, I guess. ;-)

Peter StJ said...

Hey, great additions.
I have a question: what happened with the scale functionality. People like me with small displays (1024x768) are having problems fitting all open windows on the bar I guess, at least I have, for example when I open Gimp + several browsers two or more icons are off screen.

Also I do not know how you mesure the memory used but after half an hour work gnome-system-monitor shows:
VIRT:38MB
resident:11MB
Shared 7.8MB
Not that I care, Just to let you know. The build is from ... a few hours before this post and with the new SVN version:)

Please please please, make this bar able
to scale down, I cannot access all my icons;)

Anonymous said...

Very cool! I bet you'll be glad to get AWN off your plate for a while, freeing time for other projects.

One thing I think would be really nice would be to have an Ubuntu .deb package of AWN once you think it is to a "1.00" type state.

I am unsure of all the details related to creating a .deb or I would make one myself. checkinstall might be all you need.

Once you think AWN reaches a fairly stable (both feature wise and crash wise) point you could probably ask one of the people who frequent here if they would make a .deb. All we need is a nod :) .

Cwiiis said...

awn is very cool - Any chance of getting multiple-monitor configuration options? My 2nd monitor is the monitor I want awn to be on, but it always appears on the 1st...

Jérôme said...

Hello,

Are you planning to make composite optionnal? Could it be possible not to have beryl/xcompmgr/compiz running?

Docks like gdesklets/adesklets have done it, it could be nice to have it, even without transparency and bouncy effects... Just to use it :)

Thanks

Neil J. Patel said...

@pollycoke: Hi! I have a few ideas, especially regarding widescreen monitors etc, which kind of break's away from the 'dock' look. I hope to make some mockups soon. If you want to discuss your ideas, email me at njpatel_AT_gmail_DOT_com :)!

@michael: Sweet, can't wait to try it out!

@anon: The reason for using D-Bus was that and app/plugin could use it, for instance there are some plugins which are shell scripts, that use dbus-send. However, you do have a point, especially regarding that if there was a standard of some sort, then maybe other window lists could have the same functionality.
I'll def. look into it.

@peter: Don't worry, I am woring on it, and its coming very soon!

@anon2: I hope to make a 0.2 release soon, but I want to make a few things more robust, and make a few more enhancements, such as the resizing of the bar when it gets to big for the screen.

@cwiiis: It dosn't sound to difficult, I'll see what I can do!

@jerome: I hope to for the 0.3 release. It requires some extra work in regards to effects etc.

Jérôme said...

Ok thanks!

Great app by the way, I forgot to tell it!

Thanks for your work!

Anonymous said...

Hi!!great work neil!!
what about Affinity???..I'm still waiting for it!!are you working on it?
Thanks a lot!

Jon said...

I've just checked out from svn and I can't see that plugin for rhythmbox - nor is it there on the google code web version. I love the work you're doing on AWN, keep it up!

Anonymous said...

i'm really missing the option to resize the docker.
i don't use awn because it is way too big and the icons look extremely ugly.
anyway it's the best docker for linux i've seen so far. good work!

bato said...

Great Neil! As usual!

AWN is growing very well, now I always use it! I realized a plugin to Exaile that show the progress of the songs. It's work very well but the progress is showed in a circle (AWN.SetProgressByName) and so a great part of album cover is coverd. I would like to have a horizontal progress bar in the bottom for this kind of things. Is it in your plan? (I whish!)

Thanks for all your excellent work!

Anonymous said...

SOrry I cant find the new rythmbox plugin that adds menu items. I used svn chechout and also the web interface to subversion but there is only the original album art plugin

spookykid said...

This little program is one of the best things i've ever found, if it had a workspace switcher and a system tray i wouldn't need gnome-panel any more. Hurray for AWN :-) Hell, i would just need nautilus, xterm and AWN and I'd be set for Desktop domination. Keep up the good work.
Ohhh and maybe in the taskbar instead of icons it could have a preview of the running application, that would be perfect!!! Thank you for this software.

Jon said...

Now the plugin code is there, I've been trying out with rhythmbox and got one bug - the icons for the awn-menu plugin do not appear after minimising rhythmbox to the system-tray. I've submitted a bug report to google code as well.

Anonymous said...

Mh, i'm playing with the new "bouncing" feature and.. I don't like it very much. The "bounce" effect looks really "heavy" and launcher-icon get a bad "blur" effect when bouncing.. :(

Sebastian said...

First of all, exellent work.

The avn works well on xfce 4.4 with composite enabled (aiglx/radeon), but there is one little problem. The range around the dock is always on top and it is not possible to select something within this area. Here is a screenshot, the composite is disabled to show the area (the black around the dock). Perhaps you already know this.

In regard to plugins, do you know something about a plugin to control mpc?

Thanks, best regards

Sebastian

drShop said...

WooW =)

sdelano said...

I agree 100% with Sebastian. I am using OpenBox + xcompmgr + AIGLX/radeon and getting the same disabled effect at the bottom of my screen. Pretty shitty, especially when my browser window is down there and I am trying to click on a line or use the horizontal scroll bar on an image or something. Is this a bug? I haven't heard of it anywhere else.

Thanks....Great Tool BTW