* Indicate to the user when text is copied to the clipboard
- broadcast CopyToClipboard event to plugins after selection has been
copied, and InputReceived event after any input has been received.
- add new ClientToServerMsg InputReceived
- subscribe status-bar plugin to new events, modify second line after
CopyToClipboard, reset it on InputReceived.
* remove unnecessary InputReceived ClientToServerMsg
- use existing Actions instead to know that user input has been received
* make status bar text copied hint bold green
* cleanup
* cleanup
* cleanup
It works as follows:
```
---
template:
direction: Horizontal
parts:
- direction: Vertical
split_size:
Fixed: 1
run:
plugin: tab-bar
- direction: Vertical
body: true
- direction: Vertical
split_size:
Fixed: 2
run:
plugin: status-bar
tabs:
- direction: Vertical
```
The tabs are created in the body section of the template.
* fix unexpected pane closing issue with nushell
nushell doesn't create a new process group when spawnning a process,
so all processes including the ones spwanned by us are in the same
foreground group. So if kernel will send signal to every member of this
group.
This patch fixes this issue by creating a new foreground process group
when spawnning a new terminal pane.
Fix#615
Signed-off-by: Tw <tw19881113@gmail.com>
* add comment about unsafe
Co-authored-by: Aram Drevekenin <aram@poor.dev>
* fix(compatibility): support changing index colors with osc
* style(fmt): make rustfmt happy
* style(fmt): make clippy happy
* style(fmt): make rustfmt happy
* docs(changelog): document fix
* work
* resize working
* move focus working
* close pane working
* selection and fullscreen working
* pane title line
* titles and conditional scroll title
* whole tab resize working
* plugin frames working
* plugin splitting working
* truncate pane frame titles
* cleanup
* panes always draw their own borders - also fix gap
* toggle pane frames
* move toggle to screen and fix some bugs
* fix plugin frame toggle
* fix terminal window resize
* fix scrolling and fullscreen bugs
* unit tests passing
* e2e tests passing and new test for new frames added
* refactor: TerminalPane and PluginPane
* refactor: Tab
* refactor: moar Tab
* refactor: Boundaries
* only render and calculate boundaries when there are no pane frames
* refactor: Layout
* fix(grid): properly resize when coming back from alternative viewport
* style: remove commented code
* style: fmt
* style: fmt
* style: fmt + clippy
* docs(changelog): update change
Fixes#621
* `ScreenInstruction::SetSelectable` etc.
were not updating correctly, if a NewTab was spawned, before
the plugin was finished setting the attributes.
Now the `tab_index` is used to send the instructions to
their respective tabs and plugins.
Simplify deserialzation for layouts, config and config options.
Move the logic responsible to `Setup::from_options()` in order
to be able to parse `main.rs` as well as adding new command easier.
fixes#603, fixes#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 #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,]
```
Adds the ability to dump the default layouts to
stdout, similar to the `zellij setup --dump-config`,
but now it needs the name of a currently existing
layout:
- default
- strider
- disable-status
`zellij setup --dump-layout [LAYOUT]`