zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
22k stars 670 forks source link

Contextually Hiding Pane Borders (Single Pane No Border) #3704

Open Jazztache opened 1 month ago

Jazztache commented 1 month ago

Hello!

I would really like it if the option for auto-hiding borders was added to Zellij. This feature would hide the border based on the user's preferences.

This is an update to the existing pane_frames option. I got this idea because I wish the borders would turn off when there is one pane.

The setting would be a new suboption of ui.pane_frames, as to not conflict with the pane_frames [bool] option.

The options would be:

The main reason for this suggestion is the single-pane feature. The use for this would be to let apps have two extra spaces of breathing room and have less visual clutter when using Zellij with one pane. Then when you need a second pane, the borders come back. This is also great if you mainly use Zellij for the tab bar and only need a pane for a quick command.

The option should be set out like so:

ui {
  pane_frames {
    pane_borderless "never" // Current, default Zellij behaviour.
    pane_borderless "always" // No dividers or borders, just have to of them next to each with no padding, margins, or anything to visually separate them.
    pane_borderless "single-pane" // Only show borders if (panes.count >= 2), otherwise no borders.
  }
}

Thankyou for your consideration!

Zykino commented 3 weeks ago

There is no option like this.

But zjstatus (the status-bar imsnif recommended to you on the other thread) has a config for that. I talked to its maintainer, and they can see it being also exposed on a specific plugin. So people wanting only this functionality would be able to have it without overriding the default bars.

But in 0.40.1 it needs quite a few hacks. So it will be for next version (that had a lot of the required API for background plugins).

tymoyato commented 1 week ago

It will be great

But as an alternative you can still be able to do it this way by not using templates

layout {
    tab name="1" {
        pane size=1 borderless=true { plugin location="tab-bar"; }
        pane borderless=true {}
        pane size=1 borderless=true { plugin location="status-bar"; }
    }
    tab name="2" {
        pane size=1 borderless=true { plugin location="tab-bar"; }
        pane borderless=true {}
        pane size=1 borderless=true { plugin location="status-bar"; }
    }
    tab name="3" {
        pane size=1 borderless=true { plugin location="tab-bar"; }
        pane borderless=true {}
        pane size=1 borderless=true { plugin location="status-bar"; }
    }
    tab name="4" {
        pane size=1 borderless=true { plugin location="tab-bar"; }
        pane borderless=true {}
        pane size=1 borderless=true { plugin location="status-bar"; }
    }
}