bl-menu-switch is a simple bash script to switch between the default Openbox menu and the menu generated by bl-obmenu-generator on the GNU/Linux distribution Bunsenlabs.

martix 4318b80cac Update Readme.md 2 years ago
bl-menu-switch_Paper_icon_32x32 8f653f7b74 Paper icon 2 years ago
bl-menu-switch_Papirus_icon_48x48 b277a26610 Papirus icon 2 years ago
LICENSE 8a8e7b23a3 LICENSE added 2 years ago
README.md 4318b80cac Update Readme.md 2 years ago
bl-menu-switch ad961f86de bl-menu-switch added 2 years ago

README.md

bl-menu-switch

...................................................................................................................

bl-menu-switch is intended to use with Openbox and bl-obmenu-generator on the GNU/Linux distribution BunsenLabs.

The script enables to switch via terminal command or menu entry between the default Openbox menu and the menu generated by bl-obmenu-generator.

bl-menu-switch ...................................................................................................................

Installation - easy way

If you have installed bl-obmenu-generator and the menu by bl-obmenu-generator is active, run this script (if you already have the ~/src folder, remove "mkdir ~/src && " from the beginning):

mkdir ~/src && cd ~/src && wget https://notabug.org/martix/bl-menu-switch/archive/master.tar.gz && tar vxf master.tar.gz && cd bl-menu-switch && cp bl-menu-switch ~/bin && chmod 755 ~/bin/bl-menu-switch && sudo cp ~/src/bl-menu-switch/bl-menu-switch_Paper_icon_32x32/bl-menu-switch.svg /usr/share/icons/Paper/32x32/apps/ && sudo cp ~/src/bl-menu-switch/bl-menu-switch_Papirus_icon_48x48/bl-menu-switch.svg /usr/share/icons/Papirus/48x48/apps && sed -i '/bl-menu-switch/s/#{item/{item/g' ~/.config/bl-obmenu-generator/schema.pl && sed -i '/item label="Edit autostart"/i \\t\t\t\t<item label="Menu Switch">\n\t\t\t\t\t<action name="Execute">\n\t\t\t\t\t\t<command>\n\t\t\t\t\t\t\tbl-menu-switch\n\t\t\t\t\t\t</command>\n\t\t\t\t\t</action>\n\t\t\t\t</item>' ~/.config/openbox/menu.xml.bak

...........................................................................................................................................................

Installation - step by step

  1. In order to use the script, bl-menu-switch should be in your PATH, i.e. just copy the file in your ~/bin directory.

cp bl-menu-switch ~/bin

  1. Make sure it has the right permissions

chmod 755 ~/bin/bl-menu-switch

Running the command "bl-menu-switch" in terminal or gmrun switches back and forth between the bl-obmenu-generator menu and the Openbox menu.

  1. For using bl-obmenu-generator with icons copy the icon files in the required icon theme folders:

sudo cp /bl-menu-switch_Paper_icon_32x32/bl-menu-switch.svg /usr/share/icons/Paper/32x32/apps/ && sudo cp /bl-menu-switch/bl-menu-switch_Papirus_icon_48x48/bl-menu-switch.svg /usr/share/icons/Papirus/48x48/apps

  1. For activating the "Switch Menu" entry in your bl-obmenu-generator menu remove # from the beginning of the following line in ~/.config/bl-obmenu-generator/schema.pl (default line 118):

{item => ['bl-menu-switch', 'Menu Switch', 'bl-menu-switch']},

Or simply run this command:

sed -i '/bl-menu-switch/s/#{item/{item/g' ~/.config/bl-obmenu-generator/schema.pl

  1. To have a "Menu Switch" entry in the static Openbox menu, paste the following code in the Openbox menu's .xml (or .xml.bak - notice: while the menu by bl-obmenu-generator is active, the file is renamed to menu.xml.bak) file in ~/.config/openbox/ above the following line: item label="Edit autostart":

    <item label="Menu Switch">
        <action name="Execute">
            <command>
                bl-menu-switch
            </command>
        </action>
    </item>
    

Or simply run this command (while the menu by bl-obmenu-generator is active):

sed -i '/item label="Edit autostart"/i \\t\t\t\t<item label="Menu Switch">\n\t\t\t\t\t<action name="Execute">\n\t\t\t\t\t\t<command>\n\t\t\t\t\t\t\tbl-menu-switch\n\t\t\t\t\t\t</command>\n\t\t\t\t\t</action>\n\t\t\t\t</item>' ~/.config/openbox/menu.xml.bak