Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: add Vala Panel menu generator #17

Open
rilian-la-te opened this issue Sep 23, 2019 · 3 comments
Open

Feature Request: add Vala Panel menu generator #17

rilian-la-te opened this issue Sep 23, 2019 · 3 comments

Comments

@rilian-la-te
Copy link

https://gitlab.com/vala-panel-project/vala-panel have a customizable XML-based menu) Can you add a generator to generate such XML files?)

Vala Panel exists in popular distribution repos:

  1. https://packages.ubuntu.com/bionic/vala-panel
  2. https://packages.debian.org/buster/vala-panel
  3. https://software.opensuse.org/package/vala-panel
@gapan
Copy link
Owner

gapan commented Sep 23, 2019

Sure! Can you provide an example of such an XML file?

@rilian-la-te
Copy link
Author

<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <menu id="vala-panel-menu">
    <section id="vala-panel-internal-applications">
    </section>
    <submenu id="local-mounts">
          <attribute name="label" translatable="yes">Переход</attribute>
        <item>
          <attribute name="label" translatable="yes">Computer</attribute>
          <attribute name="icon">computer</attribute>
          <attribute name="action">app.launch-uri</attribute>
          <attribute name="target">computer:///</attribute>
          <attribute name="x-valapanel-dnd-source" type="b">true</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">Trash</attribute>
          <attribute name="icon">user-trash</attribute>
          <attribute name="action">app.launch-uri</attribute>
          <attribute name="target">trash:///</attribute>
          <attribute name="x-valapanel-dnd-source" type="b">true</attribute>
        </item>
    </submenu>
    <submenu id="network-mounts">
          <attribute name="label" translatable="yes">Дополнительно</attribute>
        <item>
          <attribute name="label" translatable="yes">Network</attribute>
          <attribute name="icon">network-workgroup</attribute>
          <attribute name="action">app.launch-uri</attribute>
          <attribute name="target">network:///</attribute>
          <attribute name="x-valapanel-dnd-source" type="b">true</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">Connect to server...</attribute>
          <attribute name="icon">network-server</attribute>
          <attribute name="action">app.launch-id</attribute>
          <attribute name="target">nautilus-connect-server.desktop</attribute>
          <attribute name="x-valapanel-dnd-source" type="b">true</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">Use XTerm to launch MC</attribute>
          <attribute name="icon">utilities-terminal</attribute>
          <attribute name="action">app.launch-command</attribute>
          <attribute name="target">xterm -e mc</attribute>
          <attribute name="x-valapanel-dnd-source" type="b">true</attribute>
        </item>
    </submenu>
    <section id="vala-panel-internal-settings">
    </section>
    <section>
        <item>
          <attribute name="label" translatable="yes">Run</attribute>
          <attribute name="icon">system-run</attribute>
          <attribute name="action">app.run</attribute>
        </item>
    </section>
    <section>
        <item>
          <attribute name="label" translatable="yes">Log Out...</attribute>
          <attribute name="icon">system-log-out</attribute>
          <attribute name="action">app.logout</attribute>
        </item>
        <item>
          <attribute name="label" translatable="yes">Shut down...</attribute>
          <attribute name="icon">system-shutdown</attribute>
          <attribute name="action">app.shutdown</attribute>
        </item>
    </section>
  </menu>
</interface>

This is small example.
Menu is capable for launch desktop files (name in "action" should be "app.launch-id"), show arbitrary files with default program ("app.launch-uri" action), and launch arbitrary commands ("app.launch-command" action).

Topmost entry should be called "vala-panel-menu" in id.

@gapan
Copy link
Owner

gapan commented Jun 7, 2022

So I've finally installed vala-panel to try it out. But I can see that a menu is already included, so I'm not sure what an xdgmenumaker generated menu would offer. It would be mostly identical to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants