Understanding the JWM Menu Configuration in FunOS

The JWM (Joe’s Window Manager) environment used in FunOS is fast, lightweight, and highly customizable. One of its essential components is the application menu — the gateway to launching programs and accessing key system functionality. In FunOS, the JWM menu configuration is managed through an XML-based file located at:

~/.config/jwm/menu

This article provides an in-depth explanation of the structure, elements, and customization options of the JWM menu file in FunOS.

Where to Find the Menu File

You can access the JWM menu configuration file in two main ways:

Via File Manager

  1. Click Menu > File Manager
  2. Press Ctrl + H or click Menu > Show Hidden to display hidden files.
  3. Navigate to the .config/jwm/ directory and open the menu file with a text editor.

Via Terminal

mousepad ~/.config/jwm/menu

This opens the file in the Mousepad text editor, allowing you to view or modify its contents.

Overview of the ~/.config/jwm/menu File

The menu file defines the structure of the main JWM menu. It uses standard XML syntax and includes programs, separators, dynamic includes, and control options like logout and menu reloading.

Here is the default contents of the file in FunOS:

<?xml version='1.0' encoding='utf-8'?>
<JWM>   
   <RootMenu onroot="123" height="20">
      <Program icon="lxterminal" label="Terminal" tooltip="Use the command line">lxterminal</Program>
      <Program icon="system-file-manager" label="File Manager" tooltip="Browse the file system and manage the files">pcmanfm</Program>
      <Program icon="org.xfce.mousepad" label="Text Editor" tooltip="Simple Text Editor">mousepad</Program> 
      <Program icon="firefox-esr" label="Web Browser" tooltip="Browse the World Wide Web">firefox-esr</Program>    
      <Program icon="nitrogen" label="Set Wallpaper" tooltip="Browse and set desktop backgrounds">nitrogen</Program>
      <Separator />
      <Program icon="org.gnome.Evince" label="Documentation" tooltip="FunOS Documentation">firefox-esr -new-tab https://funos.org/documentation/</Program>  
      <Separator />
      <Include>$HOME/.jwmrc-mjwm</Include>
      <Separator />
      <Include>$HOME/.config/jwm/themes-list</Include>      
      <Separator />
      <Program icon="system-reboot" label="Reload menu" confirm="false">mjwm --no-backup && jwm -reload</Program>
      <Separator />     
      <Program icon="system-shutdown" label="Log Out">/usr/bin/funos-logout</Program>      
   </RootMenu>   
</JWM>

Breakdown of Menu Elements

1. <RootMenu onroot="123" height="20">

This is the main container for the menu. The onroot="123" attribute indicates that this menu appears when you click the desktop background (root window). The height sets the height of menu entries.

2. <Program ...>

This element defines a menu entry that launches an application. Key attributes:

  • icon: Icon displayed next to the label.
  • label: Text shown in the menu.
  • tooltip: (Optional) Text shown on hover (not all JWM versions support it).
  • Content between tags: The command to execute.

Example:

<Program icon="lxterminal" label="Terminal" tooltip="Use the command line">lxterminal</Program>

This launches the LXTerminal when selected.

3. <Separator />

Creates a visual break between sections of the menu. Useful for grouping related items.

4. <Include>...</Include>

Includes external XML files into the menu structure. This allows modular configuration.

a. ~/.jwmrc-mjwm

<Include>$HOME/.jwmrc-mjwm</Include>

This file is automatically generated by mjwm, a FunOS utility that dynamically builds a Freedesktop-compliant application menu from .desktop files. It is updated every time you click “Reload menu” or run:

mjwm --no-backup && jwm -reload

b. ~/.config/jwm/themes-list

<Include>$HOME/.config/jwm/themes-list</Include>

This file adds a submenu that allows users to switch between available JWM themes by copying the selected theme to the ~/.config/jwm/theme file and restarting JWM.

5. Reload Menu

<Program icon="system-reboot" label="Reload menu" confirm="false">mjwm --no-backup && jwm -reload</Program>

This menu entry rebuilds the application menu and reloads JWM. It’s useful after installing new applications or modifying .desktop files.

6. Log Out

<Program icon="system-shutdown" label="Log Out">/usr/bin/funos-logout</Program>

Executes the FunOS logout script to end the session.

Customizing the Menu

You can edit the menu file directly to:

  • Add new programs (e.g., custom apps or scripts)
  • Reorganize or remove default entries
  • Add your own <Menu> blocks for nested menus

Example: Add GIMP to the menu

<Program icon="gimp" label="GIMP">gimp</Program>

After editing, apply the changes:

jwm -reload

Or click the Reload menu entry from the menu itself.

Tips for Managing the Menu

  • Always back up the menu file before making large changes.
  • Use mjwm to auto-generate application menus instead of creating everything manually.
  • Icons are resolved based on paths listed in ~/.config/jwm/icons. If your new app’s icon doesn’t show, ensure its icon path is included there.

Summary

The ~/.config/jwm/menu file is the core of the JWM menu system in FunOS. With its clean XML structure, it’s both powerful and easy to customize. By understanding each element — from launching programs to including external configurations — you can tailor your desktop experience to your exact preferences.

For even greater flexibility, combine manual edits with the automatic menu generation provided by mjwm, and explore the theming system integrated directly into the menu.

Leave a Reply

Your email address will not be published. Required fields are marked *