Commit Graph

1414 Commits

Author SHA1 Message Date
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
Aram Drevekenin
7c075ac7e3 chore(version): bump development version 2021-08-31 11:36:09 +02:00
Aram Drevekenin
e993a23a85 chore(release): v0.16.0 2021-08-31 10:00:26 +02:00
Brooks Rady
a51f500c17
fix(ui): change resize binding to Ctrl-n
* fix(ui): change resize binding to Ctrl-n

* Fix tests?

* Actually update the keybind in tests

* Cowardly refuse to fix the E2E testing issue
2021-08-30 18:02:14 +01:00
Brooks Rady
588fcc69be
fix(ui): resize correctly without pane-frames (#673) 2021-08-30 16:25:37 +01:00
Aram Drevekenin
faaa425b7f
refactor(tab): use borderless instead of selectable where appropriate (#672)
* next pane position => next terminal position

* borderless

* update comment

* style(fmt): make rustfmt happy
2021-08-30 16:43:26 +02:00
Brooks Rady
3e6fcffb27
fix(ui): render correctly after tab closing (#670)
* fix(ui): render correctly after tab closing

* That was a silly bug...
2021-08-30 09:50:36 +05:30
Brooks J Rady
e54dfab40f fix(tab-bar): don't crash at small widths 2021-08-28 21:41:14 +01:00
Brooks Rady
4af159574c
chore(docs): update changelog 2021-08-28 17:54:32 +01:00
Brooks Rady
76a5bc8a05
feat(ui): overhauled resize and layout systems
* refactor(panes): move to parametric pane sizes

* Fixed the simpler errors by casting to usize

* The least I can do is pass the formatting check...

* Move to stable toolchain

* Well, it compiles?

* And now it doesn't! ;)

* Baseline functionality with the new Dimension type

* Working POC for percent-based resizing

* REVERT THIS COMMIT – DELETES TESTS

* Perfected the discrete resize algorithm

* Fixed fixed-size panes

* Basic bidirectional resize

* feat(resize): finalised parametric resize algorithm

* Reduce the logging level a bit

* Fixed nested layouts using percents

* Bug squishing for implicit sizing

* Here is a funky (read: rubbish) rounding approach

* And now it's gone again!

* Improve discretisation algorithm to fix rounding errors

* Fix the last layout bug (maybe?)

* Mixed explicit and implied percents work now

* Let's pretend that didn't happen...

* Make things a bit less crashy

* Crash slightly more for now (to find bugs)

* Manaually splitting of panes works now

* Start moving to percent-based resizes

* Everything but fullscreen seems to be working

* Fix compilatation errors

* Culled a massive amount of border code

* Why not pause to please rustfmt?

* Turns out I was still missing a few tests...

* Bringing back even more tests!

* Fix tests and pane boarders

* Fix the resize system without gaps

* Fix content offset

* Fixed a bug with pane closing

* Add a hack to fix setting of the viewport

* Fix toggling between shared borders and frames

* fix(tests): make e2e properly use PaneGeom

* style(fmt): make rustfmt happy

* Revert unintentional rounding of borders

* Purge some old borderless stuff

* Fix busted tab-bar shrinking

* Update E2E tests

* Finish implementing fullscreen!

* Don't crash anymore?

* Fix (almost) all tests

* Fix a lack of tab-stops

* All tests passing

* I really can't be bothered to debug a CI issue

* Tie up loose ends

* Knock out some lingering FIXMEs

* Continue to clean things up

* Change some naming and address FIXMEs

* Cull more code + FIXMEs

* Refactor of the resize system + polish

* Only draw frames when absolutely necessary

* Fix the tab-bar crash

* Fix rendering of boarders on reattach

* Fix resizing at small pane sizes

* Deduplicate code in the layout system

* Update tab-bar WASM

* Fixed the pinching of panes during resize

* Unexpose needlessly public type

* Add back a lost test

* Re-add tab tests and get them to compile

* All tabs need layouts

* Start fixing tests + bug in main

* Stabilize the resize algorithm rounding

* All tests from main are now passing

* Cull more dead code
2021-08-28 17:46:24 +01:00
Brooks Rady
1544de2665
fix(plugin): fix set_timeout() host function
fix: add missing to_plugin channel initialization (#664)
2021-08-27 03:29:04 +01:00
Tw
5403034624 fix: add missing to_plugin channel initialization (#664)
Signed-off-by: Tw <wei.tan@intel.com>
2021-08-27 09:42:46 +08:00
a-kenji
b4de405fa8 docs(changelog): formatting 2021-08-26 18:26:21 +02:00
a-kenji
a361c6e1ac docs(changelog): add template and tabs to layout 2021-08-26 17:58:54 +02:00
a-kenji
f802663067
Merge pull request #625 from a-kenji/tab-layout
Add `tabs` to `layouts`
2021-08-26 17:47:23 +02:00
a-kenji
10abb7050f fixup! adjust fixture layouts 2021-08-26 16:58:37 +02:00
a-kenji
8a78f9d46b fixup! remove test file 2021-08-26 15:26:00 +02:00
a-kenji
cd0b0119a0 Split tab-layout into template & tabs section
* adjust example layouts and move them from `./example` to
  `./example/layouts`

* simplify the deserialization of the layout

* layouts are now constructed as follows:

```
---
template:
  direction: Horizontal
  parts:
    - direction: Vertical
      borderless: true
      split_size:
        Fixed: 1
      run:
        plugin: tab-bar
    - direction: Vertical
      body: true # <== The body section specifies the position of the
      # inserted tab
    - direction: Vertical
      borderless: true
      split_size:
        Fixed: 2
      run:
        plugin: status-bar
tabs:
  - direction: Vertical
  - direction: Vertical
```
2021-08-26 15:06:59 +02:00
Aram Drevekenin
6f2d7d0176
fix(compatibility): maintain original cursor shape (#659)
* fix(compatibility): maintain original cursor shape

* docs(changelog): document change
2021-08-25 13:43:18 +02:00
Aram Drevekenin
06e3be6205 test(layout): add borderless 2021-08-24 15:02:21 +02:00
Aram Drevekenin
618c2c376b Merge branch 'tab-layout' of https://github.com/a-kenji/zellij into a-kenji-tab-layout 2021-08-24 10:58:36 +02:00
Aram Drevekenin
c8d10ee64d
fix(compatibility): only send bracketed paste to terminals requesting it (#658)
* fix(compatibility): only send bracketed paste to terminals requesting it

* docs(changelog): update change

* style(fmt): make rustfmt happy
2021-08-24 10:24:10 +02:00
a-kenji
7a2f86db1b docs(changelog): add ToggleTab action 2021-08-23 23:20:47 +02:00
a-kenji
b1906c893a
Merge pull request #622 from sagittarius-a/feature/go-to-last-tab
feat(tab): add keybind to go to last tab visited
2021-08-23 23:18:43 +02:00
Aram Drevekenin
d969bbfea7
fix(compatibility): docker-compose progress bar (#656)
* fix(compatibility): docker-compose progress bar

* docs(changelog): progress bar fix

* style(fmt): make rustfmt happy
2021-08-23 20:55:31 +02:00
Aram Drevekenin
01c5378773
docs(changelog): copy to clipboard UI 2021-08-23 15:52:38 +02:00
Thomas Linford
94f20cfd53
Indicate to the user when text is copied to the clipboard (#642)
* 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
2021-08-23 15:51:33 +02:00