How to Create Application Shortcuts in the FunOS Tray

In FunOS, the tray located at the bottom of the screen, contains application shortcuts that allow users to quickly access commonly used programs. By default, FunOS 24.04.1 includes shortcuts for the following applications:

  • Terminal
  • File Manager
  • Text Editor
  • Web Browser
Default application shortcuts in the FunOS tray

These shortcuts are defined in a configuration file located at $HOME/.config/jwm/tray. In this article, we will explore how to modify these shortcuts, including how to remove the default ones and add your own custom shortcuts for other applications.

Default Tray Shortcuts

By default, the tray configuration file ($HOME/.config/jwm/tray) contains the following lines related to the four application shortcuts:

<?xml version="1.0" encoding="UTF-8"?>
<JWM>
    <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="/usr/share/icons/Papirus/48x48/apps/lxterminal.svg">exec:lxterminal</TrayButton>
        <TrayButton popup="File Manager" icon="/usr/share/icons/Papirus/48x48/apps/system-file-manager.svg">exec:pcmanfm</TrayButton>
        <TrayButton popup="Text Editor" icon="/usr/share/icons/Papirus/48x48/apps/org.xfce.mousepad.svg">exec:mousepad</TrayButton>
        <TrayButton popup="Web Browser" icon="/usr/share/icons/Papirus/48x48/apps/firefox-esr.svg">exec:firefox-esr</TrayButton>
        <TaskList maxwidth="130" border="false" />
        <Pager labeled="true" />
        <Spacer width="2" />
        <Dock />
        <Clock format="%H:%M">showdesktop</Clock>
    </Tray>
</JWM>

Explanation of Tray Shortcuts:

  • TrayButton: Each shortcut is created using the <TrayButton> tag.
  • popup: This is the label that appears when hovering over the shortcut.
  • icon: Path to the icon used in the tray.
  • exec: The command executed when the button is clicked.

How to Modify Tray Shortcuts

1. Backup Your Tray Configuration

Before making any changes, it’s a good idea to create a backup of the tray configuration file:

cp $HOME/.config/jwm/tray $HOME/.config/jwm/tray.old

2. Editing the Tray Configuration File

To edit the tray configuration file, use a text editor like mousepad:

mousepad $HOME/.config/jwm/tray

3. Deleting Default Shortcuts

If you want to remove the default shortcuts for Terminal, File Manager, Text Editor, and Web Browser, delete the following lines from the tray configuration file:

<TrayButton popup="Terminal" icon="/usr/share/icons/Papirus/48x48/apps/lxterminal.svg">exec:lxterminal</TrayButton>
<TrayButton popup="File Manager" icon="/usr/share/icons/Papirus/48x48/apps/system-file-manager.svg">exec:pcmanfm</TrayButton>
<TrayButton popup="Text Editor" icon="/usr/share/icons/Papirus/48x48/apps/org.xfce.mousepad.svg">exec:mousepad</TrayButton>
<TrayButton popup="Web Browser" icon="/usr/share/icons/Papirus/48x48/apps/firefox-esr.svg">exec:firefox-esr</TrayButton>

4. Adding New Shortcuts

To add new application shortcuts, you need two pieces of information:

  • Executable name: The command that launches the application.
  • Icon path: The location of the application’s icon.

You can find this information in the $HOME/.jwmrc-mjwm file. For example, to add shortcuts for Nitrogen (a wallpaper manager) and Galculator (a calculator), follow these steps:

  1. Open the $HOME/.jwmrc-mjwm file:
mousepad $HOME/.jwmrc-mjwm
  1. Search for the application’s icon path and executable command. For example:
  • Nitrogen:
    • Icon path: /usr/share/icons/Papirus/48x48/apps/nitrogen.svg
    • Executable: nitrogen
  • Galculator:
    • Icon path: /usr/share/icons/Papirus/48x48/apps/galculator.svg
    • Executable: galculator
  1. Add the following lines to the tray configuration file to create shortcuts for Nitrogen and Galculator:
<TrayButton popup="Set Wallpaper" icon="/usr/share/icons/Papirus/48x48/apps/nitrogen.svg">exec:nitrogen</TrayButton>
<TrayButton popup="Calculator" icon="/usr/share/icons/Papirus/48x48/apps/galculator.svg">exec:galculator</TrayButton>

Note: To get icon path information, you can also use the Icon Browser application, which can be accessed via Menu > Development > Icon Browser.

Example of the Updated Tray Configuration

After removing the default shortcuts and adding the new ones, your tray configuration file should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<JWM>
    <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="Set Wallpaper" icon="/usr/share/icons/Papirus/48x48/apps/nitrogen.svg">exec:nitrogen</TrayButton>
        <TrayButton popup="Calculator" icon="/usr/share/icons/Papirus/48x48/apps/galculator.svg">exec:galculator</TrayButton>
        <TaskList maxwidth="130" border="false" />
        <Pager labeled="true" />
        <Spacer width="2" />
        <Dock />
        <Clock format="%H:%M">showdesktop</Clock>
    </Tray>
</JWM>

5. Restart JWM

To apply the changes, restart the JWM window manager by running the following command:

jwm -restart

After the restart, you will see the new shortcuts for Nitrogen and Galculator in the tray, and the previous shortcuts will be gone.

New application shortcuts in the FunOS tray

Conclusion

Modifying application shortcuts in the FunOS tray is simple. By editing the tray configuration file, you can customize the tray to suit your workflow. Whether you prefer adding shortcuts for frequently used applications or removing default ones, this guide has provided the necessary steps to do so. Happy customizing!

2 responses to “How to Create Application Shortcuts in the FunOS Tray”

  1. Ditier Avatar
    Ditier

    Great tutorial. Simple, quick and easy. Congratulations to the developers.

    1. admin Avatar

      Thank you so much for your kind words! We’re glad you found the tutorial helpful. If you have any other questions or suggestions, feel free to reach out. Your support motivates us to keep improving FunOS!

Leave a Reply

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