Tuesday, 12 January 2010

Catorise: auto-organise N900 applications

In a brief break from Hermes-related Maemo work, I was inspired by Manfred Weiss' MyMenu to create an auto-organising menu application for the N900:

Catorise organises the application menu to have top-levels corresponding to the sections in Application Manager. Features:

Uses the section icons from the current theme, falling back to the default theme if none available.

Determines an application's section from the same information the packager used when uploading it to Extras.

Keeps track of application installs/uninstalls.

Entirely non-destructive: remove the package and everything goes back to how it was before.

"All" and "Other" sections, just as in the App Manager, to provide additional access routes.

So, with Catorise the section you find an application's icon is the same you used to install it!

It is currently in Extras-devel. This should, therefore, only be tested by people who are willing to suffer potential data loss, hair loss and the eating of babies.

It's largely feature complete, however there are some known problems/future developments:

Applications installed from Ovi will go into the "Other" section, due to the way Ovi on Maemo has been designed. I've some thoughts on how to work around this, though.

Changing the theme will only update the icons on the next application install/removal.

A quick GUI editor could be created to manipulate /opt/catorise/menu which is a simple text file cache to speed-up rebuilding. This would allow the user to shuffle the apps to best suit their use cases.

good idea, and good looking (much than my-menu thaht i've been using a lot) but i've a question :

i've modded /opt/catorise/menu with leafpad in root mode but nothing changed in the menu, so i tried to uninstall an application but nothing append, but the file is just as i modded it so it have not been updated or replaced ...

i'm just trying to reboot or install a program just to see but how can i force the update of the menu ?

it's ok for regenerating menu by using catorise script in root , but i still have another problem : both Web browser and Foreca Weather appears in categories, not even in other or utilities... just in All, what is the problem ?

I know I'm making a fool of myself bringing up the same idea whenever somebody in the communty says "menu"... But anyway:

Wouldn't it be more elegant to encourage package maintainers to add freedesktop.org compliant "Categories="-entries to their desktop files? Yes, for any menu application that would support this now it'd be "dead code" for a while, but in the long run I firmly believe it's just one of these chicken-egg problems that need to be solved by a few brave people taking the lead.

Other mechanisms of course *must* be used as fallbacks. Still I believe it's a bit of a dirty hack to rely on app manager categories for the application menu - as the example with Ovi apps in "Other" shows.

@Oscar; when we chose the package sections we did it to try and align closely with the desktop categories. So, v0.0.3 of Catorise will use them if present. How we encourage devs to use them is an interesting question, however.

@hrw; thanks - I was about to upload a version which did that, and better handled Ovi apps (a starting point, anyway). I'll check your patch to see if there's anything I've missed and get that uploaded shortly.

@TheBootroo; the changes that hrw & I have made will fix both issues.

Suggestions on how to invoke /opt/catorise/catorise on a theme change welcome :-)

v0.0.2 is on its way to Extras-devel. Changelog:Ignore location of 'other' items when reloading cached menu.Add an 'Ovi' category pending better categorisation of Ovi-sourced items.Fix theme handling; credit also to Marcin Juszkiewicz (hrw) for the same.Fix multi-sectioned .desktop files (e.g. Web); credit also to Marcin Juszkiewicz (hrw) for the same.Upcoming work:Use .desktop file categories, if present (the community chose the package sections on Maemo to align with the desktop menu categories on purpose :-))Try and register a DBus service to pick up theme changes.Use the localisation strings from App Manager (although wrapping is an issue in the application menu; in that it doesn't).Further Ovi categorisation work.Try to work out why some people get "More..." ordered alphabetically.

Beautiful.Two imidiate suggestions:- Localization. The categories should be translated like in Application manager. We don't all speak English. For me only "More..." is translated. And I think that one should be titled "Other" like in app manager.- "More..." should always be last and not sorted alphabetically (it doesn't seem to be in your screenshot but it is for me)- Add application to bugs.maemo.org so I can write further findings there :-)

i've installed the 0.0.2 and it work fine for me, but i've a suggestion !

instead of deleting the hildon menu file during refreshing , which causes a few second with no apps at all in menu, a propose to construct file in a temporary directory (e.g. /tmp) and when the script finish, do a simple mv to the right place.doing that the refreshing will seems almost instantaneous i think !

@thebootroo, I don't think that'll help - the problem is hildon-desktop noticing the file changes and rereading it.The actual task of writing the menu is pretty instantaneous. Now, I *think* the level of disruption could be reduced by having each section in its own .menu file (just like the "More..." menu is by default).

I guess that there isn't room to keep it all on one screen, but it would be nice to be able to specify a few apps that would appear in the first row for direct launching (kind of like the "My Selection" folder in the previous Maemo version's app menu)

Wow! I love the feature on tracking of application installs/uninstall 'coz I sometimes having a hard time if I accidentally uninstall an application and then after that, needed it again. This tool is really perfect for my needs. Is it available for other phone as well? Aside from N900? Anyway, that was a excellent idea. Good job!