Updates for the graphic menu system

131 views
Skip to first unread message

Bean

unread,
Dec 9, 2009, 4:46:00 PM12/9/09
to burg-...@googlegroups.com
Hi,

r1785 has the following changes:

* Support variable expansion for image filename. For example:

screen {
background = "${prefix}/back.png"
}

The name is expanded at runtime, it should work for separate /boot partition.

* It would select normal menu viewer by default, to enable new menu
system, use command menu_viewer.ext explicitly.

* Improve image cache, reduce load time.

* Support font auto loading. First, copy pf2 files to
/boot/grub/fonts, then generate font list:

cd /boot/grub/fonts
grub-mkfont -i *.pf2 > font.lst

Then you can skip loadfont commands, font would be loaded
automatically when it's used for the first time.

* Submenu position control

You can use popup property to control where the sub menu is popup, for example:

screen {
panel {
id = __menu__
popup = left
}
}

template_submenu {
panel {
popup = right
}
}

Its value can be: left, right, top, bottom, abs. abs means absolute
positioning, if popup is not set, menu system would try to determine
position automatically. The staggered popup menu should be fixed by
now.

* Change default variable

Previously, default variable is set using menu title, now it's changed
back to index number, which is compatible with normal menu. If you
have save default using previous version, it would cause problem as
the meaning of default has changed from text to number. To fix it,
remove /boot/grub/grubenv and run update-grub to generate a new
environment file.

* /etc/default/grub integration.

You can now configure theme using /etc/default/grub, no need to edit
40_custom manually.

GRUB_DEFAULT sets the default menu, 0 based index number, set to
string saved to enable savedefault.
GRUB_THEME select the theme
GRUB_GFXMODE sets graphic mode, default value is 640x480.

After setting the variables, use update-grub to generate grub.cfg.
Don't forget to remove the old items from 40_custom.

Theme file can be dowloaded from the files section of:

http://groups.google.com/group/burg-devel

theme_default.tar.gz: Default theme, contains theme minimum, proto,
ubuntu and winter. It also contains the font files.
theme_sora.tar.gz: Theme created by Evan Gillies, contains theme sora,
sora/clean and sora/extended.

To use them, extract to the grub directory:

cd /boot/grub
tar xzf ~/theme_default.tar.gz
tar xzf ~/theme_sora.tar.gz

Then change /etc/default/grub file, for example, add these lines at the end:

GRUB_GFXMODE=1024x768
GRUB_THEME=sora

And use update-grub to generate grub.cfg. You also need to use
grub-install to install to mbr/bs when upgrading from previous
version.

--
Bean

Project: https://launchpad.net/burg
Document: https://help.ubuntu.com/community/Burg
Mailing list: http://groups.google.com/group/burg-devel

Bean

unread,
Dec 10, 2009, 3:57:15 AM12/10/09
to burg-...@googlegroups.com
Hi,

r1786 adds a new feature, allows to use + in config.lst to indicate
merge, this is useful in creating themes.

Theme is very easy to make. First, decide a theme name, then copy
files to the corresponding directory. For example, for theme test,
files are inside:

/boot/grub/test/

in this directory, create a config.lst file which contains the config
files to load, for example:

test/theme.txt +test/menu.txt +test/icons.txt

Filenames are related to grub directory /boot/grub. if there is +
before the name, it uses merge_config to load this file, otherwise it
uses load_config.

Pathname inside theme file should uses $prefix to locate files, for example:

screen {
background = "${prefix}/test/background.png"
}

You can also create sub-theme, for example, we can have two sub-theme
test/test1 and test/test2. Create the config.lst in these directories,
for example:

test/test1/config.lst:

test/theme.txt +test/menu.txt +test/icons.txt +test/test1/custom.txt

test/test1/config.lst:
test/theme.txt +test/menu.txt +test/icons.txt +test/test1/custom.txt

test/test2/config.lst:
test/theme.txt +test/menu.txt +test/icons.txt +test/test2/custom.txt

It can share some config file with the main test theme.
Reply all
Reply to author
Forward
0 new messages