Openbox switch menu not working


#1

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)


#2

You need to install obmenu-generator.


#3

It’s already installed.


#4

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


#5

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


#6

It s gotta be edited;


#7

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


#8

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:


#9

Good luck :smiley:


#10

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
        else
            notify-send 'Ooops!' 'Unable to find ~/.config/openbox/menu.xml.. Make sure it exists and try again.'
            exit 1
        fi
    else
        notify-send 'Ooops!' 'obmenu-generator is required.. Make sure it is installed and try again.'
        exit 1
    fi
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
    else
        notify-send 'Ooops!' 'Cannot find menu to restore. Please run [switchmenu --dynamic]'
        exit 1
    fi
fi

exit 0

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


#11

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