Minimenu In A Window


Pleng

Well-Known Member
Joined
Dec 28, 2006
Messages
3,030
Ok following on from this thread I've decided to stop trying to re-invent the wheel for now and see if I can't get a 'panel+minimenu' setup working.

I have the system set up to boot straight into xterm. From there I can launch matchbox-window-manager and a xfce4-panel. This gives me a nice, desktopless multi tasking environment (with a terrible task switcher, unfortunately). What I really want to be able to do is to launch minimenu, in a 'window' (all windows being full screen in matchbox, so basically minimenu will take up any space not needed by the panel), in this environment. Right now I can launch minimenu, but it runs full screen so overlaps the panel. What's more, when I select an item from minimenu I'm greeted with the message:

-->run /usr/pandora/scripts/pnd_run.sh -p "/media/APPS/pandora/menu//dega-1.16-4.pnd" -e "dega.sh" -b "dega

but nothing actually occurs. Could this be something to do with the // between menu and the pnd file name?

So is it possible to force minimenu to run in a window, and why do you suppose the launch issues may be occurring?
 
Last edited by a moderator:
minimenu's conf file specifies if it runs windowed or fullscreen (ie: when developing it on a desktop, you woudl run it windowed since your desktop is more than 800x480 :) I actually have a page up on the wiki describing what minimenu conf entries do, but it possibly could be out of date or whatever.

The shipping mmenu.conf is:
http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-libraries.git;a=blob;f=deployment/etc/pandora/conf/mmenu.conf;h=ba2700a98890ae00989484fd383513ca26c0767a;hb=3059196d8e4dc600832bacd8d8dcbdbb512e9b49

The relevent bit is:
35 [display]
36 fullscreen 1 # 0 for windowed, >0 for fullscreen

The business with "-->foo" is that for mmenu I wanted to conserve resources, so when it runs, it _exits_. Likewise, it makes mmenu 'more or less' crash proof. If you look into how mmenu is itself run you'll see 'mmwrapper' dfoes the deal -- mmwrapper's job is to run mmenu, or run something mmenu tells it to, or exit.

So mmwrapper runs mmenu; when mmenu is running or exiting, its spitting out logging of various things .. but on exit, it is required to spit out a --> line, which is an instruction to mmwrapper. (If mmenu just crashes, mmwrapper will not get a -->line, and will just re-run mmenu. Theres code in mmwrapper that watches for mmenu to exit too many times in one second, and thus determine the system is totally broken .. but its not enabled yet; my goal there is to restore default configs and themes, so if someone breaks their theme, mmenu can repair itself. But anyway, a future task :)

So mmwrapper runs mmenu, which is free to use up as much RAM as it wants :) But when you run something, mmenu spits out a -->line that says to run the pnd, and then mmenu exits, freeing up all its resources, and then mmwrapper (which takes up almost no RAM at all) runs the requested job.

The --> line will include the pnd_run.sh and all options etc .. the logic is all in mmenu, and mmwrapper just does what its told to, so its nice and small.

ANYWAY, thats all too much.. what you want to know is..

To run mmenu:

/path/to/mmwrapper -f/path/to/mmenu

And if its all in your path, thats:
mmwrapper -fmmenu

IF you want, you can also specify config files to use for mmenu, so you can run it in different ways, but you probably don't need to do that. Just flip your /etc/pandora/conf/mmenu.conf windowed option, and good to go.

IF you wish to run a pnd by hand, you could also use pnd_run binary; pnd_run /path/to/foo.pnd and it'll figure out how to run it and run it for you.

jeff
 
multimenu.png


Thanks Jeff. That's working reasonably well now.

The only issue now is minimenu quitting when an application is launched. While this is great news when it's being used as mini menu, it's not terribly appropriate for a multitasking environment. Is there a way to stop this happening? And I'm almost certain this functionality isn't built in, but would it be possible in a future version for a command line app to a) switch the tab minimenu is currently showing and B) bring minimenu to the front of the screen? I'm thinking of creating a Pseudo tab called 'home' and having the home icon in the taskbar return to mini menu and call up that tab.

Finally, as you can see, I'm having some problems with my Skin. I've decreased the amount of rows and columns by 1, and I now want to be able to increase the icon size. I've increased the max icon size in mmskin.conf but it seems to be scaling and then cropping. What's more, if there are too many icons on the screen then when I scroll down past the last icon it will go in an endless loop of scrolling the icons around and around, which can be stopped by pressing another direction on the d-pad and this sometimes results in a total lock up. :s

My mmskin.conf is as follows:

Code:
  #
  # mmskin.conf -- defines the art filenames, artwork positioning and other skin-related parameters.
  # Everything user-configurable should be in mmenu.conf, so they can switch skins without breaking their
  # functionality.
  # preview pic can be overrided: filename is _pvw#0.png ("0" is the subapp number within the pnd, same as for .ovr file)
  
  
  [minimenu]
  font            Vera.ttf
  font_ptsize        24
  
  [display]
  detail_bg_alpha        100    # when rendering the detail panel background, how transparent?
  font_rgba_r        126    # RGBA for the display text
  font_rgba_g        126    # RGBA for the display text
  font_rgba_b        126    # RGBA for the display text
  font_rgba_a        90    # RGBA for the display text
  battery_x        11    # (x,y) for battery level
  battery_y        451    # (x,y) for battery level
  hintline        Push SELECT for options # shown at bottom of screen
  hint_x            327       # (x,y) for hint line
  hint_y            451    # (x,y) for hint line
  clock_x            650    # (x,y) for clock
  clock_y            451    # (x,y) for clock
  
  [tabs]
  font            Vera.ttf
  font_ptsize        18
  tab_offset_x        4    # from left screen to first tab left
  tab_offset_y        3    # from top of screen to first tab top
  tab_width        132    # width of tab
  tab_height        35    # height of tab (for vertical clip)
  tab_selheight        39    # height of tab when its selected (for vertical clip)
  text_offset_x        10    # from left edge of tab to left edge of text
  text_offset_y        10    # from top edge of tab to top edge of text
  text_width        110    # clip text to this width
  
  [grid]
  font            Vera.ttf
  font_ptsize        14
  icon_max_width        75    # scale icons to..
  icon_max_height        75    # scale icons to..
  grid_offset_x        17    # from left screen to first cell column
  grid_offset_y        60    # from top screen to first cell row
  icon_offset_x        12    # from left edge of cell to left edge of icon in cell
  icon_offset_y        0    # from top edge of cell to top edge of icon in cell
  text_offset_x        50    # from left edge of cell to center of text centering (ie: center of icon presumably)
  text_offset_y        80    # from top of cell to top of text
  text_width        75    # max width of the text
  text_clip_x        5    # offset from cell edge to left edge of text, when the text width is being clipped to fit
  sel_offoffset_x        -5    # so selection can be a little bigger than  main cell, this is selection offset relative to top corner of icon
  sel_offoffset_y        -5    # so selection can be a little bigger than  main cell, this is selection offset relative to top corner of icon
  cell_width        106    # cell location is grid_offset_x + ( cell_width * column_number )
  cell_height        122    # cell location is grid_offset_y + ( cell_height * column_number )
  col_max            4    # number of columns to render into grid
  row_max            3    # number of rows to display before we stop rendering
  text_hilite_offset_y    80    # from top of cell to top of hilight
  arrow_up_x        450    # left edge of up-arrow showing more icons scrolled away
  arrow_up_y        80    # top edge of up-arrow showing more icons scrolled away
  arrow_down_x        450    # left edge of down-arrow showing more icons scrolled away
  arrow_down_y        380    # top edge of down-arrow showing more icons scrolled away
  arrow_bar_x        450    # left edge of scrollbar
  arrow_bar_y        98    # top edge of scrollbar
  arrow_bar_clip_w    15    # clip scrollbar artwork to width-X
  arrow_bar_clip_h    281    # clip scrollbar artwork to height-X
  scale_up_bool        0    # if 0, will not try to scale up icons
  
  [detailpane]
  show            1    # if 0, don't show detail pane artwork at all
  pane_offset_x        475    # left edge of detail pane graphic
  pane_offset_y        60    # top edge of detail pane graphic
  
  [detailtext]
  font            Vera.ttf
  font_ptsize        16
  cell_offset_x        488    # left edge of text cell
  cell_offset_y        292    # top edge of text cell
  cell_width        250    # width of cell (for text clipping)
  max_visible        11    # max number of menu items can show in detail pane
  
  [previewpic]
  cell_offset_x        482    # left edge of text cell
  cell_offset_y        67    # top edge of text cell
  cell_width        285
  cell_height        180
  scale_up_bool        0    # if 0, will not try to scale up preview
  
  [graphics]
  IMG_BACKGROUND_800480    800480_6.png
  IMG_BACKGROUND_TABMASK   tab1mask.png
  IMG_DETAIL_PANEL         detailpane2.png
  IMG_DETAIL_BG            detailpanebg.png
  IMG_SELECTED_ALPHAMASK   select.png
  IMG_SELECTED_HILITE     hilite.png
  IMG_TAB_SEL_L            tab_sel_tallL.png    # tab to be used for far left tab, selected
  IMG_TAB_SEL_R            tab_sel_tallR.png    # tab to be used for far right tab, selected
  IMG_TAB_SEL              tab_sel_tall.png
  IMG_TAB_UNSEL            tab_unsel.png
  IMG_TAB_UNSEL_L          tab_unselL.png    # tab to be used for far left tab, unselected
  IMG_TAB_UNSEL_R          tab_unsel.png    # tab to be used for far right tab, unselected
  IMG_TAB_LINE         tabline.png    # line under the unselected tab, but not left/right corners
  IMG_TAB_LINEL         tablinel.png    # line under unselected tab on far left
  IMG_TAB_LINER         tabliner.png    # line under unselected tab on far right
  IMG_ICON_MISSING     pandora60.png
  IMG_PREVIEW_MISSING     pandora150.png
  IMG_ARROW_UP         arrowup.png
  IMG_ARROW_DOWN         arrowdown.png
  IMG_ARROW_SCROLLBAR     arrowscroller.png
  IMG_HOURGLASS         hourglass.png
  IMG_FOLDER          /usr/share/icons/gnome/32x32/places/folder.png    # in dirbrowser mode
  IMG_EXECBIN         /usr/share/icons/gnome/32x32/categories/applications-other.png # in dirbrowser mode
 
Ah, yeah, mm was always meant to be used 'full screen sized' and 'single tasking', so you're probably bumping up against assumptions I coded in. (I tried to keep most assumptions and such in the conf files, but I did write the core of the thign really really quick when Craig signalled he wanted it :)

- quitting on launch; I can add a conf option to launch without exit, perhaps; not too hard to do at all (ie: just ask libpnd to run, rather then return 'how to run')
- switch tab via command line .. hmm, I could almost add a user-signal, so you could do something like 'kill -FOO mmenu' to make it switch tabs or something, but how to control which tab to go to.. guess I'll have to add a pipe or something, so commands can be sent to it. *Shrug*
- Didn't have a chance to look atr your confs, no caffeine yet in me today, but I wonder .. you're treating it like a less-than-full-length window now, so maybe theres a rounding error or something where its thinking in terms of 480, and getting weird; will have to look into it.

- I'd also like to soon add the option for DaveC so that his appdata can be kept with his apps
- and a menu to pop up to show a list of subcats for the current tab, so one can be picked, or something. ED wants that :)

- etc ...

jeff
 
skeezix said:
- Didn't have a chance to look atr your confs, no caffeine yet in me today, but I wonder .. you're treating it like a less-than-full-length window now, so maybe theres a rounding error or something where its thinking in terms of 480, and getting weird; will have to look into it.

Possibly, but it doesn't happen with any of the other skins.
 
Last edited by a moderator:
Back
Top