Commit Graph

133 Commits

Author SHA1 Message Date
Thomas Linford
3aef436a69
fix: fallback to default values when terminal rows/cols are 0 (#1552)
* fix: fallback to default values when terminal rows/cols = 0

* increase retry_pause for failing test

* e2e: load fixtures with cat

* use variable for fixture path
2022-07-04 18:28:37 +02:00
a-kenji
e23bbfddaa
fix: various typos (#1553)
Because they were wrong.
2022-07-02 19:54:50 +02:00
a-kenji
7ed66d3e78
add(feature): unstable (#1542)
Add a feature `unstable`, which is intended to communicate the same
intent.

Gate: Send actions from cli with the `unstable` feature.
2022-06-25 21:48:00 +02:00
raphCode
5d9c428294
fix: exit client on empty rcv (#1535)
* Exit client on empty ipc receive

This resolves a hang when the server goes away unnoticed (e.g. when it
is killed). In some cases, this delayed system shutdown because the
client did not react to systemd's SIGTERM.

* Add newline after error report to tidy up shell prompt

* Update changelog
2022-06-21 20:40:26 +02:00
a-kenji
29332ca684
add: debug information for certain actions (#1533) 2022-06-20 20:25:29 +02:00
a-kenji
0c24edea7f
fix: dispatch various actions correctly (#1530) 2022-06-19 21:49:47 +02:00
a-kenji
8da6207849
fix(action): dispatch of edit-scrollback (#1523) 2022-06-17 22:02:47 +02:00
a-kenji
464f21aebd
fix: clarify comments (#1519) 2022-06-16 18:34:31 +02:00
a-kenji
35498b6030
fix(action): correctly dispatch the Write action (#1518)
The  `Write` action should be called once per session.
2022-06-16 18:34:19 +02:00
a-kenji
2563fbb441
fix(action): send WriteChars once per action (#1516)
`WriteChars` is not an idempotent action, that's why it should only
be sent to it's destination client.
2022-06-16 15:20:23 +02:00
a-kenji
3de59dac42
fix(clippy): clippy fixes (#1508)
* fix(clippy): clippy fixes

* chore(fmt): cargo fmt
2022-06-15 14:03:11 +02:00
a-kenji
7314b62321
fix: remove obsolete logs (#1504) 2022-06-15 12:30:23 +02:00
a-kenji
0b6001305b
feat: add capability to dispatch actions from cli (#1265)
* feat: add capability to dispatch actions from cli

Add capability to dispatch actions from the cli.

Can be invoked through `zellij action [actions]`

Automatically sends the action either to the current session,
or if there is only one session to the single session.

If there are multiple sessions, and no session is specified it will
error out.

Example:
1.
```
zellij action "[NewTab: , NewTab: ]"
```
2.
```
zellij -s fluffy-cat action '[NewPane: , WriteChars: "echo Purrr\n" ]'
```
3.
```
zellij -s fluffy-cat action '[ CloseTab, ]
```

* add: error message on malformed input

Add an error message on malformed input, for the `action`'s dispatch.
Rather than resulting in a panic.

* add: function to query the client id

* add: send specific actions to certain clients

Adds ability to send actions, that don't impact the server state
to all connected clients. For example `MoveFocus`

* add: client_id to non blocking actions

* chore(fmt): `cargo fmt`

* add: pick correct session, if there is exactly one

* add: use correct `client_id` for detach action

* add: make `[ ]` opaque to the user

* add: miette to toplevel to improve error message

* add: fake client reading configuration

Add the fake client reading configuration files,
this allows actions, that rely on configuration work
correctly. This is an intermediate solution, and should ideally not
be needed. It would be better if most of this state would be handled
by the server itself.

* chore(fmt): rustmt

* add: ability to detach multiple clients

Add ability to detach multiple clients at the same time.

* remove: obsolete functionality

* remove: unused functionality

* add: send correct action upon exiting

* chore(update): cargo update
2022-06-15 11:20:06 +02:00
a-kenji
67d2673cae
add(style): add trailing comma in match blocks (#1483)
This makes it easier to distinguish from normal blocks
2022-06-10 20:03:13 +02:00
Kian-Meng Ang
16b53aa52f
docs: fix typos (#1481) 2022-06-10 23:37:55 +09:00
Aram Drevekenin
6d15af04bd chore(version): bump development version 2022-06-07 15:38:56 +02:00
Thomas Linford
c2453b471b
fix(mouse): selection sometimes getting stuck (#1418)
- when multiple mouse events are read from stdin,
start mouse hold repeat loop only if hold event is the last.
2022-06-06 12:06:48 +02:00
raphCode
eab464b11a
Fix double panic lockup in clients panic handler (#1433)
* Fix possible lockup in the clients panic handler

When the pty the client was running in disappears, reading from stdin
causes a panic, which triggers the custom panic handler. This handler
attempts to print a backtrace to the terminal and tries to unset the raw
mode for that. Since the pty has already disappeared, the tcsetattr call
fails and causes a second panic, which locks everything up.

This commit fixes this by returning an Result from the unset_raw_mode
function, allowing the calling panic handler to handle any error
gracefully.

* Log any client panics to file

Since we are now aware of the fact that panics may happen / are handled
after the pty has disappeared, logging them to file seems useful: there
is no other other place to show them to the user.

* fix tests and improve function return type
2022-05-24 14:10:37 +02:00
Thomas Linford
6ed4bf8c0b
fix(input): ANSI code sent to terminal on startup and resize
* fix macos parsing issues

* format

* fix(ansiparser): validate first key on parse

Co-authored-by: Aram Drevekenin <aram@poor.dev>
2022-05-16 15:32:17 +02:00
dependabot[bot]
fe9fa2d60a
build(deps): bump log from 0.4.16 to 0.4.17 (#1386)
Bumps [log](https://github.com/rust-lang/log) from 0.4.16 to 0.4.17.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/commits/0.4.17)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-09 18:32:36 +02:00
Aram Drevekenin
3177542674 chore(version): bump development version 2022-05-02 22:54:23 +02:00
Aram Drevekenin
a7ddfe1acc chore(release): v0.29.1 2022-05-02 22:31:08 +02:00
Aram Drevekenin
77e9dc93f7 chore(version): bump development version 2022-05-02 14:00:20 +02:00
Thomas Linford
03ffd08ebb
fix(mouse): improve mouse event reporting (#1329)
* fix: do not rebroadcast mouse press events
* fix: do not send generated mouse hold events to applications
* begin selecting only if click is on terminal pane
2022-04-30 18:46:17 +02:00
Aram Drevekenin
0dc136ec5f
fix(compatibility): respond to bg and fg color ansi queries (#1358)
* fix(compatibility): respond to background/foreground queries

* style(fmt): rustfmt

* style(clippy): make clippy happy

* style(fmt): rustfmt

* style(fmt): remove unused code
2022-04-28 17:26:44 +02:00
Aram Drevekenin
7ba49658f7
fix(ipc): empty ipc msg crash (#1351)
* fix(ipc): recover from corrupted channel state

* style(fmt): rustfmt
2022-04-27 10:44:14 +02:00
Aram Drevekenin
bf21442186 chore(version): bump development version 2022-04-13 19:17:09 +02:00
Aram Drevekenin
3a2fee601a chore(package): patch version 2022-04-13 18:46:00 +02:00
Aram Drevekenin
19adb29be5 feat(signals): support XTWINOPS 14 and 16 (and query the terminal for them on startup and SIGWINCH) (#1316)
* feat(signals): get pixel info from terminal emulator

* feat(signals): query for pixel info on sigwinch

* feat(signals): reply to csi 14t and csi 16t

* style(fmt): rustfmt

* style(comments): remove outdated
2022-04-12 18:07:32 +02:00
Aram Drevekenin
8439198636 chore(version): bump development version 2022-03-31 15:07:18 +02:00
dependabot[bot]
a4ad296875
build(deps): bump log from 0.4.14 to 0.4.16 (#1278)
Bumps [log](https://github.com/rust-lang/log) from 0.4.14 to 0.4.16.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/commits)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 10:40:45 +02:00
Aram Drevekenin
7141779153
chore(deps): move from termion to termwiz for STDIN handling (#1249)
* fix(deps): switch from termion to termwiz for STDIN parsing

* style(fmt): clippy

* style(fmt): moar clippy

* style(fmt): rustfmt

* fix(tests): e2e mouse press

* style(fmt): rustfmt

* bring back polling

* fmt fmt fmt

* fix some e2e flakiness
2022-03-23 09:08:35 +01:00
Brooks Rady
9bfafde123
feat(ui): round frame corners (#1227)
* feat(ui): round frame corners

* Allow rounded_corners to be set without a palette

* Revert "Allow rounded_corners to be set without a palette"

This reverts commit 9271a4b545.

* fix(style): remove redundant code

* fix(style): clippy lints that somehow got missed

* feat(config): add ui config section
2022-03-22 14:58:16 +00:00
Aram Drevekenin
2e03692f5b chore(version): bump development version 2022-03-16 14:25:08 +01:00
Aram Drevekenin
9c7d13984f chore(release): v0.26.1 2022-03-16 14:03:07 +01:00
Aram Drevekenin
08d2014cfe hotfix: do not send bracketed paste to panes where it is not on 2022-03-16 09:42:58 +01:00
Jae-Heon Ji
0b74604a9f
feat: improve error reporting system (#1038)
* feat: add draft a concept code

* feat: add err_ctx to diagnostic

* feat: optimize error report

* chore: add user-friendly help

* fix: manual merge lockfile from main
2022-03-13 20:46:03 +09:00
Aram Drevekenin
779679f53b chore(version): bump development version 2022-03-11 16:13:01 +01:00
Thomas Linford
7e008bb039
fix(compatibility): home and end in cursor keys mode (#1190) 2022-03-09 21:21:15 +01:00
a-kenji
6d653e1521
add: set env var's from config and layout (#1154)
Add ability to set `ENVIRONMENT VARIABLES` from the
config and the layout files.

example:

```
env:
  ZELLIJ_CONFIG:
    DEFAULT
```

or

```
env:
  ZELLIJ_LAYOUT_NAME:
    BUILD_SESSION
```

If two keys conflict (configuration and layout), then the key
from the layout is used.

fixes: #1059
2022-03-01 15:47:52 +01:00
Aram Drevekenin
843bf58f51
fix(input): handle discontiguous STDIN input (#1119)
* log stdin reads and events

* attempt fix for incomplete mouse sequences

* read events directly from stdin

* fix flaky e2e test

* bring back bracketed paste

* rustfmt

* remove unused

Co-authored-by: Thomas Linford <linford.t@gmail.com>
2022-02-25 14:34:55 +01:00
Jae-Heon Ji
a489194b55
fix: invalid assignment of client_id (#1052)
* feat: sync socket connection in

* chore: apply clippy

* chore: change message name
2022-02-23 23:50:49 +09:00
Aram Drevekenin
39eddd8b1c chore(version): bump development version 2022-02-22 13:36:39 +01:00
Aram Drevekenin
821e7cbc5a
feat(ui): add floating panes (#1066)
* basic functionality

* close and reopen scratch terminal working

* embed/float and resize whole tab for floating and static floating panes

* move focus working

* fix focus change in floating panes

* move pane with mouse

* floating z indices

* tests and better resize algorithm

* starting to work on performance

* some performance experimentations

* new render engine

* reverse painters algorithm for floating panes

* fix frame buffering

* improve ux situation

* handle multiple new panes on screen without overlap

* adjust keybindings

* adjust key hints

* fix multiuser frame ui

* fix various floating/multiuser bugs

* remove stuff

* wide characters under floating panes

* fix wide character frame override

* fix non-frame boundaries interactions with floating panes

* fix selection character width

* fix title frame wide char overflow

* fix existing tests

* add tests

* refactor output out of tab

* refactor floating panes out of tab

* refactor tab

* moar refactoring

* refactorings and bring back terminal window title setting

* add frame vte output

* remove more unused stuff

* remove even more unused stuff

* you know the drill

* refactor floating panes and remove more stuffs

* refactor pane grids

* remove unused output caching

* refactor output

* remove unused stuff

* rustfmt

* some formatting

* rustfmt

* reduce clippy to normal

* remove comment

* remove unused

* fix closign pane

* fix tests
2022-02-18 21:10:06 +01:00
Aram Drevekenin
e06300f7db chore(version): bump development version 2022-01-05 11:14:15 +01:00
Kunal Mohan
59c71355a9
Remove unused dependency - termbg (#992) 2022-01-04 23:49:53 +05:30
Thomas Linford
6e35f29b0f
fix(mouse): prevent unhandled mouse events escape to terminal (#976)
* workaround to not write csi mouse seqs to terminal

* tab: copy selection to clipboard only if selecting was initiated with left click

* cleanup debug log messages

* unset selecting_with_mouse when selection is empty
2021-12-28 21:39:20 +01:00
Aram Drevekenin
ce8e898e6d chore(version): bump development version 2021-12-20 18:31:54 +01:00
Aram Drevekenin
6175d57702 chore(version): bump development version 2021-12-20 17:56:47 +01:00
Aram Drevekenin
1a991ce7fb chore(version): bump development version 2021-12-14 17:32:02 +01:00