Openbox switch menu not working

I’ve never tried the ‘switch menu’ option before, but yesterday i made a second menu for some reasons, but when i tried to switch between the menus i couldn’t do that. I see the error
Failed to execute child process "switchmenu" (no such file or directory)

You need to install obmenu-generator.

1 Like

It’s already installed.

That function hasn’t been included for some time, has it?

I don’t understand what are you saying. :confused:

It s gotta be edited;

No it hasn’t

@al0o0z, as we no longer include it, it’s up to you to get working :slight_smile:

Here is the GitHub


Ok, So i’ve to downgrade archlabs-pipemenus package to get the switchmenu script?
Is there any place i can find it?
thanks for your kind response. :slight_smile:

1 Like

Good luck :smiley:

Just write one, it was like 30 lines that just copy files back and forth

#!/usr/bin/env bash

readonly CURR="$HOME/.config/openbox/menu.xml"
readonly BASE="$HOME/.config/openbox/menu-switcher/menu-static.xml"
readonly BACK="$HOME/.config/openbox/menu-switcher/menu-static.xml.bak"

if [[ "$1" == '-dynamic' || "$1" == '--dynamic' || "$1" == '-d' ]]; then
    if hash obmenu-generator &>/dev/null; then
        if [[ -e $CURR ]]; then
            mkdir -p "$HOME/.config/openbox/menu-switcher"
            cp "$CURR" "$BASE"
            cp "$BASE" "$BACK"
            obmenu-generator -p
            notify-send 'Ooops!' 'Unable to find ~/.config/openbox/menu.xml.. Make sure it exists and try again.'
            exit 1
        notify-send 'Ooops!' 'obmenu-generator is required.. Make sure it is installed and try again.'
        exit 1
elif [[ "$1" == '-static' || "$1" == '--static' || "$1" == '-s' ]]; then
    if [[ -e $BASE ]]; then
        cp "$BASE" "$CURR"
        openbox --reconfigure
    elif [[ -e $BACK ]]; then
        cp "$BACK" "$CURR"
        openbox --reconfigure
        notify-send 'Ooops!' 'Cannot find menu to restore. Please run [switchmenu --dynamic]'
        exit 1

exit 0

The above is awful script written a long time ago by me.

1 Like

Thank, i already wrote a simple one to rename 2 menus back & forth,