2 # actions done when the menu button is pressed
3 # only argument is the time the button was pressed in seconds
5 if [ -x /usr/pandora/scripts/op_menu_custom.sh ]; then
6 exec /usr/pandora/scripts/op_menu_custom.sh "$@"
9 . /usr/pandora/scripts/op_common.sh
23 if [ "$1" -ge "2" ]; then #button was pressed 3 sec or longer, show list of apps to kill instead of launcher
26 # if something uses fb1 or SGX, try killing them instead
27 fb_users=`lsof -t /dev/fb1 /dev/pvrsrvkm`
28 if [ -n "$fb_users" ]; then
34 xpid=$(pidof xfce4-session)
36 echo "xfce4 is running"
38 echo "displaying kill list"
39 pidlist=$(pstree -lpA | grep pnd_run.sh | sed -ne 's/.*-\(.*\)(\([0-9]\+\))/\2\n \1/p' | su -c 'DISPLAY=:0.0 zenity --list --multiple --column "pid" --column "name" --title "kill" --text "which apps should be killed"' - $xfceuser | sed 's/|/\n/')
42 # echo "starting appfinder"
43 # invoke the appfinder; nice app, but it takes a few seconds to come up
44 #su -c 'DISPLAY=:0.0 xfce4-appfinder' - $xfceuser
45 # invoke the bottom-left popup menu, for launching new apps, instead.
46 su -c 'DISPLAY=:0.0 /usr/pandora/scripts/op_xfcemenu.sh' - $xfceuser
49 echo "no x, killing all pnd aps so x or DE gets restarted"
50 pidlist=$(pstree -lpA | grep pnd_run.sh | sed -ne 's/.*(\([0-9]\+\))/\1/p')