Commit Graph

1414 Commits

Author SHA1 Message Date
Tw
d1b5a69918
eliminate unused imports warnings during compile (#654)
Signed-off-by: Tw <tw19881113@gmail.com>
2021-08-23 15:41:26 +02:00
a-kenji
88b4063879 Add template section in layout file
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.
2021-08-21 23:27:23 +02:00
Aram Drevekenin
643b7df35c
fix(compatibility): properly paste multilines (#653)
* fix(compatibility): properly paste multilines

* test(input): fix bracketed paste assertion
2021-08-20 16:54:18 +02:00
Aram Drevekenin
a4e6e89a76
fix(compatibility): do not remove frame when clearing viewport (#652) 2021-08-20 16:04:12 +02:00
Aram Drevekenin
2100865063
fix(performance): undo degredation introduced in 646 (#651)
* fix(performance): undo degredation introduced in 646

* style(fmt): make rustfmt happy

* style(fmt): make clippy happy
2021-08-19 19:02:05 +02:00
Aram Drevekenin
e889891604
Fix scrolling (#650)
* fix(grid): scroll up on empty line

* fix(grid): line wrapping while scrolling

* style(grid): fix names

* docs(changelog): document fix
2021-08-19 13:28:08 +02:00
Aram Drevekenin
fde38dcb44
docs(changelog): nushell fix 2021-08-16 14:20:23 +02:00
Tw
e477f3b5cd
fix(child-process): unexpected pane closing issue with nushell (#648)
* 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>
2021-08-16 14:19:05 +02:00
Aram Drevekenin
da3f20c816
fix(compatibility): support changing index colors with osc (#646)
* 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
2021-08-13 17:23:39 +02:00
Aram Drevekenin
a37d3e5889
feat(ui): pane frames (new pane UI) (#643)
* 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
2021-08-12 14:50:00 +02:00
Aram Drevekenin
426cee728a
docs(governance): arbiter no-confidence vote 2021-08-11 14:44:59 +02:00
Sagittarius-a
24ef96b965 fix cargo clippy lint 2021-08-03 22:16:40 +02:00
Sagittarius-a
4f482f3b63 store tab history in a stack-like data structure 2021-08-03 21:15:06 +02:00
Sagittarius-a
aff9973616 fix: fix clippy warning 2021-08-03 21:12:20 +02:00
Sagittarius-a
081c55458d fix: rename action to ToggleTab 2021-08-03 21:12:20 +02:00
Sagittarius-a
404faf0498 fix: fix toggle to previous tab when deleting tabs 2021-08-03 21:12:20 +02:00
Sagittarius-a
734636637d fix: rename variable as stated in pull request 2021-08-03 21:12:19 +02:00
Sagittarius-a
5799ea4e5d feat(tab): add keybind to go to last tab visited
Fixes #398.

Tab key is used as default for the `GoToLastTab` action.
2021-08-03 21:11:50 +02:00
a-kenji
2e17756785 Change layout panics to errors
* Adjust and add tests for the change
2021-08-02 12:07:30 +02:00
a-kenji
9a5b6690af Add example tab layouts 2021-08-01 20:27:43 +02:00
a-kenji
fc7bc3cc8b Merge branch 'main' of https://github.com/zellij-org/zellij into tab-layout 2021-08-01 20:25:33 +02:00
a-kenji
309f4a62bf docs(changelog): Fix update plugins #621 2021-08-01 17:50:43 +02:00
a-kenji
4417263ce4
Merge pull request #634 from a-kenji/fix/quick-tabs-621
Fix plugin attribute update on inactive tab
2021-08-01 17:47:51 +02:00
a-kenji
542999e07f Fix plugin attribute update on inactive tab
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.
2021-08-01 00:38:27 +02:00
a-kenji
32e0fa0b06 docs(changelog): Simplify deserialization slightly 2021-07-28 19:12:31 +02:00
a-kenji
424786594a
Merge pull request #633 from a-kenji/simplify-setup
Simplify deserialization for layouts, config
2021-07-28 19:11:34 +02:00
a-kenji
331807c16a Simplify deserialization for layouts, config
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.
2021-07-28 18:17:49 +02:00
dantepippi
781c6a94e4
Merge pull request #632 from dantepippi/update-organization-members
Adding Dante to governance.md
2021-07-28 10:25:36 -03:00
Dante Pippi
bf4a149fe3 Adding Dante to governance.md 2021-07-28 10:24:32 -03:00
a-kenji
a62dea4ea3 docs(changelog): Add ScrollToBottom action #626 2021-07-25 20:36:07 +02:00
a-kenji
21f8d6e915
Merge pull request #626 from sagittarius-a/feature/scroll-mode-restore-on-sigint
feat(scroll): Restore scroll position on SIGINT
2021-07-25 20:32:31 +02:00
Sagittarius-a
7da214fcca feat(scroll): Restore scroll position on SIGINT
Fixes #606

Currently scroll down to bottom then exits scroll mode.
2021-07-24 21:28:19 +02:00
a-kenji
806ffad553 fixup! fix e2e fixtures 2021-07-23 17:44:05 +02:00
a-kenji
f323880fb7 !fixup cargo fmt 2021-07-23 17:25:05 +02:00
a-kenji
485339c584 Merge branch 'main' of https://github.com/zellij-org/zellij into tab-layout 2021-07-23 17:24:45 +02:00
a-kenji
5ede25dc37 Add tabs to layouts
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,]

```
2021-07-23 17:13:35 +02:00
a-kenji
f5734f2bf1 docs(changelog): add dump layout to stdout 2021-07-22 18:47:28 +02:00
a-kenji
e2d086d591
Merge pull request #623 from a-kenji/feature/dump-layout
Add cmd to dump `layout` to stdout
2021-07-22 18:44:29 +02:00
a-kenji
d74a1bd7c5 docs(changelog): display session-name in tab-bar 2021-07-22 16:48:54 +02:00
a-kenji
69173acd5a
Merge pull request #608 from LovecraftianHorror/display-session-name
Display session name within `zellij`
2021-07-22 16:46:49 +02:00
a-kenji
903cb68a40 Add cmd to dump layout to stdout
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]`
2021-07-22 16:40:36 +02:00
a-kenji
c42b0f867e fixup! merge
* Missed something while merging
2021-07-22 16:30:06 +02:00
a-kenji
c9ccfb2919
Merge branch 'main' into display-session-name 2021-07-22 16:12:35 +02:00
Brooks Rady
2bb3c08ae2
chore(changelog): add logging feature 2021-07-21 12:38:25 +01:00
Brooks Rady
b55c879e7a
feat(logging): Implement a universal logging system
* Added `log` crate support for logging within Zellij (https://docs.rs/log/0.4.14/log/#macros)
* Messages sent over the `stderr` of plugins are now logged as well, bringing back `dbg!` support!
2021-07-21 12:33:42 +01:00
qepasa
290704a056
Cleanup Cargo.toml 2021-07-21 07:20:07 +02:00
qepasa
56b7cbf58c
Cleanup Cargo.toml 2021-07-21 07:19:39 +02:00
qepasa
f0bc297743
Merge branch 'main' into unified-logging 2021-07-20 22:19:03 -07:00
Paweł Palenica
0cabc5f112 Read from LoggingPipe returns error 2021-07-20 22:17:26 -07:00
Lovecraftian Horror
c5a25f267f Revert "Display just session name with tab names"
This reverts commit b25842a563.
2021-07-20 13:14:13 -04:00