And infrastructure to make it possible
to add more dynamic completions for
different shells in the future.
eg:
```
zellij attach [completes-active-sessions]
zellij kill-session [completes-active-sessions]
```
fixes: #1030
Add ability to set `ENVIRONMENT VARIABLES` from the
config and the layout files.
example:
```
env:
ZELLIJ_CONFIG:
DEFAULT
```
or
```
env:
ZELLIJ_LAYOUT_NAME:
BUILD_SESSION
```
If two keys conflict (configuration and layout), then the key
from the layout is used.
fixes: #1059
* feat(layout): add focus attribute in layout
* feat: add state of focus to tab
* chore: i love clippy
* test(layout): update focus options
* feat: add focus pane
* feat: apply focus-pane when layout is only loaded
* change the instruction name for focus-on-tab
* chore: apply cargo-fmt
* test: add e2e testcase
* Read pane name from layout
* Update pane name at runtime
* Fix tests
* prefer and render pane name over pane title
* fix clippy errors
* fix after rebase
feature(layout): add layout config (#866)
* It is now possible to configure zellij through a layout:
The config file and the layout file will be merged, on conflicting
options the order is as follows:
1. config options `zellij options`
2. layout
3. config
Example:
```
---
template:
direction: Horizontal
parts:
- direction: Vertical
body: true
- direction: Vertical
borderless: true
split_size:
Fixed: 1
run:
plugin:
location: "zellij:tab-bar"
default_shell: fish
```
* fix(options): handling ond verwriting cli opts
* previously it was only possible to turn off certain features with a
command line option, now it is possible to also overwrite this
behavior in a sane way, for that some breaking changes happened:
following options got renamed and inverted:
```
disable_mouse_mode -> mouse_mode
no_pane_frames -> pane_frames
```
following cli options got added:
```
mouse-mode [bool]
pane-frames [bool]
simplified-ui [bool]
```
the following cli flag got removed:
```
simplified-ui
```
They can be specified in the following way:
```
zellij options --mouse-mode true
```
in order to enable the mouse mode, even if it is turned off in the
config file:
```
mouse_mode: false
```
The order is now as follows:
1. corresponding flag (`disable-mouse-mode`)
2. corresponding option (`mouse-mode`)
3. corresponding config option (`mouse_mode`)
* add: options and flags for the same value conflict
* example:
```
zellij options --mouse-mode true --disable-mouse-mode`
```
```
$ error: The argument '--mouse-mode <mouse-mode>' cannot be used with '--disable-mouse-mode'
```
add the ability to toggle boolean options with a cli flag:
example:
if the pane frames are turned off in the config file,
then passing in the `--no-pane-frames` flag will toggle the
pane frames on
* feat: add session configuration to layout template
WIP: prototyping for issue #611
* test(layout): add session name
* feat(layout): add cond flow to check session name
* feat(layout): update session
* feat: add function to attach a session
* fix(layout): update feedback
* attach option only works when layout template exists.
* feat(layout): add conditional for session-layout
* update default attach value