linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] menuconfig: reclaim vertical space
Date: Tue, 21 Mar 2023 15:02:01 +0900	[thread overview]
Message-ID: <CAK7LNASCCKXGo2ODHFdijgJ7b0CTyK50Lo4VUsJyBfsfZWSMog@mail.gmail.com> (raw)
In-Reply-To: <20230311114248.36587-3-adobriyan@gmail.com>

On Sat, Mar 11, 2023 at 8:43 PM Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
> Menuconfig has lots of vertical space wasted: on my system there are
> 17 lines of useful information about config options and 14 lines of
> useless fluff: legend, horizontal separators and shadows.
>
> Sitation is even worse on smaller terminals because fixed vertical
> lines do not go away, but config option lines do, further decreasing
> informational density. Minimum reasonable 80×24 text console has only
> 10(!) lines of menus presented which is less than half of the screen.



I think nconfig is a better fit for your system.


In my understanding, the concept of menuconfig
is to use a similar appearance to the 'dialog' tool
although we have largely modified the code.




>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
>  scripts/kconfig/lxdialog/menubox.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/kconfig/lxdialog/menubox.c b/scripts/kconfig/lxdialog/menubox.c
> index 5eb67c04821f..dc608914c636 100644
> --- a/scripts/kconfig/lxdialog/menubox.c
> +++ b/scripts/kconfig/lxdialog/menubox.c
> @@ -183,14 +183,14 @@ int dialog_menu(const char *title, const char *prompt,
>         if (height < MENUBOX_HEIGTH_MIN || width < MENUBOX_WIDTH_MIN)
>                 return -ERRDISPLAYTOOSMALL;
>
> -       height -= 4;
> +       height -= 2;
>         menu_height = height - 10;
>
>         max_choice = MIN(menu_height, item_count());
>
>         /* center dialog box on screen */
> -       x = (getmaxx(stdscr) - width) / 2;
> -       y = (getmaxy(stdscr) - height) / 2;
> +       x = 0;
> +       y = 2;
>
>         dialog = newwin(height, width, y, x);
>         keypad(dialog, TRUE);
> --
> 2.39.2
>


You missed to adjust dialog_textbox().


(1) Run 'make menuconfig'
(2) Press < Help > button to show help message
(3) Press < Exit > button to get back


When you do (2) and (3), please make sure
the size of the grey window is not changed.

This is how the current menuconfig works.



I want to leave the blue frame.
My personal preference is

  height -= 3;
  width -= 2;



--
Best Regards
Masahiro Yamada

  parent reply	other threads:[~2023-03-21  6:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-11 11:42 [PATCH 1/3] menuconfig: delete shadows, prepare for vertical space reclaim Alexey Dobriyan
2023-03-11 11:42 ` [PATCH 2/3] menuconfig: reclaim horizontal space Alexey Dobriyan
2023-03-13  0:29   ` Randy Dunlap
2023-03-13 19:27     ` Alexey Dobriyan
2023-03-11 11:42 ` [PATCH 3/3] menuconfig: reclaim vertical space Alexey Dobriyan
2023-03-13  0:29   ` Randy Dunlap
2023-03-21  6:02   ` Masahiro Yamada [this message]
2023-03-13  0:29 ` [PATCH 1/3] menuconfig: delete shadows, prepare for vertical space reclaim Randy Dunlap
2023-03-21  5:35 ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK7LNASCCKXGo2ODHFdijgJ7b0CTyK50Lo4VUsJyBfsfZWSMog@mail.gmail.com \
    --to=masahiroy@kernel.org \
    --cc=adobriyan@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).