Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-04-16 14:37:09

xfce4user
Member
Registered: 2023-04-16
Posts: 1

Help with XFCE4 Menu

Hi.

I have created a menu in /usr/share/menus/xfce4.menu with the following content:

<Menu>
    <Name>Parent</Name>
    <DefaultAppDirs />
    <Menu>
        <Name>Work</Name>
        <Include>
        <Filename>libreoffice.desktop</Filename>
        <Filename>vscode.desktop</Filename>
        <Filename>opengraph.desktop</Filename>
        </Include>
    </Menu>
    <Menu>
        <Name>Machine control</Name>
        <Include>
        <Filename>virt-manager.desktop</Filename>
        <Filename>systemd-gui.desktop</Filename>
        <Filename>controlpanel.desktop</Filename>
        </Include>
    </Menu>
    <Layout>
        <Menuname>Work</Menuname>
        <Menuname>Machine control</Menuname>
    </Layout>
</Menu>

It does the job and doesn't give any problems, but I don't know how to make the "Work" and "Machine control" sections show an icon chosen by me.

Please help.

Thanks in advance.

Last edited by xfce4user (2023-04-16 14:37:36)

Offline

#2 2023-04-16 19:53:45

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,367

Re: Help with XFCE4 Menu

Hello and welcome.

After your Work <Name> line, you need to add:

<Directory>Work.directory</Directory>

and after Machine Control:

<Directory>MachineControl.directory</Directory>

Then you need to create the Work.directory and MachineControl.directory files in ~/.local/share/desktop-directories (create the folder if it doesn't exist) using the following pattern:

[Desktop Entry]
Version=1.0
Name=NAME
Comment=COMMENT
Type=Directory
Icon=applications-accessories

...and change the NAME, COMMENT lines as well as specify an icon to use on the Icon line.

Ref: https://specifications.freedesktop.org/ … c-1.0.html


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Online

Registered users online in this topic: 0, guests: 1
[Bot] CCBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 521.23 KiB (Peak: 522.45 KiB) ]