LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Alphabetize Kmenu items? (https://www.linuxquestions.org/questions/linux-newbie-8/alphabetize-kmenu-items-591814/)

Doug Vitale 10-14-2007 09:08 PM

Alphabetize Kmenu items?
 
How do you quickly put the items in the Kmenu in alphabetical order? In Windows you would right click on the menu and choose "Sort by name" but I don't see any such option in KDE Menu Editor. The items in my "System" submenu used to be alphabetically arranged. Thanks.

TheMusicGuy 10-15-2007 12:49 AM

I'm not sure that you can. There are no obvious options in the K Menu editor or in the K Menu itself. (I could be wrong, but I couldn't find anything.) Of course, you can manually rearrange items, categories, and subcategories using the K Menu Editor without too much trouble.

It might be possible to write a script to automatically rearrange the order of items by scanning and rewriting the K Menu config file (though I don't know what that file is, nor do I know the first thing about it's format).

archtoad6 10-16-2007 04:47 PM

Unfortunately, it's not a file, but files. IIRC, at least 3 layers -- i.e. priorities -- of them. They point to each other, include each other, & supercede each other. A tangled web of XML.

This makes the system very flexible & powerful, but very, very hard to figure out. Go look at kde.org.

If you want to see why I threw up hands when I last looked, start w/ these:
~/.config/menus/ -- esp.
~/.config/menus/debian-menu.menu
~/.kde/share/config/ -- esp.
~/.kde/share/config/kdeglobals
~/.local/share/applications/

TheMusicGuy 10-17-2007 12:47 PM

While we're on the subject...

The other day I deleted some config-related files and managed to seriously mess up my global keyboard shortcuts and erase all custom K Menu entries. It effectively filtered-out anything that wasn't added by a package, etc. That makes me think that manual amendments (I.E. any icons you create or move, or "tweak" through K Menu Edit) are "superimposed" on top of another menu to create the menu that you see in the K Menu. So, yeah, there's definitely some kind of weird hierarchy going on.

I don't remember exactly what I deleted. I was trying to forcibly remove a few rogue icons from the Quick Launcher that kept randomly popping up again after deleting them, even though their respective icons in the K Menu no longer existed.

I hate to say it, but I kind of wish the K Menu and Quick Launcher worked more like the Window$ start menu. (eg. icons in the start menu (K Menu) correspond to nothing more than shortcuts (.lnk or .desktop files) in a folder.) Having all these config files is confusing.

archtoad6 10-20-2007 07:41 AM

Whether you call it "superimposed", "included", "merged", or talk about "levels", the (current [XML]) KDE menuing system is flexible, powerful, complicated, & almost impossible to trace back to the source text files.

TheMusicGuy 10-20-2007 01:45 PM

Heh, yeah.
Do you know where the format and relationship of those files is/are documented?

archtoad6 10-23-2007 05:00 AM

Start at http://kde.org/documentation/ & explore. If you find anything applicable, please post the link.


All times are GMT -5. The time now is 02:38 AM.