Jump to content


Photo

Skinning Minimenu


  • Please log in to reply
62 replies to this topic

#1 skeezix

skeezix

    Mega GP Mania

  • GP Guru
  • 5088 posts
  • Gender:Male
  • Interests:Blog: http://www.rjmitchell.ca/~jeff/blog2009/

Posted 04 June 2010 - 04:26 PM

Making skins for minimenu is actually pretty easy, if you don't mind spelunking into a textfile :)

Many parts of the Pandora firmware use searchpaths to find files, which allows for you to put 'overrides' or additions to things on SD cards. For instance, if you want to mess with minimenu's main config (mmenu.conf from /etc/pandora/conf in the firmware), you can just make a copy of it and drop it into your SD's /pandora/mmenu directory, and hack away; if you totally blow things up, just eject your SD and back to factory defaults.

Similarly, you can drop skins right onto your SD so they don't eat up valuable space in your NAND, so you can just download them from somewhere and plop them on your SD to experiment with, and have no real risk when hacking around on them -- eject your SD and reboot, good to go. Minimenu just looks for all the skins it can find, and keeps a list of them. If you have 2 SD cards, it'll search both of them for directories that look like skins, and give the list to you to pick from when you hit Select -> Pick a skin.

The way skins are searched for is like this:

minimenu will look across your SD cards (or plugged in usb devices, etc), and its looking for a 'mmskin.conf' file. It looks in the following directory on each SD card:
/pandora/mmenu/skins
... within a directory for each skin.

ie: /pandora/mmenu/skins/myskin and /pandora/mmenu/skins/other_skin would be directories, each with mmskin.conf inside.

So if you create a directory..

/pandora/mmenu/skins/Fooby and stick a 'mmskin.conf' file into that directory (ie: /pandora/mmenu/skins/Fooby/mmskin.conf) -- thats it, you've got a skin available in the Select -> Pick a skin menu option in minimenu.

In practice, it is easiest to copy an existing skin (or download one), and use it as a starting point.

ie: Copy the defalut skin, call it 'copy', and boom, you now have two identical skins.. one called 'default' and another called 'copy'. Thats it :)

The default skin is available as a download here: http://www.codejedi....efault-skin.zip
You could also open Thunar (the directory browser) or use the Terminal to copy the files .. from /etc/pandora/mmenu/skins/default (or something like that)

Just extract the zip into your SD /pandora/mmenu/skins directory; the directory of name 'default' SHOULD BE RENAMED so as not to collide with the build in default. Change it to say 'Fooby' or 'MySkin' or 'whatever'.

example:

Extract the zip, and call the directory 'whatever'. On your SD, thats:

/pandora/mmenu/skins/whatever
--> with file 'mmskin.conf' and a bunch of .png graphic files inside 'whatever' directory

Thats it -- now you have a new minimenu skin called 'whatever', showing up in your list; you can select it in minimenu, and it'll work fine, and look exactly like the default skin.

If you reboot without an SD, or break the skin entirely, minimenu should try to fall back to the default built in skin, so as not to break your system.

At this point, you'll have 'mmskin.conf' and a bunch of .pnd (graphic) files in your 'whatever' directory on your SD.

Hack away -- edit them as you see fit! You can make a pile of skin directories, or download a pile of them and tweak them. Use any normal text editor (Notepad, vi, emacs, Textpad, whatever, as long as you're not saving the file out as a Word doc. Try to use Unix line-endings.)

Minimenu is pretty flexible, but not really insanely flexible (yet) in this regard -- it was designed to be minimal, easy and fast to use, not the most expandable tool ever. But we'll see where it goes.

The mmskin.conf file is pretty well documented -- it described where to draw things, how many rows and columns in the grid, what fonts and colours to use, and so on. If you like, I can expand upon the commentary there.

jeff

Also see this older 'configuration guide' which might be a little out of date:
http://pandorawiki.o...n_Documentation

#2 dflemstr

dflemstr

    It's a ball.

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2249 posts
  • Gender:Male
  • Location:Stockholm, Sweden

Posted 04 June 2010 - 04:38 PM

Sounds great; I would create themes if I had a Pandora ;)

Quick question: Why is the override for "/etc/pandora/conf/mmenu.conf" called "...sd/pandora/mmenu/mmenu.conf" and not "...sd/pandora/conf/mmenu.conf"? It's kinda confusing when the paths don't follow a system. IMHO, this calls for a generic overlay library that you can tell to "locate 'mmenu/mmenu.conf'", and it'll first look in "...sd/pandora/mmenu/mmenu.conf" and then "~/.pandora/mmenu/mmenu.conf" and finally "/etc/pandora/mmenu/mmenu.conf". Those paths (aka: "/media/*/pandora:~/.pandora:/etc/pandora") would then be specified in e.g. "/etc/pandora.conf" so that there is *one* canonical location for custom paths. Would make things a lot smoother in my humble opinion.
That library would be usable by all Pandora applications. The themes would use the system, too, of course. Maybe something for the ever-growing libpnd TODO list?

EDIT: Or why not just follow the XDG standard for everything (themes, configs, etc)? I hate duplicated effort. See http://standards.fre...st/ar01s03.html

Edited by dflemstr, 04 June 2010 - 04:43 PM.


#3 skeezix

skeezix

    Mega GP Mania

  • GP Guru
  • 5088 posts
  • Gender:Male
  • Interests:Blog: http://www.rjmitchell.ca/~jeff/blog2009/

Posted 04 June 2010 - 04:50 PM

Really, its a goof.

You can actually override other confs by dropping them in /pandora/conf (eventmap, desktop, apps, etc.)

The history of course was .. we thought we were doing our final firmware build on day X, and at about 2 weeks before that Craig really wanted me to make a menu, so I wrote it over a couple days and extended it.. so a total of about 5 nights of hacking, and then the subsequent feature creep over time :) So yeah, I really should update it to look in /pandora/conf, you are right :) (on the other hand, you could look at it as if its keeping minimenu stuff together, so mmenu.conf nearby to skin's, instead of splitting mmenu.conf to be with system.confs and isolating the skins away.)

Anyway, I expect very few will ever mess with those conf files at all (theres little need), but that messing with skins might be something common.

jeff

dflemstr: btw, libpnd includes code for locating files across searchpaths, which is how conf files are pulled in; its just mmenu for whatever quick reason in the middle of the night, I used a different searchpath than the canonical one :)

#4 Pleng

Pleng

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2944 posts

Posted 14 June 2010 - 11:57 AM

OK here's a couple I quickly threw together. In reality the only changes are the background image, and bluewash also had a recoloured highlight. Still they're here for anybody to install if they like. I'm using redwash.

Skeezik, can I suggest that Pmenu is set to also search in /pandora/appdata/mmenu/skins ? That way we can keep the root of our SD cards nice and clean :)

Added 2 more; toybox and corporate. The corporate one doesn't render on the Pandora in the same way it does on my desktop. My desktop shows a nice smooth transition between the background colours, on the Pandora it's chunky. Any ideas why?

Attached Files


Edited by Pleng, 14 June 2010 - 01:55 PM.


#5 Pleng

Pleng

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2944 posts

Posted 14 June 2010 - 01:56 PM

sorry, my first two skins got lost in the edit. Here they are.

Attached Files


Edited by Pleng, 14 June 2010 - 01:56 PM.


#6 skeezix

skeezix

    Mega GP Mania

  • GP Guru
  • 5088 posts
  • Gender:Male
  • Interests:Blog: http://www.rjmitchell.ca/~jeff/blog2009/

Posted 15 June 2010 - 01:33 AM

Post screenshots so we can see?

Pleng -- good idea; change the line in your mmenu.conf if you like:
skin_searchpath /media/*/pandora/mmenu/skins:/media/*/pandora/appdata/mmenu/skins:/etc/pandora/mmenu/skins:./minimenu/skin

Likewise I'm making it look _also_ in /pandora/appdata/mmenu for mmenu.conf, so you can stick an override there.

You'll need to hack your mmenu.conf as noted, and granb this binary so you can relocate your mmenu.conf; completely untested, so rn mmenu from Terminal in xfce first, to see if it works:

http://www.codejedi.com/pandora/minimenu/patches/appdata-dir-for-skins/mmenu

jeff

#7 skeezix

skeezix

    Mega GP Mania

  • GP Guru
  • 5088 posts
  • Gender:Male
  • Interests:Blog: http://www.rjmitchell.ca/~jeff/blog2009/

Posted 15 June 2010 - 01:34 AM

oh great, my local git just blew up. Why do these thigns happen the day your low-free-time-for-a-month period starts, and not last week? frak sakes.

jeff

#8 Pleng

Pleng

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2944 posts

Posted 15 June 2010 - 08:06 AM

Post screenshots so we can see?


would love to... how can I?!! :)

Pleng -- good idea; change the line in your mmenu.conf if you like:
skin_searchpath /media/*/pandora/mmenu/skins:/media/*/pandora/appdata/mmenu/skins:/etc/pandora/mmenu/skins:./minimenu/skin


thanks, I also had to change my catmap_searchpath

You'll need to hack your mmenu.conf as noted, and granb this binary so you can relocate your mmenu.conf; completely untested, so rn mmenu from Terminal in xfce first, to see if it works:

http://www.codejedi....for-skins/mmenu

jeff


All working, thanks! Where should I place the binary to replace the existing file?

cheers!

#9 skeezix

skeezix

    Mega GP Mania

  • GP Guru
  • 5088 posts
  • Gender:Male
  • Interests:Blog: http://www.rjmitchell.ca/~jeff/blog2009/

Posted 16 June 2010 - 12:03 AM

/usr/bin/mmenu if memory serves, but verify first.

jeff

For screenshots; I have nmy own saerver so never had to worry about it; try sending them to flickr or something, and then linking :) *shrug*

#10 Pleng

Pleng

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2944 posts

Posted 16 June 2010 - 09:50 AM

Ok so the new executable worked fine when running from my home directory by typing ./mmenu

I then moved it to /usr/bin with sudo mv mmenu /usr/bin and switched to it with the gui switcher and I was left with nothing but a blank screen and a mouse cursor.

As I have minimenu as my default menu I'm greeted with the same screen whenever I restart so I guess I'll have to perform a reflash. Woohoo 2 in 2 days. :P

idea for next hotfix: holding L while booting allows access to a command line. Include Pico! :D

as for screenshots, hosting is not a problem. However as far as I'm aware minimenu doesn't have any facilities for actually grabbing an image from the screen... or am I missing something?

#11 Trevsweb

Trevsweb

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 517 posts
  • Gender:Not Telling

Posted 16 June 2010 - 11:23 AM

just made a quick skin...

its called midnight
Posted Image
http://trevsweb.com/...ce/midnight.zip

I dont know how to take screenshots yet :S
anyway would love to know how to change the font size of the battery statii and time if possable.
enjoy the hourglass easter egg btw ;)

Edited by Trevsweb, 16 June 2010 - 11:23 AM.


#12 fusion_power

fusion_power

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2998 posts
  • Location:germany
  • Interests:GP2X ;)

Posted 16 June 2010 - 01:01 PM

Uh instead of dealing with configs, overwriting stuff etc... ( I know you guys like this) wouldn't it be more comfortable to name each skin individualy and simply select the skin with an Menu Option? ;)
Skins were put in one Folder and you can instantly switch through the themes and select your fav. Skin. Think simple! :D

#13 Trevsweb

Trevsweb

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 517 posts
  • Gender:Not Telling

Posted 16 June 2010 - 02:58 PM

Uh instead of dealing with configs, overwriting stuff etc... ( I know you guys like this) wouldn't it be more comfortable to name each skin individualy and simply select the skin with an Menu Option? ;)
Skins were put in one Folder and you can instantly switch through the themes and select your fav. Skin. Think simple! :D


thats what it does...

#14 fusion_power

fusion_power

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2998 posts
  • Location:germany
  • Interests:GP2X ;)

Posted 16 June 2010 - 03:22 PM


Uh instead of dealing with configs, overwriting stuff etc... ( I know you guys like this) wouldn't it be more comfortable to name each skin individualy and simply select the skin with an Menu Option? ;)
Skins were put in one Folder and you can instantly switch through the themes and select your fav. Skin. Think simple! :D


thats what it does...

Then I'm happy. :D

#15 SomeGuy99

SomeGuy99

    :)

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2186 posts
  • Gender:Male
  • Location::|
  • Interests::D
    :/

Posted 16 June 2010 - 09:34 PM

just made a quick skin...

its called midnight
Posted Image
http://trevsweb.com/...ce/midnight.zip

I dont know how to take screenshots yet :S
anyway would love to know how to change the font size of the battery statii and time if possable.
enjoy the hourglass easter egg btw ;)


Awesome skin, thanks!