Menu

Configuration

Christian Henz

Dr. Navjoy - Configuration

1. XML Elements

All attributes are mandatory unless explicitly specified otherwise.

1.1 <navjoy>

Root element.

1.1.1 <group>

A group of applications. Zero or more elements can occur.

1.1.1.1 <application>

An application that can be launched. Zero or more elements can occur.

Attributes:

  • cmd

The command to be executed to start the application.

  • label

The name of the application to be displayed.

  • browse (optional)

If present and set to either of "true"/"TRUE"/"yes"/"YES", the application is a "browsing" application.

1.1.1.1.1 <ext>

File extension supported by the application. Zero or more elements can occur.
The extension is specified in the element's text, which must not include spaces.

Example: <ext>avi</ext>

1.1.2 <bookmark>

A bookmark that can be visited when browsing the file system. Zero or more elements can occur.
If no bookmark is present, browsing starts in the user's home dir, otherwise at the first bookmark.

Attributes:

  • path

The directory the bookmark points to.

  • label

The name of the bookmark displayed by the program.

1.1.3 <mapping>

A joystick button mapping. Zero or more elements can occur.

Attributes:

  • cmd

The input command. Can be either of "ACTION", "CANCEL", "PAGE_UP", "PAGE_DOWN" or "MENU".

  • button

The index of the joystrick button mapped to the command.

2. Example

Here is an example of a navjoy.xml file configured to use MPlayer for video playback, Mednafen for emulation and launch the games "Secret Maryo Chronicles", "rRootage" and "Noiz2sa". All these external programs have been configured to be controllable with only the joystick.

&lt;navjoy&gt;

  &lt;bookmark path="/home/joe" label="HOME"/&gt;
  &lt;bookmark path="/home/joe/videos" label="Videos"/&gt;
  &lt;bookmark path="/home/joe/roms" label="ROMs"/&gt;
  &lt;bookmark path="/mnt/cdrom" label="DVD-ROM"/&gt;

  &lt;group label="Games"&gt;

    &lt;application cmd="smc" label="Secret Maryo Chronicles"/&gt;
    &lt;application cmd="rrootage -fullscreen" label="rRootage"/&gt;
    &lt;application cmd="noiz2sa" label="Noiz2sa"/&gt;

  &lt;/group&gt;

  &lt;group label="Applications"&gt;

    &lt;application cmd="mplayer -fs" label="MPlayer" browse="true"&gt;
      &lt;ext&gt;avi&lt;/ext&gt;
      &lt;ext&gt;mpg&lt;/ext&gt;
      &lt;ext&gt;mpeg&lt;/ext&gt;
      &lt;ext&gt;ogm&lt;/ext&gt;
      &lt;ext&gt;mov&lt;/ext&gt;
      &lt;ext&gt;wmv&lt;/ext&gt;
      &lt;ext&gt;rm&lt;/ext&gt;
      &lt;ext&gt;mp4&lt;/ext&gt;
      &lt;ext&gt;asf&lt;/ext&gt;
    &lt;/application&gt;

    &lt;application cmd="mednafen" label="Mednafen" browse="true"&gt;
      &lt;ext&gt;pce&lt;/ext&gt;
      &lt;ext&gt;nes&lt;/ext&gt;
      &lt;ext&gt;gb&lt;/ext&gt;
      &lt;ext&gt;gbc&lt;/ext&gt;
      &lt;ext&gt;zip&lt;/ext&gt;
    &lt;/application&gt;

  &lt;/group&gt;

  &lt;mapping cmd="ACTION" button="0" /&gt;
  &lt;mapping cmd="CANCEL" button="1" /&gt;
  &lt;mapping cmd="PAGE_UP" button="6" /&gt;
  &lt;mapping cmd="PAGE_DOWN" button="7" /&gt;
  &lt;mapping cmd="MENU" button="8" /&gt;

&lt;/navjoy&gt;

Related

Wiki: Main_Page