From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1TKW3m-0002W1-7A for mharc-grub-devel@gnu.org; Sat, 06 Oct 2012 11:12:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKW3k-0002Vl-Ah for grub-devel@gnu.org; Sat, 06 Oct 2012 11:12:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKW3i-0008WF-Q8 for grub-devel@gnu.org; Sat, 06 Oct 2012 11:12:56 -0400 Received: from gw1.reinform.de ([82.141.45.9]:60701 helo=mail-out.dmz.loef.reinform.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKW3i-0008W2-Dl for grub-devel@gnu.org; Sat, 06 Oct 2012 11:12:54 -0400 Received: from postfix.loef.reinform.de (postfix.loef.reinform.de [10.1.1.39]) by mail-out.dmz.loef.reinform.de (Postfix) with ESMTP id EB94DA839C for ; Sat, 6 Oct 2012 17:12:50 +0200 (CEST) Received: from mail.reinform.de (mail.reinform.de [82.141.45.14]) by postfix.loef.reinform.de (Postfix) with ESMTP id A512D1BC08 for ; Sat, 6 Oct 2012 16:31:05 +0200 (CEST) Received: from brain.wid.reinform.de (p3E9E93DA.dip.t-dialin.net [62.158.147.218]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.reinform.de (Postfix) with ESMTPSA id 8EFA7BB431 for ; Sat, 6 Oct 2012 17:12:49 +0200 (CEST) Received: from [10.2.1.32] (frodo.wid.reinform.de [10.2.1.32]) by brain.wid.reinform.de (Postfix) with ESMTP id 2A12387CDC for ; Sat, 6 Oct 2012 17:12:48 +0200 (CEST) Message-ID: <50704A6F.3070406@reinform.de> Date: Sat, 06 Oct 2012 17:12:47 +0200 From: "Dr. Tilmann Bubeck" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: Conditional themes? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.141.45.9 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 15:12:57 -0000 Hello! > You can make your theme dynamic by using percentages in your theme.txt Yes, this is right, but sometimes not enough. If you think of a 640x480 screen and compare its theme with a 1200x800 screen, than you see, that totally different themes are needed. Its not only percentage. You may decide to put more information into the boot screen or add more graphics, which is simply not possible on smaller screens. Sure, we can offer two independent themes and switch them statically. But I think of a generic solution having a bundle of themes, which get selected automatically depending on resolution or other stuff. > videoinfo --show-width --set width Your above suggestion is a third method to get the width. We now have: 1. ${gfxwidth} A variable getting its value automatically. 2. videoinfo --show-width --set width Extend videoinfo to offer "--show-width" and "--set" to set the value to a variable. 3. $(videoinfo --show-width) Extend videoinfo to offer "--show-width" and implement shell backticks to get that value Its a matter of taste, so I ask you, the GRUB developers, what you like more. Number 3 is most generic and most useful for other similar things and number 1 is the most easiest to implement. Thanks for any feedback. Till Am 04.10.2012 16:09, schrieb Dr. Tilmann Bubeck: > Hello GRUB, > > are there plans to make theming conditional, depending on screen > resolution? Today you have one theme, which is used for all screen > resolutions from 320x200 up to 1600x800. When using "gfxmode=auto" you > do not really know, which resolution you get. The theme may look ugly or > may be completly unusable (see > https://bugzilla.redhat.com/show_bug.cgi?id=850783). > > I could think of some application logic in grub.cfg, e.g. > > if [ "${gfxwidth}" -lt 800 ]; then > theme=${root}/grub2/themes/small > else > theme=${root}/grub2/themes/large > fi > > What do you think about that? > > An even more general idea would be to implement a shellish backticks > operator $() and extend some commands to print out information (here > "videoinfo"), like: > > width=$(videoinfo --show-width) > if [ "${width}" -lt 800 ]; then > theme=${root}/grub2/themes/small > else > theme=${root}/grub2/themes/large > fi > > Any comments? > > Kind regards, > Tilmann > > +-------+-------------------------------------------------------------+ > | | dr. tilmann bubeck reinform medien- und | > | | informationstechnologie AG | > | rein | fon : +49 (711) 7 82 76-52 loeffelstr. 40 | > | form | fax : +49 (711) 7 82 76-46 70597 stuttgart / germany | > | AG | cell.: +49 (172) 8 84 29 72 fon: +49 (711) 75 86 56-10 | > | | email: t.bubeck@reinform.de http://www.reinform.de | > | +-------------------------------------------------------------+ > | | pflichtangaben nach paragraph 80, AktG: | > | | reinform medien- und informationstechnologie AG, stuttgart | > | | handelsregister stuttgart, HRB 23001 | > | | vorstand: dr. tilmann bubeck (vorsitz) | > | | aufsichtsrat: frank stege (vorsitz) | > +-------+-------------------------------------------------------------+ -- +-------+-------------------------------------------------------------+ | | dr. tilmann bubeck reinform medien- und | | | informationstechnologie AG | | rein | fon : +49 (711) 7 82 76-52 loeffelstr. 40 | | form | fax : +49 (711) 7 82 76-46 70597 stuttgart / germany | | AG | cell.: +49 (172) 8 84 29 72 fon: +49 (711) 75 86 56-10 | | | email: t.bubeck@reinform.de http://www.reinform.de | | +-------------------------------------------------------------+ | | pflichtangaben nach paragraph 80, AktG: | | | reinform medien- und informationstechnologie AG, stuttgart | | | handelsregister stuttgart, HRB 23001 | | | vorstand: dr. tilmann bubeck (vorsitz) | | | aufsichtsrat: frank stege (vorsitz) | +-------+-------------------------------------------------------------+