* extend display char in tab
* Add action to list all tab names
* print tab names and remove logs
* change msg name, and handle Log in normal client
* fix log
* resolve code conflict
* change var name
* add snapshot test
* fix failed test case
* restore snapshot
* Revert "restore snapshot"
This reverts commit b97a9512ab.
* restore snapshot
* revert snapshot
* fix(layout): various parser and ui fixes (#2191)
* fix(layout): error on nodes outside layout node
* fix(layout): move stacked property to pane
* fix(layout): various stack exceptions
* fix(ui): non-flexible stacked pane titles now take up their full length
* fix(ui): stack titles with no-pane-frames take up their proper length
* style(fmt): rustfmt
* docs(changelog): layout fixes
* fix(messaging): cache hold pane messages by their tab_id if the tab is not ready (#2196)
* fix(messaging): cache hold pane messages by their tab_id if the tab is not ready
* style(fmt): rustfmt
* docs(changelog): open panes fix
* fix(layout): tab focus (#2197)
* fix(layout): tab focus
* style(fmt): rustfmt
* docs(changel0g): tab focus fix
* fix(cli): new-tab now also looks in layout_dir for layouts (#2198)
* fix(cli): the new-tab action now also searches for layouts in the layout dir
* style(fmt): rustfmt
* fix(tests): add missing parameter to cli action
* docs(changelog): new-tab cli layout folder fix
* fix(kdl): new-tab keybind looks in layout_dir for layouts (#2200)
* fix(themes): missing tokyo-night-dark theme
* fix(kdl): new-tab keybind also looks in layout_dir for layouts
* docs(changelog): new-tab keybind layout folder fix
* fix(cli): edit cwd (#2201)
* fix(cli): properly set cwd for edit panes
* fix(layouts): properly set cwd for edit panes
* style(fmt): rustfmt
* docs(changelog0
* fix(layouts): do not relayout twice on auto_layout (#2202)
* fix(layouts): do not relayout twice on auto_layout
* style(fmt): rustfmt
* fix(new-tab): get config parameters from config file (#2203)
* fix(cli): take default shell from config if it exists when opening new tab
* fix(cli): take layout dir from config when opening new tab if it exists
* style(fmt): rustfmt
* docs(changelog): new-tab config parameters
* fix(grid): only use background pending styling when deleting characters (#2204)
* docs(changelog): neovim underline fix
* feat(layouts): exact panes constraint (#2206)
* style(fmt): remove warnings
* fix(swap-layouts): introduce exact panes constraint
* fix(swap-layouts): improve floating pane swap layout ux
* style(fmt): rustfmt
* docs(changelog): exact panes constraint
* fix(pty): report no-cwd for empty path returned from sysinfo (#2213)
* fix(sixel): report pixel size in winsize change ioctl (#2212)
* fix(sixel): report pixel size in winsize change ioctl
* style(fmt): rustfmt
* docs(changelog): various fixes
* style(code): naming
* test(log): adjust query tab names test to look at the log message
* style(fmt): rustfmt
---------
Co-authored-by: Aram Drevekenin <aram@poor.dev>
Co-authored-by: Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com>
* Add unit test for plugin run location parsing
* Fix file plugin parsing for relative paths
* Update test to check for path with spaces
* Add a couple more tests
* fix(cli): take default shell from config if it exists when opening new tab
* fix(cli): take layout dir from config when opening new tab if it exists
* style(fmt): rustfmt
* fix(layout): error on nodes outside layout node
* fix(layout): move stacked property to pane
* fix(layout): various stack exceptions
* fix(ui): non-flexible stacked pane titles now take up their full length
* fix(ui): stack titles with no-pane-frames take up their proper length
* style(fmt): rustfmt
* relayout working with hard coded layout
* work
* refactor(layout): PaneLayout => TiledPaneLayout
* tests passing
* tests passing
* tests passing
* stacked panes and passing tests
* tests for stacked panes
* refactor(panes): stacked panes
* fix: focusing into stacked panes from the left/right
* fix(layouts): handle stacked layouts in the middle of the screen
* fix(pane-stack): focus correctly when coming to stack from above/below
* fix(stacked-panes): resize stack
* fix(stacked-panes): focus with mouse
* fix(stacked-panes): focus next pane
* fix(layout-applier): sane focus order
* fix(stacked-panes): better titles for one-liners
* fix(stacked-panes): handle moving pane location in stack
* fix(relayout): properly calculate display area
* fix(relayout): properly calculate rounding errors
* fix(stacked-panes): properly handle closing a pane near a stack
* fix(swap-layouts): adjust swap layout sort order
* feat(swap-layouts): ui + ux
* fix(swap-layouts): include base layout
* refactor(layout): remove unused method
* fix(swap-layouts): respect pane contents and focus
* work
* fix(swap-layouts): load swap layouts from external file
* fix(swap-layouts): properly truncate layout children
* fix(stacked-panes): allow stacked panes to become fullscreen
* fix(swap-layouts): work with multiple tabs
* fix(swap-layouts): embed/eject panes properly with auto-layout
* fix(stacked-panes): close last pane in stack
* fix(stacked-panes): move focus for all clients in stack
* fix(floating-panes): set layout damaged when moving panes
* fix(relayout): move out of unfitting layout when resizing whole tab
* fix(ui): background color for swap layout indicator
* fix(keybinds): add switch next layout in tmux
* fix(ui): swap layout indication in compact layout
* fix(compact): correct swap constraint
* fix(tests): tmux swap config shortcut
* fix(resizes): cache resizes so as not to confuse panes (eg. vim) with multiple resizes that it debounces weirdly
* feat(cli): dump swap layouts
* fix(ui): stacked panes without pane frames
* fix(ux): move pane forward/backwards also with floating panes
* refactor(lint): remove unused stuff
* refactor(tab): move swap layouts to separate file
* style(fmt): rustfmt
* style(fmt): rustfmt
* refactor(panes): various cleanups
* chore(deps): upgrade termwiz to get alt left-bracket
* fix(assets): merge conflicts of binary files
* style(fmt): rustfmt
* style(clippy): no thank you!
* chore(repo): remove garbage file
* server/os_i_o: Add fixme to IPC queue
between server and client, explaining why the queue has its current
length.
* utils/ipc: Don't advertise terminal emulators
and use a more generic phrasing instead. zellij as application isn't the
place to recommend specific terminals to use it with.
* style(comment): redraw-on-backpressure comment
---------
Co-authored-by: Aram Drevekenin <aram@poor.dev>
* Add `GoToTabName` action to switch tab by name
* rm blank file
* add --create option
* format
* add some doc
* add test case
* format
* add test case
* change variable name
* xtask/run: Use varargs when run with `-data-dir`
Previously any additional arguments passed on the command line were
ignored. Now they are appended to `cargo run ...` as documented.
* server/os_i_o: Improve error message when IPC dies
and display the last send/recv error to the user instead of a generic
"Buffer full" message.
* server/lib: Log error in `send_to_client!`
so we will know when an error occured while trying to send a message to
the client. The most likely cause for this is that the client buffer
filled up and hence we cannot send any new messages. While we still
disconnect the client as before, now we also write a log message that
explains the situation.
* utils/channel: Apply rustfmt
* server/lib: Detect when client responds too slow
and log a message before disconnecting it.
* server/os_i_o: Add retry queue to client senders
that is dynamically allocated on-demand and stores `ServerToClientMsg`
in case the regular IPC channel is currently full. This acts as a
dynamic buffer to hold and buffer messages for a while until the client
hopefully catches up.
Also write a message to the log to indicate when the client is
recognized to be too slow in handling server messages.
* server: apply rustfmt
* utils/ipc: Add session name to "Disconnect" error
* utils/ipc: Fix error message indent
* server/os_i_o: Undo IPC channel extension
via `Vec` and drastically increase the IPC message queue size instead.
Measurements didn't discover a drastic increase in RAM caused by this,
and it is a much easier fix for the problem at hand.
* CHANGELOG: Add PR #2068
* server/plugins: Always recreate plugin folders
in case they aren't existent and don't mark errors to do so as
non-fatal. The latter masks the underlying cause when e.g. the `.cache`
folder is, for some reason, not writable by zellij (See #2092), whereas
the former fixes problems arising from the user having purged their
.cache/zellij folder entirely.
* utils/errors: Rewrite panic message
* changelog: Add PR #2093
* fix(panes): show visual error when failing to resize pane vertically/horizontally
* fix(resize): retry pane resize on rounding errors
* fix(resize): proper error when resizing other panes into fixed panes
* style(fmt): rustfmt
* xtask: Implement a new build system
xtask is a cargo alias that is used to extend the cargo build system
with custom commands. For an introduction to xtask, see here:
https://github.com/matklad/cargo-xtask/
The idea is that instead of writing makefiles, xtask requires no
additional dependencies except `cargo` and `rustc`, which must be
available to build the project anyway.
This commit provides a basic implementation of the `build` and `test`
subcommands.
* xtask/deps: Add 'which'
* xtask/test: Handle error when cargo not found
* xtask/flags: Add more commands
to perform different useful tasks. Includes:
- clippy
- format
- "make" (composite)
- "install" (composite)
Also add more options to `build` to selectively compile plugins or leave
them out entirely.
* xtask/main: Return error when cargo not found
* xtask/build: Add more subtasks
- `wasm_opt_plugins` and
- `manpage`
that perform other build commands. Add thorough documentation on what
each of these does and also handle the new `build` cli flags
appropriately.
* xtask/clippy: Add job to run clippy
* xtask/format: Add job to run rustfmt
* xtask/pipeline: Add composite commands
that perform multiple atomic xtask commands sequentially in a pipeline
sort of fashion.
* xtask/deps: Pin dependencies
* xtask/main: Integrate new jobs
and add documentation.
* xtask: Implement 'dist'
which performs an 'install' and copies the resulting zellij binary along
with some other assets to a `target/dist` folder.
* cargo: Update xflags version
* xtask: Measure task time, update tty title
* xtask: Update various tasks
* xtask: wasm-opt plugins in release builds
automatically.
* xtask/build: Copy debug plugins to assets folder
* xtask: Add 'run' subcommand
* xtask: Add arbitrary args to test and run
* xtask: Rearrange CLI commands in help
* xtask: Add deprecation notice
* docs: Replace `cargo make` with `xtask`
* github: Use `xtask` in workflows.
* xtask: Add support for CI commands
* xtask: Streamline error handling
* github: Use new xtask commands in CI
* xtask: Add 'publish' job
* xtask/publish: Add retry when publish fails
* xtask: Apply rustfmt
* xtask: Refine 'make' deprecation warning
* xtask: add task to build manpage
* contributing: Fix e2e commands
* xtask/run: Add missing `--`
to pass all arguments following `xtask run` directly to the zellij
binary being run.
* xtask: Stay in invocation dir
and make all tasks that need it change to the project root dir
themselves.
* xtask/run: Add `--data-dir` flag
which will allow very quick iterations when not changing the plugins
between builds.
* xtask/ci: Install dependencies without asking
* utils: Allow including plugins from target folder
* utils/assets: Reduce asset map complexity
* utils/consts: Update asset map docs
* xtask: Fix plugin includes
* xtask/test: Build plugins first
because the zellij binary needs to include the plugins.
* xtask/test: Fix formatting
* xtask: Add notice on how to disable it
* server/floating_panes: Start removing `unwrap`s
* server/panes: Remove more `unwrap`s
in floating panes code.
* utils/data: Unify `Direction` type
which was previously present in multiple locations.
Also start working on a new Resize Method (type `ResizeStrategy`), to
remove code duplication in the resize code.
* server: Implement new resize handling
with the `ResizeStrategy` type. Add a new action with the ability to
invoke it from the CLI. Take care to maintain backwards-compatibility in
terms of configuring the new resize mode.
* utils/layout: Add conversion for SplitDirection
from `data::Direction`.
* utils/data: Add impl for `Direction`
* server/panes: Rework tiled pane resizing
but it's currently still broken in a few regards and misses ability to
perform "regular" increase/decrease.
* server/panes/tiled_panes: Add debug assertion
to catch if the total area of all panes (in percent) is different from
100.0 at some point.
* server/panes/tiled/grid: Fix resize bug
caused by the fact that neighboring plugin panes previously weren't
filtered from resize operations, even though they cannot be resized at
all.
* utils/data: Add `invert` for `Resize`
* utils/data: Add member to `ResizeStrategy`
that controls whether we invert resize behavior when increasing size
towards a bounadry. This maintains current behavior.
* server/screen: Handle new attribute
in `ResizeStrategy`
* server/panes/resizer: Return `anyhow::Error`
* server/panes/tiled: Implement resize increase/decrease
without specifying a direction (towards all possible directions).
Currently broken in some cases.
* server/pane/tiled/grid: Don't return early
to preserve resize debug assertions.
* server/pane/tiled/grid: Fix resize bug
caused by checking for the wrong alignments in some cases. Also refactor
the code for looking up aligned panes.
* server/panes/tiled/grid: Cleanup code
and remove log statements and unused functions.
* server/panes/float/grid: Invert resize
if the floating pane is hitting a boundary already.
* plugins/status-bar: Add hints for new resize
* server: Use new resize method
* server: Fix tests
with new functions and result types.
* apply rustfmt
* utils: Apply rustfmt
* server/panes/floating: Fix resize increase
behavior which would previously, upon hitting a boundary, cause the pane
to invert the resize operation, which is wrong. Instead, it now does not
resize floating panes on an undirected resize "increase" in directions
where it hits boundaries.
* server/panes/tiled: Use correct resize increments
The values for the resize increments were previously wrong, causing many
of the tests to fail.
* server/panes/tiled: Fix resize checks
to correctly consider fixed-size panes.
* utils/assets/config: Update default config
with new keybindings for resize mode.
* server/panes/tiled: Fix resize check
* server/panes/tiled: Use shortener for `Direction`
type in `change_pane_size` function.
* server/panes/tiled: Restore resize behavior
for undirected resizes, to the way it was before this PR.
* server/panes/floating: Fix resize increment
for undirected resizes
* utils/data: Fix doctest
* utils: Fix test snapshots
for tests working with the default config
* changelog: Add PR #1990
* utils/errors: Add caller location to `to_log`
by building the log record manually and filling in the callers file and
line manually. It is currently not possible to determine a callers
module, hence the module is now set to "???" in all log entries logged
this way. Nonetheless, the file and line number are sufficient to find
the logs source.
* utils/errors: Reimplement `to_log`
default implementation in the `LoggableError` trait.
* changelog: Add PR #1994
errors: Maintain caller location in `to_log`
* zellij: Move "populate_data_dir" to utils
and rewrite it to take a second, optional parameter. This allows
controlling whether only a specific asset should be installed. We do
this as preparation for being able to recover from a plugin version
mismatch error, where we will need to repopulate the data dir for
offending plugins.
* server/wasm_vm: Recover from PluginVersionMismatch
Adds a global plugin cache that stores, per plugin config, the wasmer
module associated with it. Make `start_plugin` take the pre-populated
module and create only the necessary modifications to the wasm env etc.
* utils: Fix formatting
* zellij: Delete non-existent module
* utils/shared: fix missing "set_permissions"
function when not on unix systems.
* server/wasm_vm: Don't populate cachedir
with serialized versions of the WASM plugins.
* utils/input/plugins: load wasm bytes from assets
for builtin plugin specifications. This foregoes any need to:
- Dump the plugin bytes to disk at all and
- subsequently read the plugin bytes from disk
* zellij: Disable default asset installation
which previously installed only the builtin plugins to disk. This is no
longer necessary because now we can load the builtin plugins directly
from the application binary.
* utils/input/plugins: Update docs
* utils/input/plugins: Add 'is_builtin' method
to `PluginConfig` that returns true if the plugin configuration refers
to a builtin plugin.
* wasm_vm: Remove plugin version mismatch handling
because a version mismatch in an internal plugin is now unfixable, with
the plugins being loaded from the running binary, and we have no control
over external plugins in the first place.
* cargo: Reintroduce feature flag
for `disable_automatic_asset_installation`
* utils/consts: Add `ASSET_MAP`
which currently contains the compiled WASM plugins.
* utils/shared: Fix clippy lint
* utils/errors: Add more `ZellijError` variants
* zellij: Make loading internal plugins optional
by reenabling the `disable_automatic_asset_installation` flag and
utilizing it for this purpose. Changes plugin search behavior to throw
better errors in case the builtin plugins cannot be found, depending on
the state of this feature.
* utils/errors: Apply rustfmt
* utils/setup: Allow dumping builtin plugins
to a specified folder on disk. This is meant to be an "escape hatch" for
users that have accidentally deleted the builtin plugins from disk (in
cases where the plugins aren't loaded from inside the zellij binary).
* utils/input/plugins: Update docs
* utils/setup: Add hint to `setup --check` output
when zellij was built without the `disable_automatic_asset_installation`
flag and will thus not read builtin plugins from the "PLUGIN DIR".
* utils/setup: Refine `setup --dump-plugins`
to dump to:
- The default "DATA DIR" when no option is provided with the argument,
or
- The provided option, if existent
Also print a message to stdout with the destination folder that the
plugins are dumped to.
* server/wasm_vm: Ignore "NotFound" errors
when attempting to delete the non-existent plugin data directories. This
silences an error message that otherwise ends up in the logs when
quitting zellij.
* utils/errors: Extend "BuiltinPluginMissing" msg
to hint the user to the `zellij setup --dump-plugins` command to fix
their issues for them!
* utils/errors: Track caller in calls to `non_fatal`
which will hopefully, once closures can be annotated, allow us to
display the location of the call to `non_fatal` in log messages.
* utils/input/plugins: Fix plugin lookup
to prefer internal assets if available. It was previously broken because
sorting the paths vector before deduping it would bring the paths into a
wrong order, looking up in the plugin folder first.
Also print a log message when a plugin is being loaded from the internal
assets but exists on disk, too.
* Apply rustfmt
* make: build-e2e depends on wasm-opt-plugins
so it updates the assets when building the binary
* server/qwasm_vm: Remove var
* utils/consts: Add plugins from target folder
and include them in the asset map from there, too. Include plugins from
debug or release builds, depending on the build type.
* utils/consts: Take release plugins from assets
instead of the target/release folder. The latter will break
installations from crates.io, because we currently rely on including the
plugins we pre-compiled and distribute along with the binary.
* server/wasm_vm: Reintroduce .cache folder
to speedup subsequent application launches.
* cargo: Reorder workspace members
to improve behavior with `cargo make` with respect to compilation order.
* Makefile: restructure plugin tasks
* Makefile: Fix CI errors
* Makefile: More CI diagnosis
* github: Install wasm-opt in e2e test workflow
* Makefile: Build plugins for e2e-test target
* server/Wasm_vm: Reorder plugin folder creation
so no folders are created in the plugin cache when loading a plugin
fails due to not being present or similar.
* update plugins testcommit
* makefile: Change job order
* changelog: Add PR #1924
* utils/errors: Fix function order in `to_anyhow`
impl for `SendError`. Previously we attached the context to `anyhow!`,
which is wrong (because it doesn't create an `Err` type itself) and
leads to strange behavior where the error seemingly is immediately
panicked upon.
Instead, Wrap `anyhow!` into an `Err()` and then attach the context to
that. This achieves the intended goal and doesn't lead to premature
termination.
* server/terminal_bytes: Ignore error in `listen`
which occurs when quitting zellij with the `Ctrl+q` keybinding. At the
end of the `listen` function we break out of a loop and send a final
`Render` instruction to the Screen. However, when quitting zellij as
mentioned above, the Screen thread is likely dead already and hence we
cannot send it any Instructions. This causes an error in the async tasks
of the panes that handle reading the PTY input.
If we leave the error unhandled, we will have error messages in the log
whenever we quit zellij, even though the application exited normally.
Hence, we now send the final `Render` instruction but do not care
whether it is sent successfully or not.
This is a "workaround" for the fact that we cannot tell whether the
application is quitting or not.
* server/terminal_bytes: Add FIXME note
* changelog: Add PR #1918
don't log errors from async pane threads when quitting zellij
* utils/input/plugins: Return `Result` when loading
a plugin and failing to find it. Since we look up the plugin in multiple
locations, make sure we preserve each of these lookup failures and
report them to the user. This way the user can see what locations were
actually checked.
In addition, before performing the lookup, deduplicate the array of
locations to check. This prevents errors where we look up the same
plugin multiple times in the exact same locations, which can leave a bad
impression on anyone reading it who isn't familiar with the code.
* server/wasm_vm: Remove obsolete context
which was previouly required because the function it is attached to
returned only an `Option` instead of a `Result`.
* Fix bat syntax colors when using mosh
Original reason for this line according to Aram:
I set this variable as part of the Sixel support to get notcurses to
work properly. I tried communicating with the notcurses maintainers
about a workaround for this, but to no avail.
* Changelog
* Improve changelog message
* Remove empty function
* server/os_io: Redefine `ServerOsApi` result types
to use `anyhow::Result` instead. This mostly makes the need of custom
`SpawnTerminalError` obsolete (tbd in subsequent commits) and unifies
error handling across the application.
* utils/errors: Implement new `ZellijError` type
to replace any previously defined, isolated custom error types
throughout the application. Currently implements all error variants
found in `SpawnTerminalError`.
In the long term, this will allow zellij to fall back to a single error
type for all application-specific errors, instead of having different
error types per module.
* server/unit/screen: Impl new `ServerOsApi`
with updated `Result`-types.
* server/tab/unit: Impl new `ServerOsApi`
with updated `Result`-types.
* server/os_io: Impl new `ServerOsApi`
with updated `Result`-types.
* utils/ipc: Return `anyhow::Error` in `send`
rather than a `&'static str`, which isn't compatible with
`anyhow::Context`.
* server/tab: Handle `Result` in `resize_pty!`
which is returned due to the changed return types in `ServerOsApi`.
* server/tab: Handle new `Result`s
originating in the change to the `ServerOsApi` trait definition.
* server/screen: Handle new `Result`s
originating in the change to the `ServerOsApi` trait definition.
* server/panes/tiled: Handle new `Result`s
originating in the change to the `ServerOsApi` trait definition.
* server/panes/floating: Handle new `Result`s
originating in the change to the `ServerOsApi` trait definition.
* server/lib: Unwrap on new `Result`s
originating in the change to the `ServerOsApi` trait definition. The
functions here don't return a `Result` yet, this is better left to a
follow-up PR.
* server: Remove `SpawnTerminalError`
and make use of the new `ZellijError` instead. Make use of `anyhow`s
downcast capabilities to restore the underlying original errors where
necessary, as was done previously. This gives us the flexibility to
attach context information to all errors while still allowing us to
handle specific errors in greater detail.
* server/pty: Fix vars broken in rebase
* server/os_io: Remove last `SpawnTerminalError`
* changelog: Add PR #1895
Do not use Config::default()
default() has empty plugins config and that does not work with the default layout.
Use Config::try_from() instead, since it already handles the clean flag.
Also, do not check the clean flag twice, it is already handled in Config::try_from.
* server/tab: Don't panic in `Pane::render`
and do not crash the application on failure to receive a render update
from plugins any longer. Instead, will print a simple string with a hint
to check the application logs, where a more thorough error indication
can be found.
* utils/errors: re-export `anyhow::Error`
to create ad-hoc errors with custom error types, without having to wrap
them into a `context()` before to turn the into anyhow errors.
* plugins: Check plugin version on startup
and terminate execution with a descriptive error message in case the
plugin version is incompatible with the version of zellij being run.
* server/wasm_vm: Add plugin path in version error
so the user knows which plugin to look at in case they're using custom
plugins.
* server/wasm_vm: Check plugin version for equality
Previously we would accept cases where the plugin version was newer than
the zellij version, which doesn't make a lot of sense.
* server/wasm_vm: Prettier error handling
in call to `wasmer::Function::call` in case a plugin version mismatch
can occur.
* tile: Install custom panic handler
that will print the panic message to a plugins stdout and then call a
panic handler on the host that turns it into a real application-level
panic.
* tile: Catch errors in event deserialization
and turn them into proper panics. These errors are symptomatic of an
uncaught plugin version mismatch, for example when developing from main
and compiling zellij/the plugins from source. Normal users should never
get to see this error.
* utils/errors: Improve output in `to_stdout`
for anyhow errors. The default anyhow error formatting of `{:?}` is
already very good, and we just made it worse by trying to invent our own
formatting.
* tile: Reword plugin mismatch error message
* zellij: Apply rustfmt
* changelog: Add PR #1838
Improve error handling on plugin version mismatch.
* server/wasm_vm: Rephrase error in passive voice
* server/wasm_vm: Compact module imports
* utils/errors: Impl `to_anyhow` for PoisonError
which is returned by calls to `lock` on various types of locks from
`std`. In our case, some of the locks we try to acquire in `wasm_vm` can
contain an `mpsc::Sender`, which is `!Send` and hence doesn't work with
`anyhow`. Turn the `PoisonError` into an error string instead and
returns that as `anyhow::Err`.
* wasm_vm: Remove calls to `unwrap`
in the WASM VM codes server API. Note that this doesn't include the
Plugin APIs. Mark the error as `fatal` in `server/lib`, where the wasm
thread is created.
This will cause zellij to report a proper error (and log it) when any of
the plugin-related functions fails. Unfortunately, this closes the
channel to the WASM thread. Hence, when loading the plugins upon startup
fails, the error reported in the terminal (visible to the user) hints
towards a call in `plugin_pane` being the culprit. However, the real
error will be contained in the logs.
Also add an error message and print it to the user in case that the
plugin failure was caused by a plugin version mismatch.
* server/wasm_vm: Restore panic on failure to load
plugins.
* server/wasm_vm: Add fix to plugin mismatch error
* server/panes/plugin_pane: Hint to logs
when failing to receive a message from the plugins for rendering pane
contents.
* feat(cli): move command to the end of the cli arguments
* feat(cli): allow naming panes from the command line
* fix(cli): adjust actions after pane rename
* feat(cli): zellij run completions for fish
* feat(cli): zellij run completions for bash and zsh
* style(fmt): rustfmt
* fix(e2e): fix run test and snapshot
* style(fmt): rustfmt
* zellij: Add global `DEBUG_MODE` variable
that tells us whether zellij was started with the `--debug` CLI flag.
* utils/errors: Only log thread_bus message in debug
mode, and discard the message otherwise.
* utils/logging: Increase logsize to 16 MiB
per logfile, totaling 32 MiB of logs at most (in two files).
* zellij: Set global `DEBUG` variable in server
thread and make sure the value of the `--debug` CLI flag is propagated
to the server, too.
This means that to enable debug mode, the server must be started with
the `--debug` flag. This happens when the first client that starts the
zellij session has the `--debug` flag set, because it will be forwarded
to the server. Subsequent clients attaching to the same session with the
`--debug` flag specified **do not** override the value of the `DEBUG`
variable. Hence, if the server wasn't started in debug mode, this cannot
be changed.
* feat(layouts): allow defining a global cwd
* feat(layouts): allow passing global cwd from cli
* style(fmt): rustfmt
* fix(layouts): error on mixed cwd and pane children
* fix(layouts): error on non-bare children node
* refactor(layout): consolidate split direction parsing
* refactor(layout): remove unused import
* fix(layouts): log error when there is no room for layout
* fix(layout): error on size 0
* feat(layouts): allow pane templates to override template command attributes
* style(fmt): rustfmt
* chore(config): default kdl keybindings config
* tests
* work
* refactor(config): move stuff around
* work
* tab merge layout
* work
* work
* layouts working
* work
* layout tests
* work
* work
* feat(parsing): kdl layouts without config
* refactor(kdl): move stuff around
* work
* tests(layout): add cases and fix bugs
* work
* fix(kdl): various bugs
* chore(layouts): move all layouts to kdl
* feat(kdl): shared keybidns
* fix(layout): do not count fixed panes toward percentile
* fix(keybinds): missing keybinds and actions
* fix(config): adjust default tips
* refactor(config): move stuff around
* fix(tests): make e2e tests pass
* fix(kdl): add verbose parsing errors
* fix(kdl): focused tab
* fix(layout): corret default_tab_template behavior
* style(code): fix compile warnings
* feat(cli): send actions through the cli
* fix(cli): exit only when action is done
* fix(cli): open embedded pane from floating pane
* fix(cli): send actions to other sessions
* feat(cli): command alias
* feat(converter): convert old config
* feat(converter): convert old layout and theme files
* feat(kdl): pretty errors
* feat(client): convert old YAML files on startup
* fix: various bugs and styling issues
* fix: e2e tests
* fix(screen): propagate errors after merge
* style(clippy): lower clippy level
* fix(tests): own session_name variable
* style(fmt): rustfmt
* fix(cli): various action fixes
* style(fmt): rustfmt
* fix(themes): loading of theme files
* style(fmt): rustfmt
* fix(tests): theme fixtures
* fix(layouts): better errors on unknown nodes
* fix(kdl): clarify valid node terminator error
* fix(e2e): adjust close tab test
* fix(e2e): adjust close tab test again
* style(code): cleanup some comments
* get command panes not to exit on command exit
* separate terminal pane_ids from raw_fds
* render frame according to exit status
* re-run command on enter and close pane on ctrl-c
* proper error when command is not found
* make ui nicer
* initial pane title for command panes
* fix pane override bug
* reap terminal_ids from os_input_output on pane close
* bool floating flag
* some ui tweaks
* fix tests
* make rustfmt happy
* e2e test for command pane
* fix various concurrency issues
* rename command to run in the cli
* rustfmt
* style(fmt): rustfmt
* fix(e2e): command => run
* fix(e2e): command => run in snapshot too!
* utils/errors: Add `ToAnyhow` trait
for converting `Result` types that don't satisfy `anyhow`s trait
constraints (`Display + Send + Sync + 'static`) conveniently.
An example of such a Result is the `SendError` returned from
`send_to_plugins`, which sends `PluginInstruction`s as message type.
One of the enum variants can contain a `mpsc::Sender`, which is `!Sync`
and hence makes the whole `SendError` be `!Sync` in this case. Add an
implementation for this case that takes the message and converts it into
an error containing the message formatted as string, with the additional
`ErrorContext` as anyhow context.
* server/tab: Remove calls to `unwrap()`
and apply error reporting via `anyhow` instead. Make all relevant
functions return `Result`s where previously a panic could occur and
attach error context.
* server/screen: Modify `update_tab!`
to accept an optional 4th parameter, a literal "?". If present, this
will append a `?` to the given closure verbatim to handle/propagate
errors from within the generated macro code.
* server/screen: Handle new `Result`s from `Tab`
and apply appropriate error context and propagate errors further up.
* server/tab/unit: `unwrap` on new `Result`s
* server/unit: Unwrap `Results` in screen tests
* server/tab: Better message for ad-hoc errors
created with `anyhow!`. Since these errors don't have an underlying
cause, we describe the cause in the macro instead and then attach the
error context as usual before `?`ing the error back up.
* utils/cargo: Activate `anyhow`s "backtrace" feature
to capture error backtraces at the error origins (i.e. where we first
receive an error and convert it to a `anyhow::Error`). Since we
propagate error back up the call stack now, the place where we `unwrap`
on errors doesn't match the place where the error originated. Hence, the
callstack, too, is quite misleading since it contains barely any
references of the functions that triggered the error.
As a consequence, we have 2 backtraces now when zellij crashes: One from
`anyhow` (that is implicitly attached to anyhows error reports), and one
from the custom panic handler (which is displayed through `miette`).
* utils/errors: Separate stack traces
in the output of miette. Since we record backtraces with `anyhow` now,
we end up having two backtraces in the output: One from the `anyhow`
error and one from the actual call to `panic`. Adds a comment explaining
the situation and another "section" to the error output of miette: We
print the backtrace from anyhow as "Stack backtrace", and the output
from the panic handler as "Panic backtrace". We keep both for the
(hopefully unlikely) case that the anyhow backtrace isn't existent, so
we still have at least something to work with.
* server/screen: Remove calls to `fatal`
and leave the `panic`ing to the calling function instead.
* server/screen: Remove needless macro
which extended `active_tab!` by passing the client IDs to the closure.
However, this isn't necessary because closures capture their environment
already, and the client_id needn't be mutable.
* server/screen: Handle unused result
* server/screen: Reintroduce arcane macro
that defaults to some default client_id if it isn't valid (e.g. when the
ScreenInstruction is sent via CLI).
* server/tab/unit: Unwrap new results
* docs: Add ERROR_HANDLING
that explains how we plan to change error handling in zellij and invites
new contributors to join the fun. Details the currently existent error
handling capabilities and gives a bunch of examples taken from #1670.
* utils/errors: Shorten docblock
by moving previous content under "Help Wanted" to the new
`docs/ERROR_HANDLING` document and link to the document instead.
* utils: re-export "anyhow" unconditionally
even for wasm targets.
* utils/errors: Share wasm-compatible code
and move everything that can't run in wasm into a separate submodule.
* utils: Share "errors" module unconditionally
The module is now structured such that all code incompatible with wasm
targets lives in its own submodule that isn't included when compiling
for wasm targets.
* utils/errors: Add "Help wanted" doc section
that informs the reader about the endeavour to improve error handling
throughout the zellij code base.
* plugins: Handle errors returned by `zellij_tile`
now that the panic calls have been removed.
* utils/errors: Extend `anyhow::Result` with traits
that allow for easy/concise logging of `anyhow::Result` types and
panicking the application when they are fatal or non-fatal.
* utils/errors: Fix doctest
* utils/errors: Add prelude
that applications can import to conveniently access the error handling
functionality part of the module. Re-exports some parts and macros from
anyhow and the `LoggableError` and `FatalError` traits.
* server/screen: Adopt error handling
and make all fallible functions from the public API return a `Result`.
Append error contexts in all functions that can come across error types
to allow tracing where an error originates and what lead there.
* server/lib: Catch errors from `screen`
and make them `fatal`. This will log the errors first, before unwrapping
on the error type and panicking the application.
* server/unit/screen: Fix unit tests
and unwrap on the `Result` types introduced from the new error handling.
* utils/errors: Track error source
in calls to `fatal`, so we keep track of the location where the panic
really originates. Otherwise, any call to `fatal` will show the code in
`errors` as source, which of course isn't true.
Also change the error formatting and do not call `to_log` for fatal
errors anymore, because the panic is already logged and contains much
more information.
* utils/errors: Update `FatalError` docs
* plugins: Undo accidental modifications
* utils/errors: Improve module docs
explain some error handling facilities and the motivation behind using
them.
* server/screen: Remove `Result` from Infallible
functions that are part of the public API.
* update vte to v0.11.0, and turn off it's default-features
* vte's default includes no_std, and in that case the osc params buffer is capped at 1024 bytes
* add changelog entry
* status-bar: first_line: Use more generic var names
Rename all `CtrlKey...` to the equivalent `Key...` to make the name less
specific. It implies that all key bindings use Ctrl as modifier key,
which needn't necessarily be the case.
* status-bar: first_line: Refactor `ctrl_keys`
Removes lots of code duplication by `Unselect`ing all keys by default
and only `Select`ing what is actually required for a given Input mode.
* utils: conditionally compile unix-specific code
In `zellij_utils`, the following modules each contained code that was
previously targeting only the unix platform:
- consts: Works with unix-specific filesystem attributes to set e.g.
special file permissions. Also relies on having a UID.
- shared: Uses unix-specific filesystem attributes to set file
permissions
These will never work when targeting wasm. Hence the concerning code
passages have been moved into private submodules that are only compiled
and re-exported when the target isn't `#[cfg(unix)]`. The re-export
makes sure that crates from the outside that use `zellij_utils` work as
before, since from their point of view nothing has changed.
* utils: Share more modules with wasm
that work on both wasm and unix natively. This requires factoring out
bits of code in the `setup` and `input` modules into a private submodule
that is re-exported when the compilation target is *not* "wasm". The
following modules are now available to the wasm target:
- cli
- consts
- data
- envs
- input (partial)
- actions
- command
- configs
- keybinds
- layout
- options
- plugins
- theme
- pane_size
- position
- setup (partial)
- shared
The remaining modules unavailable to wasm have dependencies on crates
that cannot compile against wasm, such as `async_std` or `termwiz`.
* utils/input/keybinds_test: Fix import
of the `CharOrArrow` struct which is now part of the `data` submodule.
* utils/layout: Use global serde crate
Previously the code was decorated with `#[serde(crate = "self::serde")]`
statements which cannot be shared with wasm. Use the regular serde
without specifying which serde is meant.
* utils/data: Implement `fmt::Display` for `Key`
so the Keybindings can be displayed via `format!` and friends in e.g.
the status bar.
* tile/prelude: Re-export `actions`
submodule of `zellij_utils` so the plugins can access the `ModeKeybinds`
struct with all of its members.
* utils/data: Fix `ModeInfo::keybinds` type
and transfer a vector of `(Key, Vec<Action>)` to the plugins so they can
parse it themselves, instead of passing strings around. Due to the
requirement of the `Eq` trait derive on `ModeInfo` this requires
deriving `Eq` on all the types included by `Key` and `Action` as well.
Note that `Action` includes the `layout::SplitSize` structure as a
member. We cannot derive `Eq` here since `SplitSize::Percent(f64)`
cannot satisfy `Eq` because `f64` doesn't implement this. So we add a
new type to hack around this limitation by storing the percentage as
`u64` internally, scaled by a factor of 10 000 and transforming it to
f64 when needed. Refer to the documentation of `layout::Percent` for
further information.
* utils/data: Make `Key` sortable
so the keybindings can be sorted after their keys.
* WIP: utils/input: Make keybinds accessible
when generating `ModeInfo` structs.
* utils/data: Handle unprintable chars in `Key`
when displaying via the `fmt::Display` trait. Handles `\t` and `\n` and
represents them as UTF-8 arrow glyphs.
* HACK: utils/layout: Use u64 for SplitSize::Percent
The previous workaround using a custom `Percent` type fails at the
absolute latest when confronted with user layouts, since these do not
know about the scaling factor and will thus break. It still breaks
currently because `Percent` now expects a u64 (i.e. `50`, not `50.0`)
but this is more easily explained and understood.
* status-bar: Add helper macros
that retrieve the key bound to execute a sequence of `Action` given a
specific Keybinding, and a shorthand that expands to
`Action::SwitchToMode(InputMode::Normal)` used for pattern matching with
the `matches!` macro.
* status-bar/first_line: Get shared superkey if any
from the `ModeKeybindings` in the current `ModeInfo` struct. If the
configured keybindings for switching the modes don't have a superkey in
common, do not print a common prefix.
* status-bar/first_line: Add key to KeyShortcut
which is the key that must be pressed in the current mode to execute the
given shortcut (i.e. switch to the given mode).
* status-bar/first_line: Dynamically set mode binds
Read the keybindings for switching the modes to print in the first line
from the actually configured keybindings for the current mode. Add some
logic to the code that:
- Prints only the "single letter" of the keybinding if all mode-switch
shortcuts *share the same modifier key*,
- Or prints the whole keybinding (with modified) into each segment if
there is no common modifier key.
* status-bar/second_line: Display configured binds
Instead of showing some hard-coded default values. For each mode, reads
the keybindings from the configured keybindings based on some sequence
of action. For example, the keybinding for `New` in the `Pane` menu is
now determined by looking into the configured keybindings and finding
what key is bound to the `Action::NewPane(None)` action.
If no keybinding is found for a given sequence of actions, it will not
show up in the segments either.
* WIP: utils/keybinds: Make key order deterministic
by using a BTreeMap which by default has all of its elements in sorted
order internally. As of currently this doesn't seem to impress the order
in which the keybindings are sent to the plugins, though.
* utils/data: Reorder `Key` variants
to have the Arrow keys sorted as "left", "down", "up", "right" in
accordance with the display in e.g. the status bar.
* status-bar/first_line: Fix inverted `matches!`
when trying to obtain the keybindings to switch between the input modes.
Its initial purpose was to filter out all ' ', '\n' and 'Esc'
keybindings for switching modes (As these are the default and not of
interest for the status bar display), but it was not negated and thus
only filtered out the aforementioned keys.
* status-bar: Don't get all modeswitch keybinds
but only those that are displayed in the status bar. This currently
excludes the keybindings for Entering the Pane/TabRename mode, Tmux mode
and Prompt mode. We must explicitly exclude these since they aren't
bound to the same Modifiers as the regular keys. Thus, if we e.g. enter
Pane or Tab mode, it will pick up the
`SwitchToMode(InputMode::TabRename)` action as being bound to `c`, hence
the `superkey` function cannot find a common modifier, etc. But we don't
display the `TabRename` input mode in the first line anyway, so we must
ignore it.
Therefore, we additionally add the keybinding to call the `Action::Quit`
action to terminate zellij to the vector we return. Also remove the
`(Key, InputMode)` tuple and convert the return type to a plain
`Vec<Key>`, since the never worked with the `InputMode` in the first
place.
* status-bar/first_line: Fix output for tight screen
Implement the "Squeezed" display variant where we do not display which
of the modes each keybinding switches to, but only the keybinding
itself.
* status-bar/second_line: Remove trailing " / "
* status-bar/second-line: Refactor key hints
Instead of determining the appropriate key hints for every case
separately (i.e. enough space to show all, show shortened, shot
best-effort), create a central function that returns for the current
`InputMode` a Vector with tuples of:
- A String to show in full-length mode
- A String to show in shortened/best-effort mode
- The vector of keys that goes with this key hint
This allows all functions that need the hints to iterate over the vector
and pick whatever hint suits them along with the Keys to display.
* status-bar/second-line: Implement shortened hints
* utils/data: Fix display for `Key::Alt`
which previously printed only the internal char but not the modifier.
* status-bar/first-line: Add hidden Tmux tile
that is only shown when in Tmux mode. Note that with the default config
this "breaks" the shared superkey display, because it correctly
identifies that one can switch to Scroll mode via `[`.
* status-bar: Print superkey as part of first line
Instead of first obtaining the superkey and then the rest of the first
line to display. This way we don't need to split up individual data
structures and carry a boolean flag around multiple functions.
It also has the advantage that when the available space is really tight,
the first line is entirely empty and doesn't display a stale superkey
without any other keybinding hints.
* status-bar: Rework keybinding theming
Previously there were individual functions to create the tiles in the
first line depending on whether:
- A tile was selected, unselected, unselected alternate (for theming) or disabled, and
- Tiles had full length or were displayed shortened
In the first case, the functions that previously handled the theming
only differed in what theme they apply to the otherwise identical
content. Since the theming information was drawn from a flat structure
that simulated hierarchy by giving hierarchical names to its theme
"members", this couldn't be handled in code. In the second case, some of
the theming information needed for the full-length shortcuts was
replicated for the shortened shortcuts.
Instead, rewrite the general Theming structure into a hierarchical one:
Adds a new structure `SegmentStyle` that contains the style for a single
segment depending on whether it is selected, unselected (alternate) or
disabled. Refactor the `first-line` module to use a single function to
generate either full-length or shortened tiles, that does functionally
the same but switches themes based on the selection status of the tile
it themes.
* status-bar/second-line: Return new `LinePart`s
from the `add_shortcut` function instead of modifying the input
parameters.
* status-bar/second-line: Implement adaptive behavior
and make the keyhints adapt when the screen runs out of space. The hints
first become shortened and when necessary partially disappear to display
a "..." hint instead.
* status-bar/second-line: Show float pane binding
based on the keycombination that's really bound to switching into the
"Pane" input mode.
* status-bar/get_keys_and_hints: Add more modes
for the keybindings in Tmux and the Pane/TabRename input modes.
* status-bar/second-line: Unify mode handling
and don't do extra shortcut handling for Tmux and the Pane/TabRename
modes any longer. Instead, assemble this like for all other modes from
the keybinding and hints vector.
* status-bar/first-line: Refactor common modifier
to a separate function so it can be used by other modules, too.
* status-bar/second-line: Display modifier in hints
when available. For example, for bindings to move between panes when in
PaneRename mode, now displays "Alt + <hjkl>" instead of
"<Alt+hAlt+j...>".
* utils/ipc: Remove `Copy` from `ClientAttributes`
as preparation to add `Keybinds` as a member to the `ClientAttributes`
struct. `Keybinds` contains a `HashMap`, for which the `std` doesn't
derive `Copy` but only `Clone`.
* utils/input/keybinds: Fix import path
Import `Key` and `InputMode` directly from `data`.
* utils/ipc: Add `Keybinds` to `ClientAttributes`
so we can keep track, pre-client, of the configured key bindings and
pass them around further in the code.
* server/lib: Store `ClientAttributes` over `Style`
in `SessionMetadata` to be able to pass Keybindings to other places in
the code, too. Since `Style` is also a member of `ClientAttributes`,
this works with minimal modifications.
* utils/input: Change `get_mode_info` parameters
to take a `ClientAttributes` struct instead of merely the `Style`
information. This way we can get the `Style` from the
`ClientAttributes`, and also have access to the `keybinds` member that
stores the keybinding configuration.
* utils/ipc: Use `rmp` for serde of IPC messages
instead of `bincode`, which seemingly has issues (de)serializing
`HashMap`s and `BTreeMap`s since `deserialize_any` isn't implemented for
these types.
* fix(nix): remove `assets` from `gitignore`
Remove `assets` from the gitignore of the plugins themselves,
since every single plugin now depends on the asset being accessible
in its source directory.
* tests/e2e: Fix status bar in snapshots
to reflect the current state of the dynamic keybindings.
* status_bar/first_line: Don't show unbound modes
If switching to a specific mode isn't bound to a key, don't show a
tile/ribbon for it either. E.g. in `LOCKED` mode, this will only show
the tile for the `LOCK` mode and ignore all others.
* utils/data: Make 'Key::Char(' ') visible as "␣"
so the user doesn't only see a blank char but has an idea that the space
key is meant.
* status_bar/second_line: Remove extra hints
generated by the `hint_producing_function` that would tell the user in
every input mode how to get back to normal mode. Instead, add this as
keybinding to the general keybindings vector.
This removes some lines of duplicated code but most of all now applies
the correct theming to this keybinding. Additionally, previously the
`RenameTab` and `RenamePane` input modes would show the keybinding to
get back to normal mode twice and both of them were hardcoded. This
binding is now dynamically displayed based on what the user configured
as keybinding.
* utils/data: format unprintable chars as words
instead of unicode symbols. E.g. write "SPACE" instead of "␣".
* utils/data: Fix display for `Ctrl`/`Alt` keys
previously their "inner" chars would be displayed with a regular
`fmt::Display` for the `&str` type they are. This doesn't match what we
want to output. So instead we wrap the inner chars into `Key::Char`
before printing them.
* utils/data: Change order of `Key`s
so that e.g. for the default bindings in `Scroll` mode we prefer to show
`PgDn|PgUp` rather than the arrow keys these actions are bound to as
well.
* status_bar/first_line: Don't ignore default char
bindings by default. These include the '\n', ' ' and 'Esc' bindings that
by default lead back to `Normal` input mode from all the modes.
Previously we would unconditionally ignore them and consequently not
print the tile when in fact the user may have bound this particular
action to either of the keys.
Instead now we first ignore the keys mentioned and if we turn up with an
undefined binding, we consider these default keys as well so we get
*something* to display in any case.
* status_bar/first_line: Add space when no modifier
is shared between the keybindings. This way there isn't a stray arrow at
the very border of the screen, but it is spaced just like the tab-bar
and the second line is.
* status_bar/second_line: Print separators
between consecutive keys bound to specific actions. This allows the user
to visually differ between different keys.
* status_bar/main: Don't return modifier if empty
* status_bar/first_line: Don't suppress Disabled tiles
Disabled is a special state that the keybindings only assume in locked
mode. It turns the respective tiles grey to signal to the user that
these are currently inactive. With respect to users new to zellij, it
may appear confusing that when entering locked mode all the other tiles
disappear (which they do because they have no valid keybinding
assigned). Since we have no keybinding for them, we still display them
but without any associated key (i.e. as `<>` for the binding).
* status_bar/first_line: Don't print leading triangle
on first tile, when there is no shared superkey.
* status_bar/second_line: Add exceptions
for inter-key separators. Keeps groups of `hjkl` and arrow keys intact
(doesn't add separators between the keys) but separates all others.
* status_bar/main: Refactor `action_key`
to a regular function instead of a macro. It turns out that while being
able to match patterns is a nice feature, we completely rely on the keys
that drop out of the pattern found this way to be sorted in a sensible
way. Since we sort the key vectors in the necessary places after the
keys, and not the actions, this of course doesn't apply when the user
changes "hjkl" to "zjkl", which would then become "jklz". Now this is of
course wrong, because "z" still means "Move focus left", and not "Move
focus right".
With the function we now assume a slice of Actions that we match the
action vectors from the keybindings against to obtain the necessary
keys. In order to avoid ugly `into_iter().chain(...)` constructs we had
before we also add a new function `action_key_group` that takes a sliced
array of slices to get a whole group of keys to display.
* status_bar/first_line: Fix "triangle" for short tiles
since we do not want to display a colored triangle at the start of the
line when in sortened mode (just as we do for the long tiles now).
Also fix a bug that would make the triangle reappear when the first
keybinding to be displayed didn't have a key assigned and thus wouldn't
be displayed at all.
* status_bar/second_line: Fix typo
that would cause single `Ctrl+?` bindings for actions in the second line
to be displayed as `Ctrl + <Ctrl+?>`.
* status_bar/second_line: Fix char count
when displaying groups of keys in a binding with or without a separator.
* status_bar: Use new `action_key` fn
instead of the previous macro to obtain the keys to display in the
status bar in a fixed given order. Also fix the display "bug" where tab
switching would be shows as "ArrowLeft/ArrowDown" instead of
"ArrowLeft/ArrowRight".
* status_bar/second_line: Fix floating pane hint
that tells the user what keybinding to press to suppress the currently
active floating panes. This was previously hardcoded.
* utils: Send full keybinds in `ModeInfo`
instead of the currently active `ModeKeybinds` for the active input
mode. Some of the UI issues cannot be solved without having access to
*all* keybindings.
* utils: Refactor keybinds vec into type
to make clippy happy.
* status_bar/first_line: Remove needless borrows
* status_bar: Factor out printing keybindings
into a separate function that takes a vector of keys and a palette and
returns the painted key groups, with correct inter-character separation
where necessary and factoring out common modifier keys.
* status_bar/tip: Use real keybindings
instead of printing hard-coded messages to the user.
* status_bar: abort early when keyvector is empty
in `style_key_with_modifier`.
* status_bar/tip: Fix all keybindings
and make them dynamic given the keybindings really active in the current
session. Also display **UNBOUND** is some keybinding is missing from the
users config.
* status_bar: Go clippy!
* status_bar: Add documentation
and add a new exception group to `action_key_group` that ensures that
`hl` and `jk` won't be separated with `|`.
* status_bar/tip: Detect when key aren't bound
correctly and show "UNBOUND" as keyhint instead, then. Previously we
would only check the length of the whole keybinding segment, but that
isn't a good indicator since most of the bindings require changing modes
first, which already adds a variable number of letters to the segment.
However, there is not point in showing how to get to a certain mode, if
the binding needed in that mode doesn't exist.
* status_bar/first_line: Show bindings when locked
if the user has any configured.
* status_bar: Don't consider 'hl', 'jk' groups
that don't need a separator in between the letters.
* status_bar/second_line: Add "search" keybindings
for the new Search functionality.
* tests/e2e: Fix snapshots
with what the status bar now really displays.
* status_bar: Remove old comments
* status_bar/first_line: Rename 'long_tile'
to the more descriptive name 'mode_shortcut', which better describes
what this function does.
* status_bar/first_line: Fix spacing in simple UI
where the modifier would be shows as `Ctrl +`, without a trailing space.
This isn't an issue in regular mode, where we have the spacing from the
arrow gaps (`>>`) that "simulates" this effect.
* status_bar: Refactor and rename `ctrl_keys`
so it doesn't rely on some "external" index for operation any more.
* status_bar: Add unit tests to shared functions
and fix a bug in the process where certain `Ctrl` keybindings would be
displayed wrong.
* status_bar/first_line: Rename functions
responsible for printing the long and short shortcut keyhint tiles. Also
add some documentation that explains their purpose and the arguments
they accept.
* status_bar/tips: Remove stray "/" in quicknav tip
* utils/layout: Remove old comments
introduced when rewriting `SplitSize::Percent` to not hold an `f64`
type.
* status_bar: Add "regex" as test dependency
We use regular expressions to strip all ANSI escape sequences in the
strings that are produced by the plugin functions during testing. We do
not test for the style information, but merely for the raw text.
* status_bar: Implement unit tests
* Makefile: Always run tests on host triple
This allows the unit tests for all plugins to be run on the host as well
(because their default compilation target is wasm32-wasi).
* tests/e2e: Add test for custom bindings
in the status bar. Makes sure that the modified bindings from a custom
configuration file are read and applied to the UI.
Co-authored-by: a-kenji <aks.kenji@protonmail.com>
* WIP: First draft of searching in panes.
* Add ability to highlight search-results in viewport and move forwards/backwards
* Clear search results when leaving search
* Search newly scrolled in lines and have live-search when entering search-term
* search_forward/backward() now doesn't get the needle again, since we already know it
* Use red and yellow from theme. No idea if we should introduce new 'search'-colors
* Implement moving the viewport for searches outside the current one.
* Implement hacky case-insensitivity (ASCII only at the moment)
* Implement wrap-search and prepare infrastructure for whole-word search
* Add a bunch of tests and an embarrasing amount of bugfixes
* Remember search selection when toggling case-sensitivity (if possible)
* New tab integration tests and make search work with floating panes
* Make highlights work with resize (not keeping the active-selection in most cases)
* Switch the search-algo a bit in order to make multi-line search work
* Don't forget active selection when nothing more is found, reflow found selections and scroll correctly
* Make all search-related function calls in plugin-pane No-ops
* Activate whole word search (ASCII only)
* Run cargo fmt
* Make clippy happy
* Remove unneeded transferred_rows_count
* Remove boilerplate and use macro instead
* Add explanatory comments
* Move search-related functions into SearchResults impl and try to remove duplicate code
* Move clearing of search-results upon mode-switch to appropriate place
* Jump to the first occurence while typing (EnterSearch), if none is found in the current viewport
* Always show needle and also show search modifiers in pane title
* Integration tests now use correct InputMode, so we can test the pane title when doing searches
* Move no-op implementation of search-functions from plugin-pane to pane-trait
* Move SearchResult to its own file
* Try to clean up search_row() a bit
* Make clippy happy
* fix: various typos (#1553)
Because they were wrong.
* 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)
* 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
* docs(changelog): fix 0 rows or cols crash
* 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.
* add(nix): add `compact-bar` to the flake outputs (#1560)
The compact bar wasn't an output yet.
* 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.
* docs(changelog): crate refactor
* fix: typo (#1567)
* 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
* docs(changelog): sixel support
* flake.lock: Update (#1575)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix(ci): add new rust toolchain location to action (#1576)
* rust-toolchain: Update (#1578)
Co-authored-by: a-kenji <a-kenji@users.noreply.github.com>
* chore(nix): hide `nix` directory (#1579)
* chore(gblame): add move to git-blame-ignore-revs
This is not relevant for `git blame` messages.
* chore(docs): add more matrix links (#1581)
* fix: add usage comment to fish shell auto-start snippet (#1574) (#1583)
* docs(changelog): add usage comment to fish script
* Refactor match session name (#1582)
* docs(changelog): refactor get session name (#1582)
* 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>
* docs(changelog): detach message
* perf(terminal): better responsiveness (#1585)
* performance(pty): only buffer terminal bytes when screen thread is backed up
* style(fmt): rustfmt
* docs(changelog): performance improvement
* style(fmt): rustfmt
* fix(search): adjust foreground color for better readability
* style(fmt): rustfmt
* test(e2e): update snapshots from SCROLL to SEARCH
* Rename search directions to up/down
* Rename search-functions in tests as well
* Move all search-related functions out of grid.rs and into search.rs and reuse as much as possible
* Fix bug where searches that fall on the line-ending are highlighting the whole line
* Silence clippy on what I think is a false-positive
* 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
* docs(changelog): cursor show/hide alternate screen fix
* fix(editor): handle editor/visual/configured editor with arguments (#1587)
* fix(editor): handle editor/visual/configured editor with arguments
* style(fmt): rustfmt
* docs(changelog): editor with arguments
* fix(ci): quoting issues (#1589)
* 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
* docs(changelog): mouse click on pane frame fix
* flake.lock: Update (#1592)
Flake lock file updates:
• Updated input 'crate2nix':
'github:kolloch/crate2nix/2d20dec4ae330f39b0bebeb8eb4a201b58d2b82c' (2022-07-09)
→ 'github:kolloch/crate2nix/45d97c7ce62c3d53954743057ceb32e483c31acd' (2022-07-12)
• Updated input 'nixpkgs':
'github:nixos/nixpkgs/b39924fc7764c08ae3b51beef9a3518c414cdb7d' (2022-07-08)
→ 'github:nixos/nixpkgs/4a01ca36d6bfc133bc617e661916a81327c9bbc8' (2022-07-14)
• Updated input 'rust-overlay':
'github:oxalica/rust-overlay/3dfc78e42a285caaf83633224a42e7fb7dde191b' (2022-07-10)
→ 'github:oxalica/rust-overlay/2cd36d4aef875867ee1d7963541ccb3ae50b358c' (2022-07-16)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix(search): clear search when entering input in non-search-mode
* fix(search): handle searching in updating viewport
Co-authored-by: Martin Sirringhaus <>
Co-authored-by: a-kenji <aks.kenji@protonmail.com>
Co-authored-by: Thomas Linford <tlinford@users.noreply.github.com>
Co-authored-by: Aram Drevekenin <aram@poor.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: a-kenji <a-kenji@users.noreply.github.com>
Co-authored-by: Tassilo Horn <tsdh@gnu.org>
Co-authored-by: Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com>
Co-authored-by: Matthias Beyer <mail@beyermatthias.de>
* 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>
* 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
* 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.
* 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
* add(option): `default_layout`
Add `option` `default_layout` / `default-layout`,
that allows specifying a different layout, that should
be loaded on start.
Eg:
```
default_layout: compact
```
* add(manpage): `default_layout`
* initial commit for opening the current buffer in an editor
* fix(editor): take hidden panes into consideration when manipulating tiled grid
* when closing an edit buffer, take the geometry of the replaced buffer from the closed buffer
* if the floating panels are displayed, don't add to hidden panels the current buffer
* strategy changing - put the panels inside a suppressed_panels HashMap instead of hidden_panels
* Revert "strategy changing - put the panels inside a suppressed_panels HashMap instead of hidden_panels"
This reverts commit c52a203a20.
* remove the floating panes by moving them to the tiled_panes in hidden_panels
* feat(edit): open editor to correct line and don't crash when none is set
* formatting
* feat(edit): use suppressed panes
* style(fmt): rustfmt and logs
* style(fmt): clean up unused code
* test(editor): integration test for suppressing/closing suppressed pane
* test(e2e): editor e2e test
* style(fmt): rustfmt
* feat(edit): update ui and setup
* style(fmt): rustfmt
* feat(config): allow configuring scrollback_editor explicitly
* style(fmt): rustfmt
* chore(repo): build after merging
Co-authored-by: Aram Drevekenin <aram@poor.dev>
* Initial commit for fixing #1353
* adding a new line between the lines_above and the viewport
* changes following code review
* implementing a test case for the dump screen
* implemented test case for dump_screen
* better regexp replace
* fixes following code review
* style(api): remove extraneous method in plugin pane
* style(fmt): rustfmt
* style(tests): fix method name
Co-authored-by: Aram Drevekenin <aram@poor.dev>
* feat(copy): add copy_on_select option
with default value of true, keep current behavior of automatically
copying selection to clipboard when done selecting.
with copy_on_select = false, on mouse release the selection remains, and
can be copied with the `Copy` action.
* add example to default.yaml
* add copy action example to default.yaml, cleanup
* fix updated tab tests
* fix selection changing while scrolling after release
* fix clippy warnings
* 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
* Remove gray from theme config and improve colors for dark themes
* improve theme usage
* Add new themes and minor fixes
* improve tokyo-night theme according to new changes
* Fix formatting
* change default black colour
* docs(CHANGELOG): #1274 improve themes
* feat(ui): change from non-working alt-brackets to alt-arrows
* style(fmt): rustfmt
* fix: improve parsing of `alt` combination keys
The binding of the keys can now be specified with:
- Alt: 'c'
- Alt: Up
- Alt: Down
- Alt: Left
- Alt: Right
* chore(fmt): rustfmt
Co-authored-by: a-kenji <aks.kenji@protonmail.com>
* 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
fix(wasm_vm): use `cache_dirs` for ephemeral plugin data
Use proper `cache_directories` by default, that users can be expected
to have proper write permissions for.
The directory is used for plugin hashes, and compilation data.
* fix(feat): `disable_automatic_asset_installation`
This fixes a regression in the feature system:
The asset installation didn't get turned off by the feature.
Add error logging to the install functions.
Properly show features in setup
disable `mkdir` in `wasm_vm` on `feature-disable-asset-installation`
Alternative:
Is this even needed? We make sure the directory is there upon the
normal asset installation.
fixes#1130
And infrastructure to make it possible
to add more dynamic completions for
different shells in the future.
eg:
```
zellij attach [completes-active-sessions]
zellij kill-session [completes-active-sessions]
```
fixes: #1030
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
* feat(layout): add focus attribute in layout
* feat: add state of focus to tab
* chore: i love clippy
* test(layout): update focus options
* feat: add focus pane
* feat: apply focus-pane when layout is only loaded
* change the instruction name for focus-on-tab
* chore: apply cargo-fmt
* test: add e2e testcase
* Read pane name from layout
* Update pane name at runtime
* Fix tests
* prefer and render pane name over pane title
* fix clippy errors
* fix after rebase