[SOLVED] Reorder positions of items in xfce panel settings menu

08-19  Source: Network gathering  Views:141 

Advertisement
Hallo everybody yet again :-)
Just a quick question;
What would be the best (read quickest / possibly not the simplest one) solution for reordering items in my Xfce settings menu user-wide?
Thanks,
Last edited by MatejLach (2012-01-06 12:51:27)
I was just poking around in my /etc/xdg/menus/xfce-applications.menu file. After some experimentation, I was able to figure out how the menu files work for the most part.
You'll need to know the filenames of each of the .desktop files for the programs you want. [Some of them have weird names that are different from the obvious application name. You can get a list of all of them by doing "ls /usr/share/applications"]
The menu format is pretty similar to html. Here's an example menu with two submenus:
I'm not sure if shell-script style comments are allowed in the .menu file, they're there merely for explanation's sake, so you should take them out if you use this as a template.
/home/user/.somedir/silly.menu
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
# This is the top level container
<Menu>
<Name>Top</Name>
# You need these here
<DefaultAppDirs/>
<DefaultDirectoryDirs/>
<DefaultMergeDirs/>
# For include tags, always put <All/> under them so you can match everything and order them manually
<Include>
<All/>
</Include>
# This is the skeleton of your main menu
<Layout>
<Filename>xfrun4.desktop</Filename>
<Separator/>
<Menuname>Cats</Menuname>
<Separator/>
<Menuname>Dogs</Menuname>
<Separator/>
<Filename>xfce4-session-logout.desktop</Filename>
</Layout>
# This is the first Submenu
<Menu>
# Give it a name, and put the .directory file for it here
<Name>Dogs</Name>
<Directory>dogs.directory</Directory>
# Same deal with the include tag
<Include>
<All/>
</Include>
# This is where you put the items for this menu, They'll be in order from top to bottom.
<Layout>
<Filename>medit.desktop</Filename>
<Filename>catfish.desktop</Filename>
</Layout>
</Menu>
# Second submenu, Same thing as the first submenu
<Menu>
<Name>Cats</Name>
<Directory>cats.directory</Directory>
<Include>
<All/>
</Include>
<Layout>
<Filename>pidgin.desktop</Filename>
<Filename>deadbeef.desktop</Filename>
</Layout>
</Menu>
</Menu>
To define custom submenu names and icons, you need to put files for them in /usr/share/desktop-directories. There's also preset .directory files as well if you want to use those.
One of my dummy .directory files:
/usr/share/desktop-directories/dogs.directory
[Desktop Entry]
Version=1.0
Type=Directory
Icon=chromium
Name=Dogs
If you want them in an order that is not alphabetical, you're going to have to define each menu entry separately, like in my little example above. If you want them in alphabetical order, you can edit the .desktop files of the programs you want with your preferred text editor, and put them all in the same category. Then for the <Includes> tag of that submenu, you'd put something like this:
<Include>
<Category>MyCategory</Category>
</Include>
If you do go with this method however, make sure you leave the first <All/> alone in the top-level menu, otherwise, your submenus probably won't appear.
To use your custom menu, you just go into the preferences for the menu plugin, select custom menu, and point it at the .menu that you created.
If you wanted to put a submenu under one of your other submenus, you would put the <Menu>...</Menu> entry for it between </Layout> and </Menu> of the menu you want to put it under.
With this, you can make custom menus on a per-user basis. If I'm mis-interpreting and you want it system-wide, you could just save it as "/etc/xdg/menus/xfce-applications.menu" which is the default menu file for the whole system.
This is what the example menu file looks like like on the panel plugin: http://imgur.com/X9ysj
Last edited by DarkSniper (2012-01-06 05:18:24)
Related articles
  • [SOLVED] Reorder positions of items in xfce panel settings menu 08-19

    Hallo everybody yet again :-) Just a quick question; What would be the best (read quickest / possibly not the simplest one) solution for reordering items in my Xfce settings menu user-wide? Thanks, Last edited by MatejLach (2012-01-06 12:51:27)I was

  • [SOLVED] XFCE Panel Icons 10-11

    Does anyone know why my panel icons are black? Like such: http://i.imgur.com/rhaLd.png I haven't migrated from any other DE, this started happening after I enabled Compiz on startup(https://wiki.archlinux.org/index.php/Co - icon.22.29). Any ideas on

  • [SOLVED] Places plugin xfce panel 11-30

    How do i set to show "Places" instead of the icon forever? I mean i change it in proprietis but next time i login in, it back to the icon... in xfce 4.8 it used to work fine. Last edited by netonardin (2012-12-10 22:50:20)netonardin wrote: Radio

  • How to compile xfce panel with gtk3 support ? 11-30

    Hi, I checked in xfce panel git and it seems gtk3 support has been added but I am not able to install it with GTK 3 support. I tried passing --enable-gtk3 paramater in the autogen.sh file also. I am using xfce4-panel-git package after modifying PKGBU

  • How to change position for items in shopping cart 10-11

    Hello, I am creating shopping cart using flat file. But i am not able to change the position for items i.e. both items contain position as 0000000001. Following are the item details of shopping cart which is created through portal. (from tcode BBP_PD

  • XFCE panel not responding after suspend 10-11

    I've installed XFCE and slim, when I wake up suspended computer XFCE panel behave weird. I can't run any application from launcher in panel, but I can switch between running apps or open panel properties. I think it might be problem with suspending.

  • Can I have window previews with Docky? Or even the native XFCE Panel? 10-11

    In Windows 7, hovering over the window icon buttons will show the preview for the window, is that  possible in Docky/XFCE Panel's Windows Button?Here's some more info, in case anyone has any ideas. I tried reinstalling the Flip4Mac Safari plug-in and

  • [SOLVED] Xfce composite settings are not respected 10-11

    I have come across a problem with the Xfce composite manager. I enable this primarily to have conky draw transparently on the desktop wallpaper, but then found shadows and transparency did not cause much more impact on performance after enabling comp

  • [SOLVED]Problems XFCE4: AWM weather notifications, and no logout menu. 11-30

    Hi. Im having some little problems with xfce, the problems doesn's affect the functionality at all but are starting to be really anoying, since i cannot solve them. Since they are small things, i didn't want to open separate topics for them. If this

  • Font Title Not Displaying in Character Panel Font Menu 10-11

    Just updated to OS X Yosemite and noticed that the font titles don't display in the Character Panel > Font Menu.  However, they do display when rolled over with the cursor.  This is only happening in Illustrator.  All other Adobe apps are correctly d

  • New Menu Item entry in Standard Help Menu 10-11

    Hi experts, I have added a custom menu item under the standard Help menu of SAP using SE41 (Menu Painter) with pragram name: MENUSYST and status: MEN I added the new entry and gave it a function code and activated the function code as well as the int

  • Add new Item to Drag and Relate Menu 11-30

    Hi Dear; 1- how can i add a new item to drag and relate menu? 2- how can i link it to an sql statement? exp: user table (OUSR) best regards;Dany, Currently that functionality is not available using the SDK.  Apologies. EddyRead other 2 answers

  • How to add menu item in Virtual Folders Actions Menu 11-30

    Hi , I am writting a custom component which will add some action on documents and virtual folder. I am able to add the menu item for DocInfo, but not able to add Menu Item in Virtual Folders Actions Menu. Please help!! thanksI am able to add the menu

  • How do I delete items in my Usage settings 11-30

    I can't undate my software due to not enough storage. How do I delete items in Usage settingsThey really need to change the wording: "This update cannot be installed because it requires at least 4.7 GB of storage.  You can make more storage available

  • Can I import a list of services into Group Policy Preferences \ Control Panel Settings \ Services? 11-30

    Hello, We want to control server services with Group Policy Preferences via the Group Policy Preferences \ Control Panel Settings \ Services.  By starting from scratch, I don want to manually add each Service here.  Can I import a list of Services he

  • Help. Need to remove item from the "open with" menu 11-30

    Does anyone know how I can remove an item from the "open with" menu?You could try removing the quicktime .pkg files from the receipts folder in the root library. The system has to go somewhere to determine eligible applications it can use to ope

  • How to Keep Custom Brushes in the Brush Panel Flyout Menu? 11-30

    So I have a set of brushes that I mostly commonly use. However, I still use other brushes on occasion. When I load those brushes, my custom brush set doesn't stay in the flyout menu and I have no choice but to find the brush file and reload it. Every

  • As Reorder items in Query Panel? 11-30

    Good night, use 12c jdeveloper and would like to know how I can sort the items in a query panel. for example: I have the fields in the View Criterial, "id, name, age, gender, telephone", the latter field is a ViewLink to another entity "tel

  • How do i place new item behind an old item on front panel 11-30

    is there a "bring it forward" or "place behind" button.  right now i just cut and paste the old item in front of the new item, but not a good way to do it...if its a shared var in a loop it may land in the wrong place on the block diag

  • [SOLVED] XFCE - Editing Applications Menu 08-18

    Hi there, The applications menu seems to update happily in XFCE when i use pacman.. however pacman has placed some items (eg. XMMS) into an incorrect category (in this case "Other"). How can I edit the menu so that XMMS is placed into the "