Saturday, November 15, 2008

Editing the Menu on Enlightenment DR16

Customizing your menu on Enlightenment DR16 is a little different from other Window Managers. Unlike GNOME or KDE, there is no real built-in menu editor. You have to edit a file manually, in a fashion similar to Fluxbox. However, unlike with fluxbox, each Root Submenu has its own directory in ~/.enlightenment/
The default menu directories are:
 
Code:
menus_KDE, menus_GNOME, menus_Other, menus_Epplets
or something like that (this may vary). Then there should be a file called
Code:
file.menu
.
Inside file.menu, there should be lines similar to:
 
Code:
"KDE" "" menu "/home/username/.enlightenment/menus_KDE/index.menu"
In order to add a new menu, you have to do two things:
1)Create a new menu directory
2)Add an entry in ~/.enlightenment/file.menu

Now look inside the index.menu file for one of your menus that is populated. For example:
 
Code:
less ~/.enlightenment/menus_KDE/index.menu
As you can see, an index.menu file takes the form of:
 
Code:
"Menu Title"
"Submenu 1" "" menu "/path/to/menu1/index.menu"
"Submenu 2" "" menu "/path/to/menu2/index.menu"
"Program 1" "/path/to/icon/file" exec "/command/to/execute"
"Program 2" NULL exec "/command/to/execute"
Note that you don't need to have an icon for all of your programs. If you don't have an icon for that particular program, then just type NULL, without quotes.
So here is the full process for adding a new menu called "Utilities", containing the submenus "Filemanagers" and "Terminals":

 
Code:
mkdir /home/joe/.enlightenment/menus_Utilities
mkdir /home/joe/.enlightenment/menus_Utilities/filemanagers/
mkdir /home/joe/.enlightenment/menus_Utilities/terminals/
nano -w /home/joe/.enlightenment/menus_Utilities/filemanagers/index.menu
#inside of nano/vim/etc.#
"Filemanagers"
"Emelfm" NULL exec "/usr/bin/emelfm"
"Rox" NULL exec "/usr/share/rox/rox"
"Gentoo" NULL exec "/home/joe/gentoo-1.1/gentoo"
#save, and exit#
nano -w /home/joe/.enlightenment/menus_Utilities/terminals/index.menu
#inside of nano, vim, etc.#
"Terminals"
"Eterm" NULL exec "eterm -t MySpiffE"
"Aterm" NULL exec "/usr/bin/aterm"
"Xterm" NULL exec "xterm"
#save, and exit#
nano -w /home/joe/.enlightenment/menus_Utilities/index.menu
#inside of nano, vim, or whatever text-editor you choose#
"Utilities"
"Filemanagers" "" menu "/home/joe/.enlightenment/menus_Utilities/filemanagers/index.menu"
"Terminals" "" menu "/home/joe/.enlightenment/menus_Utilities/terminals/index.menu"
#save, exit#
Then restart enlightenment, and everything should be fine and dandy.
 

No comments: