summaryrefslogtreecommitdiffstats
path: root/zellij-client/src
AgeCommit message (Collapse)Author
2021-11-11fix(options): handling and overwriting cli opts (#859)a-kenji
* fix(options): handling ond verwriting cli opts * previously it was only possible to turn off certain features with a command line option, now it is possible to also overwrite this behavior in a sane way, for that some breaking changes happened: following options got renamed and inverted: ``` disable_mouse_mode -> mouse_mode no_pane_frames -> pane_frames ``` following cli options got added: ``` mouse-mode [bool] pane-frames [bool] simplified-ui [bool] ``` the following cli flag got removed: ``` simplified-ui ``` They can be specified in the following way: ``` zellij options --mouse-mode true ``` in order to enable the mouse mode, even if it is turned off in the config file: ``` mouse_mode: false ``` The order is now as follows: 1. corresponding flag (`disable-mouse-mode`) 2. corresponding option (`mouse-mode`) 3. corresponding config option (`mouse_mode`) * add: options and flags for the same value conflict * example: ``` zellij options --mouse-mode true --disable-mouse-mode` ``` ``` $ error: The argument '--mouse-mode <mouse-mode>' cannot be used with '--disable-mouse-mode' ```
2021-11-10fix(input): properly query bracketed paste mode in terminals (#858)Aram Drevekenin
2021-11-10add(feature): toggle boolean options with cli flag (#855)a-kenji
add the ability to toggle boolean options with a cli flag: example: if the pane frames are turned off in the config file, then passing in the `--no-pane-frames` flag will toggle the pane frames on
2021-11-10fix(envs): Unify operation of Zellij environment variables (#842)Ken Matsui
2021-11-02feat(ui): add right-click support to pluginsTw
2021-10-29fix(compatibility): home and end key fix (#815)Aram Drevekenin
* fix(compatibility): handle home/end keys properly from terminfo * style(fmt): make rustfmt happy * style(fmt): remove unused import
2021-10-27fix(input): properly handle bracketed paste (#810)Aram Drevekenin
* fix(input): properly handle bracketed paste * style(fmt): make rustfmt happy
2021-10-26Feature: Rotate Pane locations (#802)Kunal Mohan
fix #165
2021-09-30hotfix(stdin): poll for mouse hold in the stdin thread (#752)Aram Drevekenin
* hotfix(stdin): poll for mouse hold in the stdin thread * add missing dont panic * style(fmt): make rustfmt happy
2021-09-27feat(sessions): mirrored sessions (#740)Aram Drevekenin
* feat(sessions): mirrored sessions * fix(tests): input units * style(fmt): make rustfmt happy * fix(tests): make mirrored sessions e2e test more robust * refactor(sessions): remove force attach * style(fmt): rustfmtify * docs(changelog): update change * fix(e2e): retry on all errors
2021-09-22feat(plugin): add manifest to allow for plugin configuration (#660)spacemaison
* feat(plugins-manifest): Add a plugins manifest to allow for more configuration of plugins * refactor(plugins-manifest): Better storage of plugin metadata in wasm_vm * fix(plugins-manifest): Inherit permissions from run configuration * refactor(plugins-manifest): Rename things for more clarity - The Plugins/Plugin structs had "Config" appended to them to clarify that they're metadata about plugins, and not the plugins themselves. - The PluginType::OncePerPane variant was renamed to be just PluginType::Pane, and the documentation clarified to explain what it is. - The "service" nomenclature was completely removed in favor of "headless". * refactor(plugins-manifest): Move security warning into start plugin * refactor(plugins-manifest): Remove hack in favor of standard method * refactor(plugins-manifest): Change display of plugin location The only time that a plugin location is displayed in Zellij is the border of the pane. Having `zellij:strider` display instead of just `strider` was a little annoying, so we're stripping out the scheme information from a locations display. * refactor(plugins-manifest): Add a little more documentation * fix(plugins-manifest): Formatting Co-authored-by: Jesse Tuchsen <not@disclosing>
2021-09-13Add `options` subcommand to `attach` (#718)a-kenji
fixes #688 - the `options` subcommand of `attach` functions the same, as the `options` subcommand of creating the normal session, but not every option will have an effect on reattaching, for example the `default_mode` setting would make no sense to switch. In the future it would make sense to be able to hot swap some of the options on reattach, but we are not able to do that yet, for example the `default_shell` one. Eg: ``` zellij attach <session-name> options --theme <theme> ```
2021-09-09style(clippy): various fixes (#704)Paulo Coelho
* test: fix clippy unused_io_amount * chore(clippy): various clippy fixes needless_borrow, let_and_return, vec_init_then_push, unit_arg, useless_format, field_reassign_with_default, redundant_clone
2021-08-28feat(ui): overhauled resize and layout systemsBrooks Rady
* refactor(panes): move to parametric pane sizes * Fixed the simpler errors by casting to usize * The least I can do is pass the formatting check... * Move to stable toolchain * Well, it compiles? * And now it doesn't! ;) * Baseline functionality with the new Dimension type * Working POC for percent-based resizing * REVERT THIS COMMIT – DELETES TESTS * Perfected the discrete resize algorithm * Fixed fixed-size panes * Basic bidirectional resize * feat(resize): finalised parametric resize algorithm * Reduce the logging level a bit * Fixed nested layouts using percents * Bug squishing for implicit sizing * Here is a funky (read: rubbish) rounding approach * And now it's gone again! * Improve discretisation algorithm to fix rounding errors * Fix the last layout bug (maybe?) * Mixed explicit and implied percents work now * Let's pretend that didn't happen... * Make things a bit less crashy * Crash slightly more for now (to find bugs) * Manaually splitting of panes works now * Start moving to percent-based resizes * Everything but fullscreen seems to be working * Fix compilatation errors * Culled a massive amount of border code * Why not pause to please rustfmt? * Turns out I was still missing a few tests... * Bringing back even more tests! * Fix tests and pane boarders * Fix the resize system without gaps * Fix content offset * Fixed a bug with pane closing * Add a hack to fix setting of the viewport * Fix toggling between shared borders and frames * fix(tests): make e2e properly use PaneGeom * style(fmt): make rustfmt happy * Revert unintentional rounding of borders * Purge some old borderless stuff * Fix busted tab-bar shrinking * Update E2E tests * Finish implementing fullscreen! * Don't crash anymore? * Fix (almost) all tests * Fix a lack of tab-stops * All tests passing * I really can't be bothered to debug a CI issue * Tie up loose ends * Knock out some lingering FIXMEs * Continue to clean things up * Change some naming and address FIXMEs * Cull more code + FIXMEs * Refactor of the resize system + polish * Only draw frames when absolutely necessary * Fix the tab-bar crash * Fix rendering of boarders on reattach * Fix resizing at small pane sizes * Deduplicate code in the layout system * Update tab-bar WASM * Fixed the pinching of panes during resize * Unexpose needlessly public type * Add back a lost test * Re-add tab tests and get them to compile * All tabs need layouts * Start fixing tests + bug in main * Stabilize the resize algorithm rounding * All tests from main are now passing * Cull more dead code
2021-08-26Split tab-layout into `template` & `tabs` sectiona-kenji
* adjust example layouts and move them from `./example` to `./example/layouts` * simplify the deserialization of the layout * layouts are now constructed as follows: ``` --- template: direction: Horizontal parts: - direction: Vertical borderless: true split_size: Fixed: 1 run: plugin: tab-bar - direction: Vertical body: true # <== The body section specifies the position of the # inserted tab - direction: Vertical borderless: true split_size: Fixed: 2 run: plugin: status-bar tabs: - direction: Vertical - direction: Vertical ```
2021-08-24Merge branch 'tab-layout' of https://github.com/a-kenji/zellij into ↵Aram Drevekenin
a-kenji-tab-layout
2021-08-23Merge pull request #622 from sagittarius-a/feature/go-to-last-taba-kenji
feat(tab): add keybind to go to last tab visited
2021-08-21Add `template` section in `layout` filea-kenji
It works as follows: ``` --- template: direction: Horizontal parts: - direction: Vertical split_size: Fixed: 1 run: plugin: tab-bar - direction: Vertical body: true - direction: Vertical split_size: Fixed: 2 run: plugin: status-bar tabs: - direction: Vertical ``` The tabs are created in the body section of the template.
2021-08-20fix(compatibility): properly paste multilines (#653)Aram Drevekenin
* fix(compatibility): properly paste multilines * test(input): fix bracketed paste assertion
2021-08-03fix: rename action to ToggleTabSagittarius-a
2021-08-03feat(tab): add keybind to go to last tab visitedSagittarius-a
Fixes #398. Tab key is used as default for the `GoToLastTab` action.
2021-07-23Merge branch 'main' of https://github.com/zellij-org/zellij into tab-layouta-kenji
2021-07-23Add `tabs` to `layouts`a-kenji
fixes #603, fixes #349 * The layout has now a unique `tabs` section, that can be used, like the `parts` section, everything that is not inside the tabs section is assumed to be present on every single tab that is opened. This is a BREAKING CHANGE for people that use custom `layouts` already, since the `tabs` section is not optional - for clarity and intentionality reasons. The functionality to specify multiple tabs is already there, but is still gated behind a panic, until #621 is fixed. So for now one tab can be specified to load on startup. * The `NewTab` action can optionally be bound to open a layout that is assumed to be in the new `tabs` section This is a BREAKING CHANGE for people that have the `NewTab` action already bound in the config file: ``` - action: [NewTab, ] key: [F: 5,] ``` must now be specified as: ``` - action: [NewTab: ,] key: [F: 5,] ``` Optionally a layout that should be opened on the new tab can be specified: ``` - action: [NewTab: { direction: Vertical, parts: [ {direction: Horizontal, split_size: {Percent: 50}}, {direction: Horizontal, run: {command: {cmd: "htop"}}},], key: [F: 6,] ``` or: ``` - action: [NewTab: {direction: Vertical, run: {command: {cmd: "htop"} }},] key: [F: 7,] ``` or ``` - action: [NewTab: { direction: Vertical, parts: [ {direction: Vertical, split_size: {Percent: 25},run: {plugin: "strider" }}, {direction: Horizontal}],}, MoveFocus: Left,] key: [F: 8,] ```
2021-07-20Merge branch 'main' into unified-loggingqepasa
2021-07-17Minor fixesPaweł Palenica
2021-07-13Apply code review suggestions. Rename decorating_pipe to logging_pipe. Add ↵Paweł Palenica
plugin_id to plugin log. Move logger init from file to in-code initialization and change logging file to zellij directory. Change format of timestamp.
2021-07-09Add on_force_close config optionKunal Mohan
2021-07-06Remove test feature and hacksKunal Mohan
2021-07-02feat(ui): initial mouse support (#448)Thomas Linford
* Initial mouse support * enable mouse support (termion MouseTerminal) * handle scroll up and down events * Allow enabling/disabling of mouse reporting Store the mouse terminal on OsInputOutput * WIP: switch pane focus with mouse * testing to get mouse character selection * wip mouse selection * wip: mouse selection - initial handling of mouse events for text selection within a pane - wide characters currently problematic - selection is not highlighted * highlight currently selected text * improve get currently selected text from TerminalPane * copy selection to clipboard (wayland only for now) * Add missing set_should_render on selection update * Improve text selection - Strip whitespace from end of lines - Insert newlines when selection spans multiple lines * Simplify selection logic - Remove Range struct - Selection is not an Option anymore, it's empty when start == end * copy selection to clipboard with OSC-52 sequence * Improve text selection with multiple panes - Constrain mouse hold and release events to currently active pane - Fix calculation of columns with side by side panes * fix for PositionAndSize changes * Fix mouse selection with full screen pane. - Transform mouse event positions to relative when passing to pane. * Move selection to grid, rework highlighting. - Mark selected lines for update in grid output buffer, for now in the simplest way possible, but can be made more efficient by calculating changed lines only. - Clear selection on pane resize. - Re-add logic to forward mouse hold and release events only to currently active pane. * Tidy up selection - add method to get selection line range - add method to sort the current selection * Grid: move current selection up/down when scrolling - Make the selection work with lines in lines_above and lines_below - Todo: update selection end when scrolling with mouse button being held - Todo: figure out how to move selection when new characters are added. * Grid: move selection when new lines are added * Keep track of selection being active - Handle the selection growing/shrinking when scrolling with mouse button held down but not yet released. * Improve selection end with multiple panes * Tidying up - remove logging statements, unused code * Add some unit tests for selection, move position to zellij-utils * Change Position::new to take i32 for line * Grid: add unit tests for copy from selection * add basic integration test for mouse pane focus * Add basic integration test for mouse scroll * Use color from palette for selection rendering * Improve performance of selection render - Try to minimize lines to update on selection start/update/end * fixes for updated start method * fix lines not in viewport being marked for rendering - the previous optimization to grid selection rendering was always adding the lines at the extremes of previous selection, causing problems when scrolling up or down - make sure to only add lines in viewport * Disable mouse mode on exit * use saturating_sub for usize subtractions * copy selection to clipboard on mouse release * disable mouse on exit after error * remove left-over comments * remove copy keybinding * add default impl for selection methods in Pane - remove the useless methods from Impl Pane in PluginPane * move line diff between selections to selection * add option to disable mouse mode * Allow scrolling with mouse while selecting. * move action repeater to os_input_output, change timeout to 10ms - change repeater to take an action instead of a position with hardcoded action * replace mouse mode integration tests with e2e tests * cleanup * cleanup * check if mouse mode is disabled from merged options * fix missing changes in tests, cleanup
2021-06-30chore(tests): move all integration tests to be either unit or e2e tests - ↵Aram Drevekenin
remove old testing infra (#589) * tests(integration): move basic integration tests to be unit tests * fix(tests): silently fail threadbus for tests * tests(unit): move compatibility tests to become unit tests for grid * tests(unit): move close_pane tests to become unit tests for grid * tests(e2e): move basic layout test to e2e * tests(unit): move move_focus tests to be unit tests * tests(unit): move resize_down tests to be unit tests * tests(unit): move resize_left tests to be unit tests * tests(unit): move resize_right tests to be unit tests * tests(unit): move resize_up tests to be unit tests * tests(infra): remove unused infra * style(fmt): make rustfmt happy * debug * debug * debug * debug * chore(test): shift volume mounting around because github actions is a special child
2021-06-29chore(clippy): needless_borrowa-kenji
2021-06-19docs(changelog): Autodetach #581Kunal Mohan
2021-06-18Sending the action Action::Detach to the serverDante Pippi
2021-06-17Detach session on a forced close (handlign SIGTERM and other signals)Dante Pippi
2021-06-14Move `layout.rs` from `server` to `utils`a-kenji
* give feedback on most errors in the layout-file
2021-05-30Merge branch 'main' of https://github.com/zellij-org/zellij into theme-configa-kenji
2021-05-30Add color theme configa-kenji
* add option `theme` that allows for setting of a theme, the default is `default` * under `themes` the themes can be described as follows: either: ``` themes: default: fg: [0,0,0] bg: [0,0,0] black: [0,0,0] red: [0,0,0] green: [0,0,0] yellow: [0,0,0] blue: [0,0,0] magenta: [0,0,0] cyan: [0,0,0] white: [0,0,0] orange: [0,0,0] ``` or ``` themes: default: fg: 0 bg: 0 black: 0 red: 0 green: 0 yellow: 0 blue: 0 magenta: 0 cyan: 0 white: 0 orange: 0 ``` If the key is different from default, it needs to either be specified on start with `options --theme [THEME]`, or in the configuration file under theme: [THEME]. closes #390
2021-05-29Add default_mode to attacha-kenji
* Attaching a new session now also respects the default_mode setting of the client
2021-05-29Merge pull request #513 from a-kenji/default-mode-368a-kenji
Default mode 368
2021-05-29Fix build on platforms with TIOCGWINSZ / ioctl() integer type mismatch.Thomas Zander
2021-05-28style(clippy): minor fixAram Drevekenin
2021-05-28hotfix: remove termbg call so stdin won't get stuckAram Drevekenin
2021-05-27refactors for #525 (#534)kxt
* refactor(fakes): clean up add_terminal_input * refactor(fakes): append whole buf to output_buffer in FakeStdoutWriter::write * refactor(fakes): append whole buf to output_buffer in FakeInputOutput::write_to_tty_stdin * fix(fakes): allow partial reads in read_from_tty_stdout This patch fixes two bugs in read_from_tty_stdout: * if there was a partial read (ie. `bytes.read_position` is not 0 but less than `bytes.content.len()`), subsequent calls to would fill `buf` starting at index `bytes.read_position` instead of 0, leaving range 0..`bytes.read_position` untouched. * if `buf` was smaller than `bytes.content.len()`, a panic would occur. * refactor(channels): use crossbeam instead of mpsc This patch replaces mpsc with crossbeam channels because crossbeam supports selecting on multiple channels which will be necessary in a subsequent patch. * refactor(threadbus): allow multiple receivers in Bus This patch changes Bus to use multiple receivers. Method `recv` returns data from all of them. This will be used in a subsequent patch for receiving from bounded and unbounded queues at the same time. * refactor(channels): remove SenderType enum This enum has only one variant, so the entire enum can be replaced with the innards of said variant. * refactor(channels): remove Send+Sync trait implementations The implementation of these traits is not necessary, as SenderWithContext is automatically Send and Sync for every T and ErrorContext that's Send and Sync.
2021-05-27fixup! rustfmta-kenji
2021-05-27Merge branch 'main' of https://github.com/zellij-org/zellij into ↵a-kenji
default-mode-368 * If starting in the locked mode after the merge, the locked mode seems to need 2 actions to go to the normal mode - after that everything works as expected. - This is not intended.
2021-05-22Allow user to specify session nameKunal Mohan
2021-05-22join router threads on exitKunal Mohan
2021-05-22Add ability to attach to sessionsKunal Mohan
2021-05-22Use Action enum for Quit and detach instead of separate messages under ↵Kunal Mohan
ClientToServerMsg
2021-05-22Mark current session in the output of list-sessionsKunal Mohan