Commit Graph

1013 Commits

Author SHA1 Message Date
Aram Drevekenin
7fe87f59a3 chore(version): bump development version 2021-07-05 11:04:51 +02:00
Aram Drevekenin
2e0e22cdb4 chore(release): v0.14.0 2021-07-05 10:13:46 +02:00
a-kenji
579701a2bb docs(changelog): Add layout-dir to setup --check #599 2021-07-04 17:34:55 +02:00
a-kenji
50d445722f
Merge pull request #599 from a-kenji/layout-check
Add `layout-dir` to `setup --check` subcommand
2021-07-04 17:33:28 +02:00
a-kenji
6bcd84f6d5 Add layout-dir to setup --check subcommand 2021-07-04 14:23:52 +02:00
Aram Drevekenin
51c826b991
docs(changelog): initial mouse support 2021-07-02 16:41:27 +02:00
Thomas Linford
f93308f211
feat(ui): initial mouse support (#448)
* Initial mouse support

* enable mouse support (termion MouseTerminal)
* handle scroll up and down events

* Allow enabling/disabling of mouse reporting

Store the mouse terminal on OsInputOutput

* WIP: switch pane focus with mouse

* testing to get mouse character selection

* wip mouse selection

* wip: mouse selection

- initial handling of mouse events for
  text selection within a pane
- wide characters currently problematic
- selection is not highlighted

* highlight currently selected text

* improve get currently selected text from TerminalPane

* copy selection to clipboard (wayland only for now)

* Add missing set_should_render on selection update

* Improve text selection

- Strip whitespace from end of lines
- Insert newlines when selection spans multiple lines

* Simplify selection logic

- Remove Range struct
- Selection is not an Option anymore, it's empty when start == end

* copy selection to clipboard with OSC-52 sequence

* Improve text selection with multiple panes

- Constrain mouse hold and release events to currently active pane
- Fix calculation of columns with side by side panes

* fix for PositionAndSize changes

* Fix mouse selection with full screen pane.

- Transform mouse event positions to relative when passing to pane.

* Move selection to grid, rework highlighting.

- Mark selected lines for update in grid output buffer, for now in the
  simplest way possible, but can be made more efficient by calculating
  changed lines only.
- Clear selection on pane resize.
- Re-add logic to forward mouse hold and release events only to
  currently active pane.

* Tidy up selection

- add method to get selection line range
- add method to sort the current selection

* Grid: move current selection up/down when scrolling

- Make the selection work with lines in lines_above and lines_below
- Todo: update selection end when scrolling with mouse button being held
- Todo: figure out how to move selection when new characters are added.

* Grid: move selection when new lines are added

* Keep track of selection being active

- Handle the selection growing/shrinking when scrolling with mouse
  button held down but not yet released.

* Improve selection end with multiple panes

* Tidying up

- remove logging statements, unused code

* Add some unit tests for selection, move position to zellij-utils

* Change Position::new to take i32 for line

* Grid: add unit tests for copy from selection

* add basic integration test for mouse pane focus

* Add basic integration test for mouse scroll

* Use color from palette for selection rendering

* Improve performance of selection render

- Try to minimize lines to update on selection start/update/end

* fixes for updated start method

* fix lines not in viewport being marked for rendering

- the previous optimization to grid selection rendering was always
adding the lines at the extremes of previous selection, causing problems
when scrolling up or down
- make sure to only add lines in viewport

* Disable mouse mode on exit

* use saturating_sub for usize subtractions

* copy selection to clipboard on mouse release

* disable mouse on exit after error

* remove left-over comments

* remove copy keybinding

* add default impl for selection methods in Pane

- remove the useless methods from Impl Pane in PluginPane

* move line diff between selections to selection

* add option to disable mouse mode

* Allow scrolling with mouse while selecting.

* move action repeater to os_input_output, change timeout to 10ms

- change repeater to take an action instead of a position with hardcoded
action

* replace mouse mode integration tests with e2e tests

* cleanup

* cleanup

* check if mouse mode is disabled from merged options

* fix missing changes in tests, cleanup
2021-07-02 16:40:50 +02:00
a-kenji
2a024db839 chore(changelog): Add run-command option #596 2021-07-02 14:08:14 +02:00
a-kenji
5c3759e155
Merge pull request #596 from a-kenji/run-command-action
Add running commands to an action
2021-07-02 14:06:36 +02:00
a-kenji
0bf78100dd Add running commands to an action
Add the ability to bind running commands to
an action.

Eg:
```
- action: [Run: {command: "htop",},]
  key: [F: 6,]
``

Optionally the direction and arguments can be
specified:

```
- action: [Run: {command: "htop", args: ["-C",]},]
  key: [F: 7,]
```
The directional splits are analogous to the `[NewPane]` splits.
```
- action: [Run: {command: "htop", args: ["-C",], direction: "Up"},]
  key: [F: 8,]
```
2021-07-02 13:39:02 +02:00
a-kenji
81941be134
Merge pull request #595 from a-kenji/load-default-shell
Improve loading of default shell slightly
2021-07-01 22:24:01 +02:00
a-kenji
06e19516f4 Improve loading of default shell slightly 2021-07-01 21:48:24 +02:00
a-kenji
04ad07d9e9 docs(changelog): Add option for default-shell 2021-07-01 20:28:00 +02:00
a-kenji
8524f52ff4
Merge pull request #594 from a-kenji/default-shell
Add an option to specify a default-shell
2021-07-01 20:25:14 +02:00
a-kenji
6f1c103e02 Add option to specify default-shell
* Adds an option to specify a default shell
  either by specifying `default_shell: [PATH]`
  in the config, or running zellij with
  `zellij options --default-shell [PATH]`
2021-07-01 20:02:08 +02:00
a-kenji
71f980a01d
Merge pull request #593 from a-kenji/modularize-spawn-terminal
Modularize spawn_terminal_function
2021-06-30 19:56:39 +02:00
a-kenji
8086765e50 fixup! Fix merged tests 2021-06-30 19:45:15 +02:00
a-kenji
242e41d67f Merge branch 'main' of https://github.com/zellij-org/zellij into modularize-spawn-terminal 2021-06-30 18:59:55 +02:00
a-kenji
f9e01c04e1 Modularize spawn_terminal_function
* Breaks the spawn_terminal_function up
  in order to prepare for more functionality.
2021-06-30 11:46:43 +02:00
a-kenji
1b70b6958c
Merge pull request #591 from a-kenji/update-dependencies
Add new dependencies to `CONTRIBUTING.md`
2021-06-30 11:37:16 +02:00
Aram Drevekenin
ed4fd2a8e7
chore(tests): move all integration tests to be either unit or e2e tests - remove old testing infra (#589)
* tests(integration): move basic integration tests to be unit tests

* fix(tests): silently fail threadbus for tests

* tests(unit): move compatibility tests to become unit tests for grid

* tests(unit): move close_pane tests to become unit tests for grid

* tests(e2e): move basic layout test to e2e

* tests(unit): move move_focus tests to be unit tests

* tests(unit): move resize_down tests to be unit tests

* tests(unit): move resize_left tests to be unit tests

* tests(unit): move resize_right tests to be unit tests

* tests(unit): move resize_up tests to be unit tests

* tests(infra): remove unused infra

* style(fmt): make rustfmt happy

* debug

* debug

* debug

* debug

* chore(test): shift volume mounting around because github actions is a special child
2021-06-30 11:27:35 +02:00
a-kenji
da415657df Add new dependencies to CONTRIBUTING.md 2021-06-29 23:19:23 +02:00
a-kenji
974edc2c98
Merge pull request #590 from a-kenji/clippy-fixes
chore(clippy): needless_borrow
2021-06-29 23:16:49 +02:00
a-kenji
b3b9175081 chore(clippy): needless_borrow 2021-06-29 23:02:51 +02:00
Aram Drevekenin
3313634fe9
Add e2e tests (#582)
* feature(tests): e2e tests

* chore(build): github action

* chore(build): fix workflow

* chore(build): fix workflow

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* work

* working

* working

* working

* bring back the proper errors

* make e2e flow run properly

* style(fmt): make rustfmt happy

* style(fmt): make rustfmt happy

* run on everything just to test the workflow

* bring back running behaviour on workflow
2021-06-21 10:45:18 +02:00
Kunal Mohan
07ad2f54ea docs(changelog): Autodetach #581 2021-06-19 11:35:44 +05:30
Kunal Mohan
c046ab1ecc
Merge pull request #581 from dantepippi/autodetach
Detach session when forced close detected (handling SIGTERM and other signals)
2021-06-19 11:15:26 +05:30
Dante Pippi
e7fc0e3ff9 Sending the action Action::Detach to the server 2021-06-18 12:26:29 -03:00
Dante Pippi
18adbcc1b1 Detach session on a forced close (handlign SIGTERM and other signals) 2021-06-17 21:21:39 -03:00
a-kenji
a71b966941
Merge pull request #580 from a-kenji/makefile-layout-fix
Fix missing `layout-dir` in makefile
2021-06-17 17:41:19 +02:00
a-kenji
dc8487cb4f Fix missing layout-dir in makefile
The `layout-dir` got removed, but the
make action depended on the `dir`.
2021-06-17 16:45:04 +02:00
a-kenji
5c69ce9aad docs(changelog): layout dir from data to config 2021-06-16 19:03:07 +02:00
a-kenji
08ed30e832
Merge pull request #577 from a-kenji/default-layouts
Change `layout` directory from `data` to `config`
2021-06-16 19:00:52 +02:00
a-kenji
a9088264eb Change layout directory from data to config
* default layouts won't be installed by anymore,
  instead they will be directly loaded

* `layout-dir` is now a subdirectory of the
  `config-dir` by default, instead of the `data-dir`

  POSSIBLE BREAKING CHANGE:
  In case of having custom layouts in the previous
  `layout-dir` one can switch either the layouts to
  the new dir, or set the `layout-dir` to be the current
  `layout-dir`

* it is possible to change the location of the `layout-dir`:
  - `zellij options --layout-dir [LAYOUR_DIR]`
  - `layout_dir: [LAYOUT_DIR]`
2021-06-16 17:09:05 +02:00
a-kenji
8e097c258a docs(changelog): improve layout errors 2021-06-15 11:22:14 +02:00
a-kenji
64d639b243
Merge pull request #576 from a-kenji/layout-error
Move `layout.rs` from `server` to `utils`
2021-06-15 11:20:46 +02:00
a-kenji
4743b7e7ab Merge branch 'main' of https://github.com/zellij-org/zellij into layout-error 2021-06-14 22:05:25 +02:00
a-kenji
cafcca0c57 Move layout.rs from server to utils
* give feedback on most errors in the layout-file
2021-06-14 21:55:17 +02:00
Matthias
7f67e6d97f
docs(contributing): add the invite link to the discord server (#570) 2021-06-10 09:23:26 +02:00
Aram Drevekenin
056f20ff1f style(comments): remove leftovers 2021-06-04 18:57:26 +02:00
Brooks J Rady
dc44a00699 chore(release): bump development version 2021-06-04 10:28:03 +01:00
Brooks J Rady
0681163f8d chore(release): v0.13.0 2021-06-04 10:13:14 +01:00
Brooks J Rady
65574eea5d fix(build): better tested publishing flow 2021-06-03 21:58:02 +01:00
Brooks J Rady
d6a8daba84 fix(build): allow crates.io to update between crate uploads 2021-06-03 20:43:20 +01:00
Brooks Rady
c65987a285
feat(ui): laying the groundwork for a new resize algorithm 2021-06-03 13:15:56 +01:00
Brooks J Rady
a9ce13c1d2 feat(ui): added feature for an experimental resize
The `parametric_resize_beta` feature has been added that enables the new
resize system. This change also introduces some background tweaks that
start laying the groundwork for future resize work without breaking
functionality.
2021-06-03 13:05:52 +01:00
Aram Drevekenin
24165b6178
docs(changelog): performance fix 2021-06-03 14:04:36 +02:00
Aram Drevekenin
0bab7c1245
fix(performance): output buffer (#567)
* work

* work

* fix(performance): output buffer

* style(import): remove extraneous

* style(fmt): make rustfmt happy

* fix(performance): minor adjustments to padding and truncating

* style(fmt): make rustfmt happy

* style(clippy): make clippy happy
2021-06-03 14:03:05 +02:00
Brooks J Rady
5164bd99b7 Fixed a build warning and renamed a struct field 2021-06-03 12:38:23 +01:00
Brooks J Rady
949971cc62 Merge branch 'main' into resize-overhaul 2021-06-03 12:26:45 +01:00