[ Update Request ] Add menu selection to xfce4-popup-whiskermenu
Thank you for your quick response to my issue #95 (closed). That helps and serves my purpose. Based on the suggesting, I made a few edits to the wrapper and added a -n option to specify the menu and a -l option for listing the menu. Here's the modified source:
export TEXTDOMAIN="xfce4-panel"
export TEXTDOMAINDIR="@CMAKE_INSTALL_FULL_LOCALEDIR@"
ATPOINTER="false"
MENUNUMBER=""
case "$1" in
-h|--help)
echo "$(gettext "Usage:")"
echo " $(basename $0) [$(gettext "OPTION")...]"
echo
echo "$(gettext "Options:")"
echo " -p, --pointer $(gettext "Popup menu at current mouse position")"
echo " -h, --help $(gettext "Show help options")"
echo " -V, --version $(gettext "Print version information and exit")"
echo " -n, --number $(gettext "Choose which menu to popup with a number")"
echo " -l, --list $(gettext "Print available menus for selection")"
exit 0
;;
-V|--version)
echo "$(basename $0) @whiskermenu_version@"
echo "Copyright (C) 2013 Graeme Gott"
exit 0
;;
-l|--list)
echo "Menu Numbers:"
# This one might not be distro-agnostic, as I can't find whiskermenu entries in Fedora. I'd have to look into xfce4-panel's makefiles.
ls -1a ~/.config/xfce4/panel | grep whiskermenu | sed 's/whiskermenu-//'| sed 's/.rc//'
exit 0
;;
-p|--pointer)
ATPOINTER="true"
case "$2" in
-n|--number)
MENUNUMBER=-$3
;;
esac
;;
-n|--number)
MENUNUMBER=-$2
case "$3" in
-p|--pointer)
ATPOINTER="true"
;;
esac
;;
esac
@CMAKE_INSTALL_FULL_BINDIR@/xfce4-panel --plugin-event=whiskermenu$MENUNUMBER:popup:bool:$ATPOINTER
I was wondering if you could add those modifications and the needed stuff to the man file or if I could somehow make a merge request, although I might have to modify the -l command.