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: Open New Tab with A Specific Layout. #349

Closed
a-kenji opened this issue Apr 23, 2021 · 1 comment · Fixed by #625
Closed

Feature: Open New Tab with A Specific Layout. #349

a-kenji opened this issue Apr 23, 2021 · 1 comment · Fixed by #625
Assignees
Labels
action Issues related to actions layout issues related to the layout system

Comments

@a-kenji
Copy link
Contributor

a-kenji commented Apr 23, 2021

Allow opening of a new tab with a specific layout.

  • either make it configurable in the keybindings, which layout,
  • or have a prompt, like the renaming of a tab

Ideally both.

@SaintFenix
Copy link
Contributor

This and issue #370 may be twins.

@a-kenji a-kenji added the layout issues related to the layout system label Jul 20, 2021
@a-kenji a-kenji self-assigned this Jul 20, 2021
a-kenji added a commit to a-kenji/zellij that referenced this issue Jul 23, 2021
fixes zellij-org#603, fixes zellij-org#349

* The layout has now a unique `tabs` section,
  that can be used, like the `parts` section,
  everything that is not inside the tabs section
  is assumed to be present on every single tab
  that is opened.

  This is a BREAKING CHANGE for people that use
  custom `layouts` already, since the `tabs` section
  is not optional - for clarity and intentionality reasons.

  The functionality to specify multiple tabs is already there,
  but is still gated behind a panic, until zellij-org#621 is fixed.
  So for now one tab can be specified to load on startup.

* The `NewTab` action can optionally be bound to open
  a layout that is assumed to be in the new `tabs` section

  This is a BREAKING CHANGE for people that have the
  `NewTab` action already bound in the config file:

```
- action: [NewTab, ]
  key: [F: 5,]
```
must now be specified as:
```
- action: [NewTab: ,]
  key: [F: 5,]
```
  Optionally a layout that should be opened on the new tab can be
  specified:
```
- action: [NewTab: {
  direction: Vertical,
  parts: [ {direction: Horizontal, split_size: {Percent: 50}}, {direction: Horizontal, run: {command: {cmd: "htop"}}},],
  key: [F: 6,]
```
or:
```
- action: [NewTab: {direction: Vertical, run: {command: {cmd: "htop"} }},]
  key: [F: 7,]
```
or
```
- action: [NewTab: {
  direction: Vertical,
  parts: [ {direction: Vertical, split_size: {Percent: 25},run: {plugin: "strider" }}, {direction: Horizontal}],}, MoveFocus: Left,]
  key: [F: 8,]

```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action Issues related to actions layout issues related to the layout system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants