Where to Discuss?

Preface

Goal: Using Bunsenslabs Script as Dynamic Openbox menu.

Table of Content


1: BunsenLabs Script

I’m not using BunsenLabs, but I found these script useful.

Respect

Format

To create dynamic menu, we utilize script, and use menu execute="".

    <menu execute="/home/epsi/.config/openbox/bin/bl-tint2-pipemenu" 
        id="bl-tint2-pipemenu" label="Tint2"/>

Preparation

You need a file called bl-include.cfg.

$ git clone https://github.com/BunsenLabs/bunsen-common

Put it under ~/.config/openbox/bin.

BunsenLabs or ArcoLinux

There are choices:

It is all, up to you. But in this tutorial, I prefer BunsenLabs.

Getting the Scripts

First clone this:

$ git clone https://github.com/BunsenLabs/bunsen-pipemenus

And copy the whole file from bin directory, under ~/.config/openbox/bin.

There will be a bunch of file:

  • bl-compositor, bl-conky-pipemenu, bl-dropbox-pipemenu, bl-graphics-pipemenu, bl-help-pipemenu, bl-kb-pipemenu, bl-libreoffice-pipemenu, bl-multimedia-pipemenu, bl-places-pipemenu, bl-printing-pipemenu, bl-recent-files-pipemenu, bl-remote-desktop-pipemenu, bl-sshconfig-pipemenu, bl-tint2-pipemenu, bl-x-www-browser-pipemenu.

Modify the Scripts

Open all the pipemenu scripts, and do a search and replace.

Change from

BL_COMMON_LIBDIR='/usr/lib/bunsen/common'

To

BL_COMMON_LIBDIR='/home/epsi/.config/openbox/bin/'

Do not forget to add executable mode for all scripts.

$ chmod +x /home/epsi/.config/openbox/bin/

Modify the ~/.config/openbox/menu.xml.

        ...
        <separator label="Dynamic Script"/>
        <menu execute="cat /home/epsi/.config/openbox/menu.bunsenlabs.xml" 
            id="bunsenlabs-menu" label="BunsenLabs"/>
        ...

Create the ~/.config/openbox/menu.bunsenlabs.xml.

<openbox_pipe_menu>
    <separator label="BunsenLabs Script"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-compositor" 
        id="bl-compositor" label="Compositor"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-conky-pipemenu" 
        id="bl-conky-pipemenu" label="Conky"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-dropbox-pipemenu" 
        id="bl-dropbox-pipemenu" label="Dropbox"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-graphics-pipemenu" 
        id="bl-graphics-pipemenu" label="Graphics"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-help-pipemenu" 
        id="bl-help-pipemenu" label="Help"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-kb-pipemenu" 
        id="bl-kb-pipemenu" label="Keybinds"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-libreoffice-pipemenu" 
        id="bl-libreoffice-pipemenu" label="LibreOffice"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-multimedia-pipemenu" 
        id="bl-multimedia-pipemenu" label="Multimedia"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-places-pipemenu" 
        id="bl-places-pipemenu" label="Places"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-printing-pipemenu" 
        id="bl-printing-pipemenu" label="Printing"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-recent-files-pipemenu" 
        id="bl-recent-files-pipemenu" label="Files"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-remote-desktop-pipemenu" 
        id="bl-remote-desktop-pipemenu" label="Remote Desktop"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-sshconfig-pipemenu" 
        id="bl-sshconfig-pipemenu" label="SSH"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-tint2-pipemenu" 
        id="bl-tint2-pipemenu" label="Tint2"/>
    <menu execute="/home/epsi/.config/openbox/bin/bl-x-www-browser-pipemenu" 
        id="bl-x-www-browser-pipemenu" label="Browser"/>
</openbox_pipe_menu>

Consider reconfigure openbox. And have a look at the result.

openbox Menu: Bunsenlabs Dynamic Script

Additional Configuration

Some menu need a configuration file called ~/.config/openbox/pipemenus.rc.

I grab this from a Kali user, and change a bit, as below.

# pipemenu.rc holds the applications which appear in the Openbox pipemenus
# Edit the arrays to add or remove package names, making sure there are spaces
# between each entry.

# Multimedia pipemenu (bl-multimedia-pipemenu)
MM_APPS=( 'vlc' 'audacious' 'smplayer' 'gnome-mplayer' 'mplayer' 'clementine')
MM_EDITORS=('mhwaveedit' 'audacity' 'openshot' )
MM_UTILS=('xfburn' 'gtk-recordmydesktop' )

# Graphics pipemenu (bl-graphics-pipemenu)
GRAPHICS_APPS=( 'mirage' 'gimp' 'blender' 'inkscape' )
GRAPHICS_SCROTS=('xfce4-screenshooter' 'scrot' 'spectacle')

# Browsers pipemenu (bl-x-www-browser-pipemenu)
BROWSERS=('chromium' 'iceweasel' 'midori' 'google-chrome-stable' 'opera' )

What’s Next

Consider continue reading [ Menu: XDG Applications ].