Skip to content

RainerKuemmerle/box-menu-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

box-menu-rs

box-menu-rs is a pipemenu application following the openbox_menu syntax.

By this, it can be integrated into the menu of labwc, Openbox, and potentially other window manager following this syntax.

Currently, box-menu-rs is only tested on Linux but might run also on other platforms as well.

Compilation

Build box-menu-rs using cargo.

Quick & dirty assuming you have rust installed on your system.

git clone https://github.com/RainerKuemmerle/box-menu-rs.git
cd box-menu-rs
cargo install --path .

Configuration & Usage

After this you can integrate into your menu.xml, e.g., $HOME/.config/labwc/menu.xml.

Below the menu.xml corresponding to the screenshot.

<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu>
<menu id="root-menu" label="Openbox 3">
  <item label="Terminal emulator" icon="/usr/share/icons/hicolor/scalable/apps/kitty.svg">
    <action name="Execute"><execute>kitty</execute></action>
  </item>
  <item label="Web browser" icon="/usr/share/icons/Humanity/categories/24/applications-internet.svg">
    <action name="Execute"><execute>x-www-browser</execute></action>
  </item>
  <separator />
  <!-- This requires the presence of 'box-menu-rs' in $PATH to work -->
  <menu id="applications-boxmenu" label="Apps" execute="box-menu-rs" icon="/usr/share/icons/Humanity/categories/24/applications-other.svg"/>
  <separator />
  <menu id="openbox-options" label="labwc" icon="/usr/share/icons/hicolor/scalable/apps/labwc.svg">
    <item label="Reconfigure">
      <action name="Reconfigure" />
    </item>
    <item label="Restart">
      <action name="Restart" />
    </item>
    <separator />
    <item label="Exit">
      <action name="If">
        <prompt message="Do you really want to exit?"/>
        <then>
          <action name="Exit"/>
        </then>
      </action>
    </item>
  </menu>
  <item label='Shutdown'>
    <action name="If">
      <prompt message="Do you really want to shutdown?"/>
      <then>
        <action name="Execute">
          <execute>
            systemctl poweroff
          </execute>
        </action>
      </then>
    </action>
  </item>
</menu>
</openbox_menu>

Related

The functionality of box-menu-rs is similar to:

About

labwc / openbox pipemenu application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages