4 # Show or hide XFCE application/popup menu when Pandora key is pressed.
8 function loc_menu_show {
12 function loc_menu_hide {
13 WINID=`xwininfo -name xfce4-menu-plugin|grep 'Window id:'|awk '{print $4}'`
14 xdotool keydown --window $WINID Escape
17 MENU_SY=`xwininfo -name xfce4-menu-plugin|grep Height|awk '{print $2}'`
19 if [ 1 -eq $MENU_SY ]; then
20 # panel is in auto-hide mode and the menu is currently invisible
23 # hack to determine whether the menu is visible, regardless of the panel auto-hide mode
24 NUM_MENU_WINDOWS=`xwininfo -tree -root | grep 'xfce4-menu-plugin' | wc -l`
25 echo $NUM_MENU_WINDOWS
26 if [ $NUM_MENU_WINDOWS -gt 4 ]; then