JTL's Home Page

University of Manchester
Department of Computer Science

AnotherLevelUp Advanced Users

AnotherLevelUp Home Page

AnotherLevelUp is at the stage when many of the typical configurations users wish to make can be achieved through the provided menus. However, it is still under development, and in any case, there are likely to always be some configurations not covered by this. The adventurous user can learn how to achieve some of these configurations here.

Tailoring the system files

There are two ways you can tailor the AnotherLevelUp system files, without having to actually edit the installed version: by appending some M4 text to one or more files, or by copying and editing one or more whole file.

Appending M4 text

The recommended way to make a small change, is to try to achieve the effect desired by creating a short piece of M4 text which will be read and processed immediately after a certain system file. This is not always possible, depending on the change, but is especially suitable for changes which are simply a redefinition of something. This text should be stored in a file with the same name as the corresponding system file, but without the .m4 extension, and preceded by the prefix post_. The file should be placed in the the directory $HOME/.fvwm2dirAllThemes. It may instead be placed in the directory $HOME/.fvwm2dir if it is desired to save this file along with user preferences sets, so that different preferences sets can have different versions of it.

For example, suppose you wanted to use an editor which is not currently recognized by AnotherLevelUp in it's list of editors. Let's say the editor is called fred (FRed's EDitor.) Grepping the system files for editor you could eventually work out that the relevant M4 defines are made in the file fvwm2rc.defines.m4. So you could make the file $HOME/.fvwm2dirAllThemes/post_fvwm2rc.defines and place in it the following text (being very careful with the open and close single quotes):

define(`XEDITOR', `fred')
define(`INITXEDITOR', `fred -geometry 74x46+0+98')

Copying and editing an M4 system file

If the desired effect cannot be achieved by appending text to a system file as described above, then you must resort to copying the appropriate file and editing the copy. The new copy has the same name as the original, except without the .m4 extension, and is stored in $HOME/.fvwm2dirAllThemes. This will have the effect of AnotherLevelUp reading your version of the file instead of the system one.

You should take great care when editing M4 files, particularly with quoting. If you get it wrong then you may find your session is unusable after you restart fvwm2 (and so you have to exit X, fix the problem, and start again).

A good clue as to what is going wrong can sometimes be found by examining the file $HOME/.ALU-errors-*-*.

User options

There is a special place where users may put their own pieces of M4 to define or redefine things. The file is called $HOME/.fvwm2dirAllThemes/fvwm2rc.options. It is read by AnotherLevelUp after fvwm2rc.defines.m4 but before fvwm2rc.decors.m4. The file may instead be placed in the directory $HOME/.fvwm2dir if it is desired to save this file along with user preferences sets, so that different preferences sets can have different versions of it.

User defined menu

Perhaps the most obvious use of the file $HOME/.fvwm2dirAllThemes/fvwm2rc.options is for you to define your own part of the menu to appear off the main menu of AnotherLevelUp. The system will readily plug this in if it is defined. The feature is activated by defining the macro USER_MENU to be the contents of the desired menu. It is best shown by example.

define(`USER_MENU', `"My Stuff" Title
+ "&Star office MiniTitleIcon(briefcase)" Exec /opt/Office51/bin/soffice
+ "&Root shell MiniTitleIcon(sh1)" Exec xterm -bg "#400060" -fg white -e su -

The first line should be typed exactly as shown above, except you can choose any text instead of My Stuff as the menu title. Take care with the open and close single quotes, and don't miss the open quote just before the first double quote.

The next two lines shown above each define one menu item. The + is needed, as you are adding to the current menu definition (and the space following the + is critical.) The part inside the double quotes is the string which will appear on the menu. The & marks the following character as being the keyboard short cut character for that menu item. The part MiniTitleIcon(*) indicates the name of a mini icon which will be used on the menu. For example, if you want to use the file mini-briefcase.xpm then you would write MiniTitleIcon(briefcase).

The part after the quoted string is the fvwm2 command which will be invoked when the menu item is selected. In the above cases, both commands are Exec commands, which cause the following shell commands (and arguments) to be invoked.

The final line ') is important: it is closing the matching opening quote on the first line, and closing the opening bracket of the define.