Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add a display option to hide header and footer #168

Open
mskar opened this issue Sep 22, 2020 · 10 comments
Open

Feature request: Add a display option to hide header and footer #168

mskar opened this issue Sep 22, 2020 · 10 comments
Labels
new feature Completely new feature

Comments

@mskar
Copy link

mskar commented Sep 22, 2020

Please add an option to hide the header and footer.

What I see:

image

What I want to see (header and footer hidden):
image

@fasterit
Copy link
Member

Remove the meters from the left and right columns and disable "Leave a margin around header".
You'll have the top empty as you want it and just have to live with the footer for now.

@BenBE
Copy link
Member

BenBE commented Sep 28, 2020

If I see it correctly we could go about this by not adding the header and footer to the set of blocks to render in the main display routine. I'll take a look at this if I can build a patch for this. Shouldn't be too hard.

A quick&dirty change to get rid of the header is this patch:

diff --git a/Header.c b/Header.c
index d2f3b88..3e3b6a1 100644
--- a/Header.c
+++ b/Header.c
@@ -156,6 +156,8 @@ void Header_reinit(Header* this) {
 }
 
 void Header_draw(const Header* this) {
+   return;
+
    int height = this->height;
    int pad = this->pad;
    attrset(CRT_colors[RESET_COLOR]);
@@ -177,6 +179,8 @@ void Header_draw(const Header* this) {
 }
 
 int Header_calculateHeight(Header* this) {
+   return 0;
+
    int pad = this->settings->headerMargin ? 2 : 0;
    int maxHeight = pad;
 

This doesn't handle the case of the function bar yet, as the handling of the function bar is a bit more distributed across the code base.

While looking at the code base I noticed that vertical alignment of panels is not yet implemented; a change that would make implementation of this change a bit easier as this really would just be hiding the function bar under some circumstances. Unfortunately hiding the function bar makes the overall screen layout sensitive to keyboard input as entering incremental search mode would have to display the function bar and thus cause a resize of all panels to be triggered.

@fasterit
Copy link
Member

I think we can just leave the footer as is. No need to be able to configure everything and add that much complexity as a result.

@BenBE
Copy link
Member

BenBE commented Sep 29, 2020

Which leaves deciding on a keyboard shortcut for it (no need for CLI option nor permanent setting IMHO).

@fasterit
Copy link
Member

not either
esp. as we disable / enable UI elements via settings and not via keyboard shortcuts
consistency++

@BenBE
Copy link
Member

BenBE commented Sep 29, 2020

I think a "quick switch" for the header would be quite useful. removing and reconfiguring the header as I use it ATM would be quite a hassle each time.

@fasterit
Copy link
Member

Yes, that may make sense for the many-core users where there's a good piece of space taken up by the meters at the top.
The configuration switch could then be "Hide header by default" that could be enabled in settings, so a key has to be pressed to show it for those that prefer it this way around.

@kevinhwang91
Copy link

I don't like the footer which is redundant for me, and UI is different from top.

@cgzones
Copy link
Member

cgzones commented Jan 8, 2021

The function bar can be hidden since a3cced9 and hiding the header will be easy with #445.

@kevinhwang91
Copy link

The function bar can be hidden since a3cced9 and hiding the header will be easy with #445.

It works for me, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Completely new feature
Projects
None yet
Development

No branches or pull requests

5 participants