Understanding the JWM Tray Configuration in FunOS

The tray—also known as the panel or taskbar—is a crucial component of the JWM (Joe’s Window Manager) interface in FunOS. It provides quick access to essential applications, displays running tasks, and shows the system clock. FunOS users can customize the tray behavior and contents through a simple XML configuration file located at:

~/.config/jwm/tray

This article explains the structure and functionality of the tray file, detailing how each section works and how users can tailor the tray to suit their preferences.

1. What is the ~/.config/jwm/tray File?

This XML file defines the appearance, position, and functionality of the tray (taskbar) in FunOS. JWM reads this file during startup or reload and displays the tray accordingly.

2. Default Tray Configuration in FunOS

Here is the default content of the ~/.config/jwm/tray file in FunOS:

<?xml version="1.0" encoding="UTF-8"?>
<JWM>
    <!-- Tray of the environment. -->
    <!-- Additional tray attributes: autohide, width, border, layer, layout -->
    <Tray x="0" y="-1" height="30" autohide="off" delay="1000">
        <TrayButton popup="Menu" icon="/opt/artwork/jwmkit/traybutton.svg">root:1</TrayButton>
        <TrayButton popup="Terminal" icon="lxterminal">exec:lxterminal</TrayButton>
        <TrayButton popup="File Manager" icon="system-file-manager">exec:pcmanfm</TrayButton>
        <TrayButton popup="Text Editor" icon="org.xfce.mousepad">exec:mousepad</TrayButton>
        <TrayButton popup="Web Browser" icon="firefox-esr">exec:firefox-esr</TrayButton>
        <TaskList maxwidth="130" border="false" />
        <Pager labeled="true" />
        <Spacer width="2" />
        <Dock />
        <Clock format="%H:%M">showdesktop</Clock>
    </Tray>
</JWM>

3. Breaking Down the Tray Configuration

<Tray x="0" y="-1" height="30" autohide="off" delay="1000">

This is the main tag that defines the tray.

  • x=”0″: Positions the tray at the left edge of the screen.
  • y=”-1″: Places the tray at the bottom of the screen. Use y="0" for the top.
  • height=”30″: Sets the tray height in pixels.
  • autohide=”off”: Prevents the tray from hiding automatically.
  • delay=”1000″: (When autohide is enabled) sets the delay in milliseconds before it hides.

<TrayButton> Elements

These buttons are clickable shortcuts that run specific commands.

Example 1:

<TrayButton popup="Menu" icon="/opt/artwork/jwmkit/traybutton.svg">root:1</TrayButton>
  • popup: Tooltip text.
  • icon: Path to the icon.
  • root:1: Opens the root menu defined in ~/.config/jwm/menu.

Example 2:

<TrayButton popup="Terminal" icon="lxterminal">exec:lxterminal</TrayButton>
  • Launches lxterminal when clicked.

Other buttons in the default tray:

  • File Manager → pcmanfm
  • Text Editor → mousepad
  • Web Browser → firefox-esr

You can customize or add buttons by duplicating these entries and changing the application names.

<TaskList maxwidth="130" border="false" />

Displays open and minimized windows as buttons in the tray.

  • maxwidth=”130″: Limits the width of each task button.
  • border=”false”: Disables button borders for a cleaner look.

<Pager labeled="true" />

Displays virtual desktops (workspaces).

  • labeled=”true”: Shows desktop names or numbers.
  • Clicking a pager area switches to the corresponding desktop.

<Spacer width="2" />

Adds spacing between tray components. Useful for visual balance.

<Dock />

Reserves space for docked system tray applications like volumeicon, cbatticon, and nm-tray.

These applications run at startup (defined in ~/.config/jwm/start) and appear in the tray.

<Clock format="%H:%M">showdesktop</Clock>

Displays the current time in 24-hour format.

  • format=”%H:%M”: Shows time like 14:30. You can change this to %I:%M %p for 12-hour format with AM/PM.
  • showdesktop: Clicking the clock minimizes or restores all windows.

4. Customizing the Tray

You can make the tray your own by editing this file. Here are a few customization ideas:

a. Move the tray to the top:

<Tray x="0" y="0" height="30" autohide="off">

b. Add a shortcut to a favorite app:

<TrayButton popup="FileZilla" icon="filezilla">exec:filezilla</TrayButton>

c. Change clock format to include date:

<Clock format="%a %d %b %H:%M">showdesktop</Clock>

5. Reloading the Tray

After making changes to the tray configuration, apply them by restarting JWM:

  • Run the command in Terminal:
jwm -restart

6. Accessing the Tray File

You can access and edit the tray file using:

a. File Manager

  1. Click Menu > File Manager
  2. Press Ctrl + H or click Menu > Show Hidden
  3. Navigate to .config/jwm/tray

b. Terminal

mousepad ~/.config/jwm/tray

Or use another editor like nano.

7. Summary

The tray in JWM is lightweight yet powerful. With a few XML tags, FunOS users can create a personalized workspace by:

  • Adding quick launch icons
  • Adjusting panel size and position
  • Managing workspaces and tasks
  • Displaying a styled system clock

Understanding and modifying the ~/.config/jwm/tray file gives you full control over how your desktop panel behaves and looks. For those who love simplicity and speed, JWM in FunOS delivers a highly customizable experience without bloat.

Leave a Reply

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