Open rilian-la-te opened 4 years ago
Sure! Can you provide an example of such an XML file?
<?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.
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.
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: