Commit Graph

1921 Commits

Author SHA1 Message Date
Thomas Linford
e2a3438c86
fix(mouse): avoid forwarding click events on pane border (#1584)
* if left click is on pane border do not forward to application

* properly handle frames

* fix comment

* fix another comment

* add tests, fix edge case
2022-07-15 16:28:08 +02:00
a-kenji
d1fa067713
fix(ci): quoting issues (#1589) 2022-07-15 12:35:36 +02:00
Aram Drevekenin
a99a5886c1
docs(changelog): editor with arguments 2022-07-14 15:15:32 +02:00
Aram Drevekenin
50dd47c2e0
fix(editor): handle editor/visual/configured editor with arguments (#1587)
* fix(editor): handle editor/visual/configured editor with arguments

* style(fmt): rustfmt
2022-07-14 15:14:25 +02:00
Aram Drevekenin
72ed0e98cf
docs(changelog): cursor show/hide alternate screen fix 2022-07-14 11:56:10 +02:00
Aram Drevekenin
cbbdccc285
fix(terminal): persist cursor hide/show through alternate screen (#1586)
* fix(terminal): persist cursor hide/show through alternate screen

* style(fmt): rustfmt

* style(clippy): make clippy happy
2022-07-14 11:55:07 +02:00
Aram Drevekenin
e4b1dd6d4c
docs(changelog): performance improvement 2022-07-13 17:05:15 +02:00
Aram Drevekenin
2d2bbbd6c3
perf(terminal): better responsiveness (#1585)
* performance(pty): only buffer terminal bytes when screen thread is backed up

* style(fmt): rustfmt
2022-07-13 17:04:15 +02:00
Aram Drevekenin
b4cf0e7a81
docs(changelog): detach message 2022-07-12 12:18:29 +02:00
Matthias Beyer
6e102c6084
fix(cli): let the exit message be different when detaching (#1573)
* Let the exit message be different when detaching

This patch changes the exit message printed to the user, so the user
does not get the impression that they fat-fingered an "exit" instead of
what was intended (a detach).

For this, the InputHandler::exit() function was refactored, to get the
reason as a parameter. As this function is not pub, this is considered
okay.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>

* Change detach message

This patch changes the detach message to be more in line with the other
messages zellij displays to the user.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2022-07-12 12:17:24 +02:00
a-kenji
ee6a9cd78e docs(changelog): refactor get session name (#1582) 2022-07-12 11:33:08 +02:00
Matthias Beyer
cf521aaf60
Refactor match session name (#1582) 2022-07-12 11:31:29 +02:00
Jae-Heon Ji
f983651759
docs(changelog): add usage comment to fish script 2022-07-12 10:30:41 +09:00
Tassilo Horn
8f0e82a0ea
fix: add usage comment to fish shell auto-start snippet (#1574) (#1583) 2022-07-12 10:27:46 +09:00
a-kenji
d71c212fe8
chore(docs): add more matrix links (#1581) 2022-07-10 19:51:01 +02:00
a-kenji
63ba744c02 chore(gblame): add move to git-blame-ignore-revs
This is not relevant for `git blame` messages.
2022-07-10 15:33:19 +02:00
a-kenji
47540d7cab
chore(nix): hide nix directory (#1579) 2022-07-10 15:31:41 +02:00
a-kenji
ea3d73c105
rust-toolchain: Update (#1578)
Co-authored-by: a-kenji <a-kenji@users.noreply.github.com>
2022-07-10 12:54:14 +02:00
a-kenji
ea1e36637d
fix(ci): add new rust toolchain location to action (#1576) 2022-07-10 12:29:21 +02:00
a-kenji
6576b163a1
flake.lock: Update (#1575)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-10 12:29:09 +02:00
Aram Drevekenin
89836a9cb6
docs(changelog): sixel support 2022-07-08 17:21:00 +02:00
Aram Drevekenin
c89b416d76
feat(terminal): sixel support (#1557)
* work

* work

* work

* work

* work

* more work

* work

* work

* work

* hack around stdin repeater

* refactor(sixel): rename sixel structs

* feat(sixel): render text above images

* fix(sixel): reap images once they're past the end of the scrollbuffer

* fix(sixel): display images in the middle of the line

* fix(sixel): render crash

* fix(sixel): react to SIGWINCH

* fix(sixel): behave properly in alternate screen mode

* fix(sixel): reap images on terminal reset

* feat(sixel): handle DECSDM

* fix(terminal): properly respond to XTSMGRAPHICS and device attributes with Sixel

* Add comment

* fix(sixel): hack for unknown event overflow until we fix the api

* feat(input): query terminal for all OSC 4 colors and respond to them in a buggy way

* fix(sixel): do not render corrupted image

* feat(input): improve STDIN queries

* fix(client): mistake in clear terminal attributes string

* fix(ansi): report correct number of supported color registers

* fix(sixel): reap images that are completely covered

* style(comment): fix name

* test(sixel): infra

* test(sixel): cases and fixes

* fix(sixel): forward dcs bytes to sixel parser

* refactor(client): ansi stdin parser

* refactor(output): cleanup

* some refactorings

* fix test

* refactor(grid): sixel-grid / sixel-image-store

* refactor(grid): grid debug method

* refactor(grid): move various logic to sixel.rs

* refactor(grid): remove unused methods

* fix(sixel): work with multiple users

* refactor(pane): remove unused z_index

* style(fmt): prepend unused variable

* style(fmt): rustfmt

* fix(tests): various apis

* chore(dependencies): use published version of sixel crates

* style(fmt): rustfmt

* style(fmt): rustfmt

* style(lint): make clippy happy

* style(lint): make clippy happy... again

* style(lint): make clippy happy... again (chapter 2)

* style(comment): remove unused

* fix(colors): export COLORTERM and respond to XTVERSION

* fix(test): color register count

* fix(stdin): adjust STDIN sleep times
2022-07-08 17:19:42 +02:00
a-kenji
61deca80ed
fix: typo (#1567) 2022-07-07 09:04:12 +02:00
Aram Drevekenin
3c6643ba49
docs(changelog): crate refactor 2022-07-06 16:08:53 +02:00
har7an
c26a6bcf56
refactor(crates): move shared contents from zellij tile to zellij utils (#1541)
* zellij-tile: Move `data` to zellij-utils

The rationale behind this is that all components of zellij access the
data structures defined in this module, as they define some of the most
basic types in the application. However, so far zellij-tile is treated
like a separate crate from the rest of the program in that it is the
only one that doesn't have access to `zellij-utils`, which contains a
lot of other data structures used throughout zellij.

This poses issues as discussed in
https://github.com/zellij-org/zellij/pull/1242 and is one of the reasons
why the keybindings in the status bar default plugin can't be updated
dynamically. It is also the main reason for why the keybindings are
currently passed to the plugin as strings: The plugins only have access
to `zellij-tile`, but since this is a dependency of `zellij-utils`, it
can't import `zellij-utils` to access the keybindings.
Other weird side-effect are that in some places `server` and `client`
have to access the `zellij-tile` contents "through" `zellij-utils`, as
in `use zellij_utils::zellij_tile::prelude::*`.

By moving these central data structures to one common shared crate
(`zellij-utils`), `zellij-tile` will be enabled to import `zellij-utils`
like `screen` and `client` already do. This will, next to other things,
allow dropping a lot of `std::fmt::Fmt` impls needed to convert core
data structures into strings and as a consequence, a lot of string
parsing in the first place.

* utils: Integrate new `data` module, bump rust ver

Integrates the `data` module that was previously part of `zellij-tile`
to allow sharing the contained data structures between all components of
zellij.

This allows `zellij-tile` to use `utils` as a dependency. However, since
`tile` is build against the wasm target, it cannot include all of
`zellij-utils`, since a lot of dependencies there cannot compile with
`wasm` as target (Examples include: termwiz, log4rs, async-std). Thus we
make all the dependencies that cannot compile against `wasm` optional
and introduce a new feature `full` that will compile the crate with all
dependencies. Along with this, modify `lib.rs` to include most of the
data structures only when compiling against the `full` feature.

This makes the compiles of `zellij-tile` lighter, as it doesn't include
all of `utils`. As a side effect, due to the dependency notation for the
optional dependencies (See
https://doc.rust-lang.org/cargo/reference/features.html#optional-dependencies),
we bump the rust toolchain version to 1.60.0.

* tile: Import `data` from zellij-utils

Add `zellij-utils` as a dependency to `zellij-tile` and allow us access
to the `data` module defined there. Update the re-export in the
`prelude` such that from all of the plugins points of view *absolutely
nothing changes*.

* utils: Fix `data` module dependency

Since the `data` module has been migrated from `zellij-tile` to
`zellij-utils`, we import it from `zellij-utils` directly now.
Also unify the imports for the `data` module members: We import all of
the through `data::` now, not through a mixture of `data::` and
`prelude::`.

* client: Fix `data` module dependency

Since the `data` module has been migrated from `zellij-tile` to
`zellij-utils`, we import it from `zellij-utils` directly now.
Also unify the imports for the `data` module members: We import all of
the through `data::` now, not through a mixture of `data::` and
`prelude::`.
Add the "full" feature flag to the `zellij-utils` dependency so it
includes all the components we need.

* server: Fix `data` module dependency

Since the `data` module has been migrated from `zellij-tile` to
`zellij-utils`, we import it from `zellij-utils` directly now.
Also unify the imports for the `data` module members: We import all of
the through `data::` now, not through a mixture of `data::` and
`prelude::`.
Add the "full" feature flag to the `zellij-utils` dependency so it
includes all the components we need.

* tests: Fix `data` module dependency

Since the `data` module has been migrated from `zellij-tile` to
`zellij-utils`, we import it from `zellij-utils` directly now.

* utils: Remove "full" feature

in favor of conditional compilation using `target_family`. Replace the
rust 1.60 method of specifying optional dependencies based on features
and optionally include the dependencies only when not building for wasm
instead. (I.e. `cfg(not(target_family = "wasm"))`)

* cargo: Update module dependencies

since `client`, `server` and `tile` now all depend on `utils` only.
2022-07-06 16:06:56 +02:00
a-kenji
5a40f42652
add(nix): add compact-bar to the flake outputs (#1560)
The compact bar wasn't an output yet.
2022-07-04 21:38:42 +02:00
a-kenji
6689f67436
fix(ci): clippy (#1559)
Install `cargo-make` explicitly in the workflow,
even tough it should be cached from the previous steps.

There are some corner cases in which gh messes the caching up
and can't access it.
2022-07-04 20:56:47 +02:00
Thomas Linford
50a8c1b1ac
docs(changelog): fix 0 rows or cols crash 2022-07-04 18:30:34 +02:00
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
c5e82b7247
flake.lock: Update (#1554)
Flake lock file updates:

• Updated input 'crate2nix':
    'github:kolloch/crate2nix/805cdaf084c859c2ea0c084b74f4527b0483f6aa' (2022-06-17)
  → 'github:kolloch/crate2nix/91f333aca414ee346bc5bdea76fe9938f73a15f9' (2022-07-01)
• Updated input 'flake-utils':
    'github:numtide/flake-utils/1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1' (2022-05-30)
  → 'github:numtide/flake-utils/bee6a7250dd1b01844a2de7e02e4df7d8a0a206c' (2022-06-24)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/3d7435c638baffaa826b85459df0fff47f12317d' (2022-06-16)
  → 'github:nixos/nixpkgs/0ea7a8f1b939d74e5df8af9a8f7342097cdf69eb' (2022-07-02)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/da04f39d50ad2844e97a44015048c2510ca06c2f' (2022-06-18)
  → 'github:oxalica/rust-overlay/bbba5e73a21c8c67d5fe1d4d8b3fde60ab6946cd' (2022-07-03)
2022-07-03 16:43:19 +02:00
a-kenji
e23bbfddaa
fix: various typos (#1553)
Because they were wrong.
2022-07-02 19:54:50 +02:00
raphTec
1177fa2ec0 Use 'stty size' in issue template instead of tput
tput just revealed that it sometimes reports values read from the
terminal database instead of the real tty size which is misleading (in
the case where the terminal reports a zero size).
Also stty is in the coreutil instead of tput from ncurses and might be
available better.
Finally, it's just one command instead of two and less to type.
2022-07-01 12:23:12 +02:00
Jae-Heon Ji
ccec12d0f8
docs(changelog): update manpage 2022-06-29 23:02:13 +09:00
Jae-Heon Ji
580cf592c2
docs(manpage): update manpage (#1549) 2022-06-29 22:58:23 +09:00
raphCode
7cd355efaf
roll over logs / fix filling up /tmp with logs (#1548)
* roll over logs at 20 MB

* Change cap to 100 kB

* Add fix to changelog
2022-06-28 13:38:43 +02:00
Aram Drevekenin
f7e3e0805d
docs(changelog): reset scroll properly 2022-06-27 19:02:16 +02:00
Aram Drevekenin
7c1348572a
fix(scroll): reset scroll properly when typing (#1547) 2022-06-27 19:01:33 +02:00
Aram Drevekenin
9225ce6c34
docs(changelog): trim whitespace wide characters on resize 2022-06-27 17:20:35 +02:00
Aram Drevekenin
7c5c134984
fix(terminal): properly trim lines with widechars on resize (#1545) 2022-06-27 17:19:19 +02:00
Aram Drevekenin
0d48195eee
docs(changelog): in place editor fullscreen fix 2022-06-27 16:00:17 +02:00
Aram Drevekenin
443cf26d80
fix(editor): handle editor in fullscreen (#1544) 2022-06-27 15:58:19 +02:00
dependabot[bot]
ccbcc5ca83
build(deps): bump DeterminateSystems/update-flake-lock from 9 to 10 (#1543)
Bumps [DeterminateSystems/update-flake-lock](https://github.com/DeterminateSystems/update-flake-lock) from 9 to 10.
- [Release notes](https://github.com/DeterminateSystems/update-flake-lock/releases)
- [Commits](https://github.com/DeterminateSystems/update-flake-lock/compare/v9...v10)

---
updated-dependencies:
- dependency-name: DeterminateSystems/update-flake-lock
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-27 09:35:23 +02:00
a-kenji
cbf687e377 docs(changelog): add unstable feature notice
Because the change is gated behind an `unstable` feature.
2022-06-25 21:52:56 +02:00
a-kenji
625854cb4c fix(changelog): fix changelog
The changelog was wrong.
2022-06-25 21:49:14 +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
Jae-Heon Ji
9d3e075d96
docs(changelog): allow hex colors for themes 2022-06-24 12:07:20 +09:00
Ramon
b3fab84557
feat(theme): allow hex colors for themes (#1536)
* feat(theme): allow hex colors for themes

* feat(theme): allow hex strings to start with #

* fix: fix formatting issue

* fix: remove debug print statement

* fix: apply clippy suggestion for # code

Co-authored-by: ramonGonzEdu <rg2872079@gmail.com>
2022-06-24 12:05:34 +09:00
har7an
59d753dc2f
fix: Make key order consistent (#1539)
The order of the "arrow" keys is always left/down/up/right, make the
keybindings for the Scroll mode align with this ordering.
2022-06-23 21:41:57 +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