summaryrefslogtreecommitdiffstats
path: root/zellij-utils
AgeCommit message (Collapse)Author
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-21feat(layout): specify only tab name in `tabs` section (#722)a-kenji
Allow specifying only the tab name in the `tabs` section - For example this is now possible: ``` tabs: - name: first parts: - direction: Vertical - direction: Vertical - name: second - name: third ``` For that the tab section defaults the direction to `direction::Horizontal` - Adds an error upon specifying a tab name inside the `parts` section of the tab-layout
2021-09-19 Implement `attach --create` subcommand flag to create session if one does ↵GPery
not exist (#731) * Implement attach --create * fixup! Implement attach --create * fixup! Implement attach --create * fixup! Implement attach --create * fixup! Implement attach --create
2021-09-15chore(version): bump development versionAram Drevekenin
2021-09-15fix(keys): bring back ctrl-n to get from scroll mode to resize modeAram Drevekenin
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-13Improve handling of empty valid `yaml` files (#716)a-kenji
Improves the way empty valid `yaml` files are handled. When deserializing a `config` or `layout` file, that is an empty valid `yaml` file, eg: ``` --- ``` We now assume the default configuration is desired.
2021-09-13feat(screen): support specifying tab's name in layout (#715)Tw
Signed-off-by: Tw <tw19881113@gmail.com>
2021-09-12Calculate width with unicode-width in tab-bar and utils (#709)Paulo Coelho
* fix(tab-bar): calculate string width using unicode-width * fix(utils): calculate ansi_len using unicode-width
2021-09-10feat(cwd-pane): Keeping the cwd when opening new panes (#691)spacemaison
* feat(cwd-pane): Add a new trait to get the cwd of a given pid Co-authored-by: Quentin Rasmont <qrasmont@gmail.com> * feat(cwd-pane): Allow for setting the cwd when spawning a new terminal Co-authored-by: Quentin Rasmont <qrasmont@gmail.com> * feat(cwd-pane): Add an active_pane field to the Pty struct Co-authored-by: Quentin Rasmont <qrasmont@gmail.com> * feat(cwd-pane): Update Pty with Tab's active pane id Co-authored-by: Quentin Rasmont <qrasmont@gmail.com> * feat(cwd-pane): Refactor spawn_terminal to use cwd by default Co-authored-by: Quentin Rasmont <qrasmont@gmail.com> * feat(cwd-pane): Fix tests and lints Co-authored-by: Quentin Rasmont <qrasmont@gmail.com> * feat(cwd-pane): Fix formatting * feat(cwd-pane): Refactor child pid fetching to handle errors better Instead of panicking when transfering the process id of the forked child command we just return an empty process id. * feat(cwd-pane): Add non Linux/MacOS targets for the get_cwd method. This will allow Zellij to compile on non Linux/MacOS targets without having an inherited cwd. * feat(cwd-pane): Refactor spawn_terminal method to use ChildId struct. The spawn_terminal methods been refactored to use the ChildId struct in order to clarify what the Pid's returned by it are. The documentation for the ChildId struct was improved as well. * feat(cwd-pane): Fix tests/lints Co-authored-by: Jesse Tuchsen <not@disclosing> Co-authored-by: Quentin Rasmont <qrasmont@gmail.com>
2021-09-09feat(plugin): add exec_cmd helper for executing command in hostTw
Signed-off-by: Tw <wei.tan@intel.com> Signed-off-by: Tw <tw19881113@gmail.com>
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-31chore(version): bump development versionAram Drevekenin
2021-08-30fix(ui): change resize binding to Ctrl-nBrooks Rady
* fix(ui): change resize binding to Ctrl-n * Fix tests? * Actually update the keybind in tests * Cowardly refuse to fix the E2E testing issue
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-24test(layout): add borderlessAram Drevekenin
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-12feat(ui): pane frames (new pane UI) (#643)Aram Drevekenin
* work * resize working * move focus working * close pane working * selection and fullscreen working * pane title line * titles and conditional scroll title * whole tab resize working * plugin frames working * plugin splitting working * truncate pane frame titles * cleanup * panes always draw their own borders - also fix gap * toggle pane frames * move toggle to screen and fix some bugs * fix plugin frame toggle * fix terminal window resize * fix scrolling and fullscreen bugs * unit tests passing * e2e tests passing and new test for new frames added * refactor: TerminalPane and PluginPane * refactor: Tab * refactor: moar Tab * refactor: Boundaries * only render and calculate boundaries when there are no pane frames * refactor: Layout * fix(grid): properly resize when coming back from alternative viewport * style: remove commented code * style: fmt * style: fmt * style: fmt + clippy * docs(changelog): update change
2021-08-03fix: rename action to ToggleTabSagittarius-a
2021-08-03fix: fix toggle to previous tab when deleting tabsSagittarius-a
2021-08-03fix: rename variable as stated in pull requestSagittarius-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-08-02Change layout panics to errorsa-kenji
* Adjust and add tests for the change
2021-08-01Merge branch 'main' of https://github.com/zellij-org/zellij into tab-layouta-kenji
2021-07-28Simplify deserialization for layouts, configa-kenji
Simplify deserialzation for layouts, config and config options. Move the logic responsible to `Setup::from_options()` in order to be able to parse `main.rs` as well as adding new command easier.
2021-07-24feat(scroll): Restore scroll position on SIGINTSagittarius-a
Fixes #606 Currently scroll down to bottom then exits scroll mode.
2021-07-23!fixup cargo fmta-kenji
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-22Merge pull request #623 from a-kenji/feature/dump-layouta-kenji
Add cmd to dump `layout` to stdout
2021-07-22Add cmd to dump layout to stdouta-kenji
Adds the ability to dump the default layouts to stdout, similar to the `zellij setup --dump-config`, but now it needs the name of a currently existing layout: - default - strider - disable-status `zellij setup --dump-layout [LAYOUT]`
2021-07-22Merge branch 'main' into display-session-namea-kenji
2021-07-20Merge branch 'main' into unified-loggingqepasa
2021-07-19chore(release): bump development versionBrooks J Rady
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-09Move `ModeInfo::new()` back to `get_mode_info()`Lovecraftian Horror
2021-07-09Merge pull request #612 from a-kenji/improve-optionsa-kenji
Improve options
2021-07-09Merge pull request #600 from a-kenji/layout-commanda-kenji
Add commands to layout
2021-07-09Add commands to layouta-kenji
Add the ability to run commands on loading a layout: ``` - direction: Horizontal split_size: Percent: 50 run: command: {cmd: htop} ``` or respectively: ``` - direction: Horizontal split_size: Percent: 50 run: command: {cmd: htop, args: ["-C"]} ``` In order to specify the difference of commands and plugins now the plugins need to be under the `run` section: ``` - direction: Vertical split_size: Fixed: 2 run: plugin: status-bar ``` This also means that this is a breaking change for people that already have a custom layout. Example layouts: ``` --- direction: Vertical parts: - direction: Horizontal split_size: Percent: 50 parts: - direction: Vertical split_size: Percent: 50 - direction: Vertical split_size: Percent: 50 run: command: {cmd: htop} - direction: Horizontal split_size: Percent: 50 run: command: {cmd: htop} ``` and: ``` --- direction: Horizontal parts: - direction: Vertical split_size: Fixed: 1 run: plugin: tab-bar - direction: Vertical parts: - direction: Vertical parts: - direction: Vertical split_size: Percent: 50 run: command: {cmd: htop} - direction: Vertical split_size: Percent: 50 run: command: {cmd: htop, args: ["-C"]} - direction: Vertical split_size: Fixed: 5 - direction: Vertical split_size: Fixed: 2 run: plugin: status-bar ``` closes #551, closes #284
2021-07-09Add serde-alias for on_force_closea-kenji
* It doesn't deserialize from the configuration otherwise, if specified in lower-case. Alternative: use a rename.
2021-07-09Use lowercase for optionsa-kenji
2021-07-09Simplify merging of optionsa-kenji
2021-07-09Add doc-comment for mouse-modea-kenji
2021-07-09Improve clarity of precedence in optionsa-kenji
2021-07-09Update Cargo.tomlqepasa