суббота, 21 февраля 2009 г.

Fine-grained applications menu

Some time ago I wrote a proposal for reorganizing app menu.

I started implementing it a month ago by writing an alternative applications.menu. As it relies on freedesktop.org spec categories specified in .desktop files, and not all applications are good citizens in that regard, my first steps were to bug application developers to add subcategories to their apps' .desktop files. I also walked through KDE apps and updated their desktop files. All the bugs I reported were fixed, except for the OpenOffice.org one.

Of course, I made a screencast of the results.

I prepared a simple script that you can run [as root] to get same results. The package also contains updated .desktop files (it installs desktop files only for apps present in your system), and it backs up the old kde4-applications.menu (yes, in my debian system it has kde4- prefix).

If anyone likes the alternative layout please let me know.

5 комментариев:

Jos Poortvliet комментирует...

I like it ;-)

I am wondering one thing - if the sub menu has only one item, does it still show? sounds like overkill to me...

If it doesn't, that's smart. Maybe make it even smarter - if the top level has only 2-3 items, and the submenu only 2-3, maybe merge it back somehow? In other words, don't show 2 sub menu's with each 2 items, that sucks!

Анонимный комментирует...

I think this is a good approach especially if you have many menu entries. If you have only 5-7 (yeah, that magic number again), they should not be split up. Or maybe this should be customizable? For example:

- Split submenu in further submenus, if it has more that x entries [default: 7]
- Don't show submenu if it contains x items or less. [default: 2]
- Merge submenu into its parent if it is the only category in the submenu. [default: true]
...

incunabulum комментирует...

I like it, too! Do we see this in KDE 4.3?

The only issue I have is with your "migration" script. Running it, all my custom menu entries that I created for hand-installed apps like eclipse are moved to the "Lost+Found" category. This also happens for entries that do not follow the complete specs. Krusader - installed as package - can be named as example.

Also, I do see a whole bunch of "Not according to spec; missing trailing semicolon" messages. (E. g. for kdevelop entries...)

Nick Shaforostoff комментирует...

@incunabulum: create bug reports for those apps. ask them to include appropriate subcategory to their desktop file, referring to http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html#category-registry

you can find desktop files in /usr/share/applications or via 'locate /usr*.desktop' if you have mlocate set up.

@mutlu_inek: the thing is that this requires additional programming, and I don't have time for that.

Анонимный комментирует...

Very nice! Aion Gold You guys know what buy wow gold you're doing in wow power leveling designing Allods Gold these Allods Gold health status ffxi gil dashboards. Glad EQ2 Gold to see Lotro Gold your taking maple story mesos transparency seriously, and recognizing ROM Gold the benefits of opening eve isk up to your users. It will be an interest case study Lineage 2 adena to see how the (inevitable) next downtime event compares to the swg Credits previous one now that this exists.
er