Commit Graph

1340 Commits

Author SHA1 Message Date
a-kenji
9de73d2920 docs(changelog): Solely name tab in tabs section 2021-09-21 16:41:12 +02:00
a-kenji
bbe2583904
feat(layout): specify only tab name in tabs section (#722)
Allow specifying only the tab name in the `tabs` section

- For example this is now possible:
```
tabs:
  - name: first
    parts:
      - direction: Vertical
      - direction: Vertical
  - name: second
  - name: third
```
  For that the tab section defaults the direction to
  `direction::Horizontal`

- Adds an error upon specifying a tab name inside the `parts` section
  of the tab-layout
2021-09-21 16:39:37 +02:00
Brooks J Rady
71b600b821 fix(plugin): create missing data directories as needed 2021-09-19 16:50:23 +01:00
Brooks J Rady
c29b8e98bf fix(strider): update host mount-point 2021-09-19 16:38:36 +01:00
Brooks J Rady
1a1c10a226 Merge branch 'main' of github.com:zellij-org/zellij 2021-09-19 16:25:52 +01:00
Brooks Rady
16844c375d
chore(docs): update changelog 2021-09-19 16:22:01 +01:00
Tw
4b792ca29f
feat(plugin): add plugin data directories (#723)
Every plugin will have following two directories for its use:

`./data`: Plugin's own data should be saved here, every plugin will have its own directory.
`/host/`: All plugins have access to this directory, it defaults to the current working directory of Zellij.

Signed-off-by: Tw <tw19881113@gmail.com>
2021-09-19 16:20:05 +01:00
Brooks Rady
84e045aeef
chore(docs): add new Visible event 2021-09-19 14:17:20 +01:00
Tw
4a7983f1c6
feat(plugin): add visibility event for the plugin (#717)
When a tab becomes active/inactive, it send corresponding visibility event to its containing plugins.

Signed-off-by: Tw <tw19881113@gmail.com>
2021-09-19 14:14:50 +01:00
Kunal Mohan
d16cd31927 Docs(changelog): attach --create feature (#731) 2021-09-19 18:32:59 +05:30
GPery
b761a28702
Implement attach --create subcommand flag to create session if one does not exist (#731)
* Implement attach --create

* fixup! Implement attach --create

* fixup! Implement attach --create

* fixup! Implement attach --create

* fixup! Implement attach --create
2021-09-19 18:17:52 +05:30
a-kenji
eb22a6c171
Add link to docs to README.md (#732) 2021-09-19 13:38:53 +02:00
Tw
ac7bcf1169
fix(server): fix leakage of SessionMetaData (#728)
There are different reasons leading the server thread exits,
currently we only release the cached session data when client
exits normally. This fix covers all the cases.

Signed-off-by: Tw <tw19881113@gmail.com>
2021-09-19 00:06:15 +05:30
Aram Drevekenin
72b0474d02
docs(changelog): update cwd fix 2021-09-17 09:08:10 +02:00
spacemaison
40e74d5b85
fix(cwd-pane): Fix for cwd not being inherited when switching tabs (#729)
fixes #727

Inheriting the current working directory didn't work when switching
between tabs. This happened because the event to notify the pty of an
pane change was triggered when setting the active pane inside of the
current tab, but switching between tabs will only cause a re-render of
the newly selected tab and it's panes without setting the active pane.
This was fixed by moving the event to notify the pty of the pane change
into the tabs render method.

Co-authored-by: Jesse Tuchsen <not@disclosing>
2021-09-17 09:06:47 +02:00
Aram Drevekenin
0f3590adb5 chore(version): bump development version 2021-09-15 16:41:07 +02:00
Aram Drevekenin
1868816791 chore(release): v0.17.0 2021-09-15 16:13:42 +02:00
Aram Drevekenin
4219266523 chore(version): bump changelog version 2021-09-15 16:13:26 +02:00
Aram Drevekenin
720a3ecbaf
Fix prompt line overflowing when resizing panes (#725)
* fix(wrap): do not wrap empty lines and properly place cursor when resizing

* fix(wrap): truncate last blank line wraps

* fix(wrap): truncate lines right after unwrapping them

* refactor(grid): remove unused method

* docs(changelog): document change
2021-09-15 15:44:36 +02:00
Aram Drevekenin
b1f17a624c fix(keys): bring back ctrl-n to get from scroll mode to resize mode 2021-09-15 14:03:55 +02:00
Aram Drevekenin
eaf72db29b
docs(changelog): update pane title fix 2021-09-15 10:49:36 +02:00
Paulo Coelho
c09e65383e
fix(frames): don't pad empty pane title (#724) 2021-09-15 10:48:16 +02:00
a-kenji
645992483d docs(changelog): Add options subcommand to attach 2021-09-13 16:24:27 +02:00
a-kenji
9a5a315aee
Add options subcommand to attach (#718)
fixes #688

- the `options` subcommand of `attach` functions the same,
  as the `options` subcommand of creating the normal session,
  but not every option will have an effect on reattaching,
  for example the `default_mode` setting would make no sense
  to switch.

  In the future it would make sense to be able to hot swap some
  of the options on reattach, but we are not able to do that yet,
  for example the `default_shell` one.

  Eg:

  ```
  zellij attach <session-name> options --theme <theme>
  ```
2021-09-13 16:23:22 +02:00
a-kenji
cfdc2eabfa docs(changelog): Improve handling of empty yaml files 2021-09-13 12:25:31 +02:00
a-kenji
2771b247ac
Improve handling of empty valid yaml files (#716)
Improves the way empty valid `yaml` files are handled.
When deserializing a `config` or `layout` file, that is
an empty valid `yaml` file, eg:

```
---
```

We now assume the default configuration is desired.
2021-09-13 12:24:19 +02:00
a-kenji
b42ce60348 docs(changelog): add naming tab's in the layout 2021-09-13 11:58:11 +02:00
Tw
da2a9b5c18
feat(screen): support specifying tab's name in layout (#715)
Signed-off-by: Tw <tw19881113@gmail.com>
2021-09-13 11:56:33 +02:00
a-kenji
7c959ee3a2 docs(changelog): fix automated builds that use setup 2021-09-12 23:14:29 +02:00
Thomas Linford
789005d66a
fix automated build errors on setup command (#711)
- handle opts before client os input setup
2021-09-12 23:12:25 +02:00
a-kenji
829ff953e1 docs(changelog): unicode_width in tab-bar titles 2021-09-12 20:30:55 +02:00
Paulo Coelho
aae9c9c807
Calculate width with unicode-width in tab-bar and utils (#709)
* fix(tab-bar): calculate string width using unicode-width

* fix(utils): calculate ansi_len using unicode-width
2021-09-12 20:29:07 +02:00
Aram Drevekenin
8888476885
docs(changelog): document cwd fix 2021-09-10 17:36:38 +02:00
spacemaison
4f94f95c90
feat(cwd-pane): Keeping the cwd when opening new panes (#691)
* feat(cwd-pane): Add a new trait to get the cwd of a given pid

Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>

* feat(cwd-pane): Allow for setting the cwd when spawning a new terminal

Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>

* feat(cwd-pane): Add an active_pane field to the Pty struct

Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>

* feat(cwd-pane): Update Pty with Tab's active pane id

Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>

* feat(cwd-pane): Refactor spawn_terminal to use cwd by default

Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>

* feat(cwd-pane): Fix tests and lints

Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>

* feat(cwd-pane): Fix formatting

* feat(cwd-pane): Refactor child pid fetching to handle errors better

Instead of panicking when transfering the process id of the forked child
command we just return an empty process id.

* feat(cwd-pane): Add non Linux/MacOS targets for the get_cwd method.

This will allow Zellij to compile on non Linux/MacOS targets without
having an inherited cwd.

* feat(cwd-pane): Refactor spawn_terminal method to use ChildId struct.

The spawn_terminal methods been refactored to use the ChildId struct in
order to clarify what the Pid's returned by it are. The documentation
for the ChildId struct was improved as well.

* feat(cwd-pane): Fix tests/lints

Co-authored-by: Jesse Tuchsen <not@disclosing>
Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>
2021-09-10 17:35:06 +02:00
Aram Drevekenin
26a970a7d8
docs(changelog): tab bar fixes 2021-09-09 16:40:14 +02:00
Paulo Coelho
f2850d2931
fix(tab-bar): prevent active tab from being hidden (#703) 2021-09-09 16:38:10 +02:00
Brooks Rady
f0da6872df
docs(changelog): add cmd_exec feature 2021-09-09 11:51:21 +01:00
Tw
19b3f8366f
feat(plugin): add exec_cmd helper for executing command in host
Signed-off-by: Tw <wei.tan@intel.com>
Signed-off-by: Tw <tw19881113@gmail.com>
2021-09-09 11:45:03 +01:00
Paulo Coelho
6d0c5a56f5
style(clippy): various fixes (#704)
* test: fix clippy unused_io_amount

* chore(clippy): various clippy fixes

needless_borrow, let_and_return, vec_init_then_push, unit_arg,
useless_format, field_reassign_with_default, redundant_clone
2021-09-09 10:24:03 +02:00
a-kenji
0f0122fb59 chore(docs): fix/update example config file 2021-09-06 21:26:26 +02:00
sudo_synul
20b874d760
fix(example) Update NewTab action in example/default.yaml to new syntax (#693) 2021-09-06 21:25:15 +02:00
Aram Drevekenin
203a42c616
fix(borders): properly handle in-viewport borderless panes (#697)
* fix(borders): properly handle in-viewport borderless panes

* style(fmt): make clippy happy

* fix(borders): properly handle panes outside the viewport on startup

* style(fmt): not this time, clippy

* docs(changelog): document change
2021-09-06 20:26:30 +02:00
Aram Drevekenin
86fdd2400e
fix(borders): properly handle wide chars in pane titles (#698)
* work

* fix(frame): properly handle widechars in frame titles

* style(fmt): make rustfmt happy

* fix(truncate): do not reverse second part of string (oops)

* docs(changelog): document change
2021-09-06 20:24:47 +02:00
Aram Drevekenin
1c9dc35121
docs(changelog): update tab fix 2021-09-06 11:24:12 +02:00
Paulo Coelho
bdef573fb4
fix(tabs): use tab index for tab name (#686) 2021-09-06 11:23:15 +02:00
Aram Drevekenin
6ec51952d0
fix(tabs): force render by index rather than by position (#684)
* fix(tabs): force render by index rather than by position

* docs(changelog): document change
2021-09-01 16:43:42 +02:00
Brooks Rady
18dca848e6
fix(ui): offset content after viewport construction 2021-08-31 16:42:34 +01:00
Brooks J Rady
8c995f2333 Merge branch 'main' of github.com:zellij-org/zellij 2021-08-31 16:39:31 +01:00
Brooks J Rady
152315f110 fix(ui): offset content after viewport construction 2021-08-31 16:37:34 +01:00
Aram Drevekenin
5228e449be
chore(assets): update demo gif (#681) 2021-08-31 13:15:40 +02:00