summaryrefslogtreecommitdiffstats
path: root/default-plugins
AgeCommit message (Collapse)Author
2023-08-29fix(status-bar): add break tab hints (#2748)Aram Drevekenin
* fix(status-bar): add break tab hints * fix(tests): update snapshot to new hints
2023-08-26fix(plugins): various ui fixes (#2731)Aram Drevekenin
2023-08-25feat(plugins): optionally move plugin to focused tab (#2725)Aram Drevekenin
* feat(plugins): move_to_focused_tab attribute for LaunchOrFocusPlugin * style(fmt): rustfmt
2023-08-24fix(ux): various ui/ux fixes (#2722)Aram Drevekenin
* force plugin render on permission request response * clear warnings * Revert "feat(ui): new status bar mode (#2619)" This reverts commit 27763d26ab83dd9f81c69c75601cbf6075f13790. * adjust status bar help * fix colors in session manager and shortcut in status-bar * adjust keybindings
2023-08-24feat(sessions): add a session manager to switch between sessions, tabs and ↵Aram Drevekenin
panes and create new ones (#2721) * write/read session metadata to disk for all sessions * switch session client side * fix tests * various adjustments * fix full screen focus bug in tiled panes * fix tests * fix permission sorting issue * cleanups * add session manager * fix tests * various cleanups * style(fmt): rustfmt * clear screen before switching sessions * I hate you clippy * truncate controls line to width * version session cache * attempt to fix plugin tests * style(fmt): rustfmt * another attempt to fix the tests in the ci
2023-08-12feat: add plugin permission system (#2624)Jae-Heon Ji
* WIP: add exaple of permission ui * feat: add request permission ui * feat: add caching permission in memory * feat: add permission check * feat: add file caching * fix: changes request * feat(ui): new status bar mode (#2619) * supermode prototype * fix integration tests * fix tests * style(fmt): rustfmt * docs(changelog): status-bar supermode * fix(rendering): occasional glitches while resizing (#2621) * docs(changelog): resize glitches fix * chore(version): bump development version * Fix colored pane frames in mirrored sessions (#2625) * server/panes/tiled: Fix colored frames in mirrored sessions. Colored frames were previously ignored because they were treated like floating panes when rendering tiled panes. * CHANGELOG: Add PR #2625 * server/tab/unit: Fix unit tests for server. * fix(sessions): use custom lists of adjectives and nouns for generating session names (#2122) * Create custom lists of adjectives and nouns for generating session names * move word lists to const slices * add logic to retry name generation * refactor - reuse the name generator - iterator instead of for loop --------- Co-authored-by: Thomas Linford <linford.t@gmail.com> * docs(changelog): generate session names with custom words list * feat(plugins): make plugins configurable (#2646) * work * make every plugin entry point configurable * make integration tests pass * make e2e tests pass * add test for plugin configuration * add test snapshot * add plugin config parsing test * cleanups * style(fmt): rustfmt * style(comment): remove commented code * docs(changelog): configurable plugins * style(fmt): rustfmt * touch up ui * fix: don't save permission data in memory * feat: load cached permission * test: add example test (WIP) * fix: issue event are always denied * test: update snapshot * apply formatting * refactor: update default cache function * test: add more new test * apply formatting * Revert "apply formatting" This reverts commit a4e93703fbfdb6865131daa1c8b90fc5c36ab25e. * apply format * fix: update cache path * apply format * fix: cache path * fix: update log level * test for github workflow * Revert "test for github workflow" This reverts commit 01eff3bc5d1627a4e60bc6dac8ebe5500bc5b56e. * refactor: permission cache * fix(test): permission grant/deny race condition * style(fmt): rustfmt * style(fmt): rustfmt * configure permissions * permission denied test * snapshot * add ui for small plugins * style(fmt): rustfmt * some cleanups --------- Co-authored-by: Aram Drevekenin <aram@poor.dev> Co-authored-by: har7an <99636919+har7an@users.noreply.github.com> Co-authored-by: Kyle Sutherland-Cash <kyle.sutherlandcash@gmail.com> Co-authored-by: Thomas Linford <linford.t@gmail.com> Co-authored-by: Thomas Linford <tlinford@users.noreply.github.com>
2023-08-09feat(plugins): use protocol buffers for serializing across the wasm boundary ↵Aram Drevekenin
(#2686) * work * almost done with command protobuffers * done translating command data structures * mid transferring of every command to protobuff command * transferred plugin_command.rs, now moving on to shim.rs * plugin command working with protobufs * protobuffers in update * protobuf event tests * various TODOs and comments * fix zellij-tile * clean up prost deps * remove version mismatch error * fix panic * some cleanups * clean up event protobuffers * clean up command protobuffers * clean up various protobufs * refactor protobufs * update comments * some transformation fixes * use protobufs for workers * style(fmt): rustfmt * style(fmt): rustfmt * chore(build): add protoc * chore(build): authenticate protoc
2023-08-02feat(ui): break pane to new tab and move panes between tabs (#2664)Aram Drevekenin
* prototype * some tests * break out floating pane * break out plugin panes * add keybind and fix some minor issues * remove cli * move pane to left/right tab * update ui * adjust ui * style(fmt): rustfmt * style(comment): remove commented code * update snapshots
2023-07-25feat(plugins): make plugins configurable (#2646)Aram Drevekenin
* work * make every plugin entry point configurable * make integration tests pass * make e2e tests pass * add test for plugin configuration * add test snapshot * add plugin config parsing test * cleanups * style(fmt): rustfmt * style(comment): remove commented code
2023-07-12feat(ui): new status bar mode (#2619)Aram Drevekenin
* supermode prototype * fix integration tests * fix tests * style(fmt): rustfmt
2023-06-30fix(tab-bar,compact-bar): tab switching with mouse sometimes not working (#2587)Thomas Linford
* tab-bar: fix clicks sometimes not registering Caching the click position wasn't working across multiple plugin instances. Also a couple of refactors: - move the code with the tab switching logic inside update - avoid rendering when calling switch_tab_to, since it will happen anyway afterwards * same fix for compact-bar
2023-06-17feat(plugins): strider improvements (#2551)Aram Drevekenin
* fix(plugins): adjust debounce and smart file ignore in strider * style(comment): remove commented code * style(fmt): rustfmt
2023-06-17refactor(plugins): improve api (#2552)Aram Drevekenin
* refactor(plugins): improve shim API * style(fmt): rustfmt
2023-06-17feat(plugins): more plugin api methods (#2550)Aram Drevekenin
* feat(plugins): close, focus, rename pane, rename tab and show_self api methods * style(fmt): rustfmt
2023-06-12fix(strider): clear search term on ESC (#2531)Aram Drevekenin
2023-06-12fix: improve user experience (#2522)Jae-Heon Ji
2023-06-09feat(plugins): extensive plugin api (#2516)Aram Drevekenin
* feat(plugins): add our entire API * style(fmt): rustfmt * fix(detach): make it work again
2023-06-07feat(wasm-plugin-system): major overhaul and some goodies (#2510)Aram Drevekenin
* strider resiliency * worker channel prototype * finalized ui * show hide plugin * fs events to plugins * tests for events and new screen instructions * various refactoringz * report plugin errors instead of crashing zellij * fix plugin loading with workers * refactor: move watch filesystem * some fixes and refactoring * refactor(panes): combine pane insertion logic * refactor(screen): launch or focus * refactor(pty): consolidate default shell fetching * refactor: various cleanups * initial refactoring * more initial refactoring * refactor(strider): search * style(fmt): rustfmt * style(pty): cleanup * style(clippy): ok clippy * style(fmt): rustfmt
2023-05-16feat(plugins): Plugin workers and strider (#2449)Aram Drevekenin
* mvp of strider fuzzy find * improve search ui * various refactoringz * moar refactoring * even more refactoring * tests and more refactoring * refactor: remove unused stuff * style(fmt): rustfmt * debug ci * debug ci * correct path for plugin system tests * fix plugin system ci tests * remove debugging statements from test * fix plugin worker persistence * add test for plugin worker persistence * style(fmt): rustfmt * final cleanups * remove outdated comments
2023-04-16fix(plugin): respect hide session option on compact-bar (#2368)Pedro Fedricci
2023-03-30Add option to hide session name in tab-bar (deriving from #2172) (#2301)Marcel Baur
* feat(tab-bar): add option to hide prefix (#2172) * feat(tab-bar): only hide session_name * fix(snapshots): update snapshots with new config-var naming --------- Co-authored-by: Marcel Baur <marcel@baur.gg>
2023-02-17feat(ui): swap layouts and stacked panes (#2167)Aram Drevekenin
* 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
2023-02-16feat: add args to new-tab action (#2072)Jae-Heon Ji
* fix(themes): missing tokyo-night-dark theme * feat: add args to new-tab action * fix: name can be set without layout * feat: pass config options to action parser * chore: remove unnecessary default values * chore: update snapshots * fix(status-bar): add exception for NewTab * fix: update code review * feat: add shallow_eq for action
2023-02-16fix(plugins): apply correct color on 'more tabs' message (#2166)Pedro Fedricci
2023-01-27fix(status-bar): not displaying w/ size=1 and show shortcuts (#2091)Felix Pankratz
* Fix status bar not displaying if size=1. Show shortcuts if not in normal mode when size=1 * formatting Co-authored-by: Felix Pankratz <mail@felixpankratz.de>
2022-12-24Floating panes in layouts (#2047)Aram Drevekenin
* work * tests passing * tests: floating panes in layouts * panes(plugins): floating plugins working * refactor(tab): layout applier * style(comment): remove outdated * style(fmt): rustfmt
2022-12-08Reimplement resize code (#1990)har7an
* 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
2022-11-21performance(rendering): improve rendering performance (#1960)Aram Drevekenin
* refactor(plugins): plugins now need to explicitly ask to be rendered * performance(render): remove various needless renders * performance(render): cache boundaries * performance(render): adjust tests and cache cursor location/shape * style(comment): remove outdated * style(fmt): rustfmt
2022-11-17fix(compact-bar): mouse-click in simplified-ui (#1917)imsuck
* fix(compact-bar): mouse-click in simplified-ui * fix(compact-bar): fix formatting
2022-11-15refactor(plugins): change the data flow (#1934)Aram Drevekenin
* refactor(plugins): do not block render loop * refactor(plugins): cleanup * style(fmt): rustfmt * fix(plugins): various rendering pipeline fixes
2022-10-31fix(status-bar): display controls line of status-bar plugin if pane size=1 ↵Mathieu Santostefano
(#1875)
2022-10-17feat(cli): zellij run improvements (#1804)Aram Drevekenin
* 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
2022-10-05feat(config): switch to kdl (#1759)Aram Drevekenin
* 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
2022-09-09fix(tab-bar): mouse-click in simplified-ui (#1658)Paulo Coelho
* fix(tab-bar): fix tab bar click when tabs are collapsed * fix(tab-bar): calculate tab length correctly for any separator * fix(tab-bar): fix clippy
2022-07-27fix(status-bar): reflect actual current keybindings (#1242)har7an
* 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