aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-client/src/input_handler.rs (follow)
Commit message (Collapse)AuthorAge
* Support the Kitty Image Protocol (#5428)Aram Drevekenin2026-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial implementation - kinda working * tests and fixes * fix bounds * tests and compatibility fixes * fix: cursor scroll, clears, deletes, key tolerance, and host id range * fix: keep images alive across resize, relayout and history scroll * anchor to lines, not pixels * fix image/text alignments * config to allow disabling * fix pinned pane issue * never let host graphics replies reach the keyboard parser * fix nested session * properly handle fullscreening a pane * rustfmt * cleanup of ignored test * add pr
* Nested session handling (#5417)Aram Drevekenin2026-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix: theme query and updated pixel dimensions * add no-ui-fullscreen key/action/capability * protocol core * integration test harness * fix integration tests * fix flaky tests * nested ui (dimming) and directional focus initial implementation * integration tests for nested ui dimming and directional focus * initial full screen nesteed implementation * fix: keep hidden floating panes hidden across nested no-ui fullscreen * fix integration tests * no ui fullscreen integration tests * hardening behavior/tests * fix(nested): re-derive descend/dim on host tab switch and new-tab so clicking dimmed chrome ascends * initial modal implementation * initial ui improvements * fix integration tests * improve nested selection ui * nested session modal refactoring and tests * improve integration test speed somewhat * some ui adjustments * simplify full/auto nested session handling * hints in compact-bar * guest stdin leak fix * allow floating panes to be fullscreen * make nested session handling configurable * protocol reannounce * refactor: naming confusion * improve ux somewhat * rustfmt * merge fixes * improve integration test rate limiting (fix ci) * add pr
* Mobile layout (#5241)Aram Drevekenin2026-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * phase 2+3 * initial mobile plugin (phases 4 + 5 + 6) * some bugfixes * implement stage 7 * mobile interface improvements * improve mobile pane/tab picker * more ui improvements and fixes * various mobile fixes * some mobile fixes * mobile keyboard triggering fix * some cleanups * initial plugin keyboard implementation * improve keyboard hit zones * improve keyboard * pinch resize * pinching fixes * implement scrolling + panning * initial keyboard resizing * fix: mobile first render issues * keyboard responsiveness * fix some issues with the keyboard * implement fit * fix mobile scrolling * add tilde cell to compact * improve mobile keyboard * fix starting mobile terminal font to natural keyboard size * fix mobile resize blank screen flash * shadow focus for mobile * more keyboard fixes * improve mobile status bar * fix: render plugins to mobile clients * allow opening new panes/tabs from the mobile plugin * allow configuring * fix dot slash * improve mobile native soft keyboard interaction * switch to native keyboard - initial implementation * dirty hacks, but phone keyboard works now * adjust keyboard help strip * fix cursor in mobile * fix keyboard and help line * rename keyboard to modifier bar * allow starting new session * make clicking session name bring us to new session menu * allow switching to desktop from the mobile ui * mobile welcome screen initial implementation * mobile welcome screen fixes * various welcome screen fixes * more mobile fixes * moar mobile fixes * mobile ui redesign * fix: swallowed backspace bug * switch session screen improvement * touch up some interfaces * refactor: move mobile state to own struct * refactor: move fit resizing to the server * remove dead flash code * some cleanups * refactor: clear fit on close * refactor: improve fit api * refactor: pane sync functions * refactor: mouse * refactor: break into modules * some cleanups for the sessions screen * fix scrolling and other stuff * refactor: sessions screen * refactor: panes screen * refactor: new session screen * refactor: menu screen * refactor: render * cleanups * refactor: plugin structure * remove unused welcome screen path * Rename api * refactor input.js * cleanup useless comments * fit/mobile refactoring * take out the garbage * remove more comments * remove mobile flash on startup/attach * fix: various mobile startup issues * fix space bugs * cleanup * rustfmt * fix windows build * adjust modifier bar ui * add pr
* Support CSI2031 (dark/light theme switching) + remove STDIN cache to avoid ↵Aram Drevekenin2026-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | stale color queries (#5105) * initial phase 1 implementation * various fies * some fixes * fix fragmented stdin cases * some fixes * renaming * guard against old clients * implement csi 2031 * allow toggling theme with actions * rustfmt * fix: finalize trailing characters in ansi parser as well * add pr
* Some idle CPU and disk/io fixes, new CommandChanged plugin Event (#5063)Aram Drevekenin2026-04-17
| | | | | | | | | | | | | | | * initial implementation * fix mouse cpu spam * prevent excess metadata write and prune sessions on startup * consolidate CommandChanged and PaneCommandChanged * tests * rustfmt * add pr
* Support OSC-99 desktop notifications (#4931)Aram Drevekenin2026-03-28
| | | | | | | | | | | | | | | * initial implementation * tests * fix: always report to zellij, only report to app if it wants a report * rustfmt * fix: always report capabilities to panes requesting them * rustfmt * add pr
* Fix partial sequences parsing (#4623)Jonathan Giannuzzi2026-03-06
| | | | | | | | | | | | | | | | | * Vendor termwiz 0.23.3 * Apply fix for parsing partial SGR mouse sequences to termwiz * Add stdin debounce for fragmented input handling Parse with maybe_more=true and send events immediately. Finalization is deferred until 50ms of inactivity, avoiding latency while correctly handling escape sequences split across multiple reads (e.g., over SSH). * Remove unused parts of termwiz --------- Co-authored-by: Aram Drevekenin <aram@poor.dev>
* [Windows port PR8] feature: add Windows support (#4768)divens2026-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: add Windows signal and process implementations - AsyncSignalListener: polls crossterm size at 100ms, tokio ctrl_c/break/close - BlockingSignalIterator: SetConsoleCtrlHandler + AtomicBool, polls size at 50ms - signal_process: GenerateConsoleCtrlEvent for Interrupt, TerminateProcess for Kill - Add windows-sys workspace dependency * feat: add Windows IPC support with named pipes and marker files - ipc_connect/ipc_bind/ipc_bind_async helpers with cfg gates for named pipes - Dual-pipe architecture on Windows: main pipe + reply pipe per connection to prevent IPC deadlock (half-duplex named pipe limitation) - is_ipc_socket returns is_file() on non-Unix for marker file discovery - ipc_bind creates empty marker file after binding named pipe on Windows - assert_socket split: cfg(unix) probes with ConnStatus, cfg(not(unix)) returns true to avoid deadlocking the server accept loop - Replace tokio UnixListener/UnixStream with interprocess tokio Listener/Stream in web server IPC for cross-platform support - Add interprocess tokio feature to workspace deps * feat: add Windows client support for input, server spawn, and stack size - Two-mode Windows input: crossterm event reader for native console, termwiz byte parser for terminal emulators (VT input mode) - cast_crossterm_key: convert crossterm KeyEvent to KeyWithModifier - ENABLE_VIRTUAL_TERMINAL_INPUT on Windows stdin for raw VT byte reading - Skip ANSI terminal query on Windows to unblock startup - spawn_server: CREATE_NO_WINDOW | CREATE_NEW_PROCESS_GROUP on Windows - 8MB stack trampoline in main() for Windows (default 1MB overflows) - 8MB stack for server worker threads (WASM compilation needs it) - Enable crossterm events and bracketed-paste features * test: make tests cross-platform for Windows - Socket tests: cross-platform IpcGuard/IpcName helpers with GenericNamespaced on Windows vs GenericFilePath/TempDir on Unix - Layout tests: normalize_layout_debug() replaces backslash separators in Debug output on Windows; gate env_var_expansion test with cfg(unix) - Setup tests: use PathBuf::join + display() instead of hardcoded / separators - Server OS tests: cross-platform command helpers (long_running_cmd, echo_cmd, stdin_reader_cmd) with CREATE_NO_WINDOW on Windows - zellij_exports: replace GenericFilePath with ipc_connect() helper * ci: add Windows build and test jobs with debug logging - Add build-windows job: cargo check --no-default-features on windows-latest - Add test-windows job: cargo test --no-default-features for utils/server/client - Enable manual workflow_dispatch trigger - Add debug log::info! calls in server startup, plugin loading, PTY spawning, and screen layout application for troubleshooting * feat: implement Windows stubs for shell, command hooks, and process listing Replace unimplemented!() stubs with working Windows implementations: - get_default_shell: reads $COMSPEC, falls back to cmd.exe - run_command_hook: uses cmd /C with RESURRECT_COMMAND env var - get_all_cmds_by_ppid: uses sysinfo to enumerate processes by parent PID * feat: implement Windows daemonize_web_server with detached process spawning Replace the `unimplemented!()` stub with a proper background process spawner that mirrors the existing `spawn_server` pattern: launch a foreground `zellij web --start` child with CREATE_NO_WINDOW | CREATE_NEW_PROCESS_GROUP, poll the TCP port to confirm it's listening, then exit the parent process. * feat: implement native ConPTY backend for Windows PTY Replace all WindowsPtyBackend stubs with a full ConPTY implementation: - CreatePseudoConsole with overlapped named pipes for IOCP-based async I/O (zero extra threads on the read path per pane) - CreateProcessW with PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE and proper UTF-16 command line quoting / environment block construction - ConPtyAsyncReader with lazy promotion from OwnedHandle to tokio NamedPipeServer (reactor not available at spawn time) - Per-terminal exit monitoring thread using WaitForSingleObject - ResizePseudoConsole for terminal resize, WriteFile for stdin, TerminateProcess / GenerateConsoleCtrlEvent for signals Note: for PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE, the HPCON value must be passed directly as lpValue (not a pointer to it), matching the C convention where HPCON is void*. In Rust (windows-sys) HPCON is isize, requiring an explicit cast. See microsoft/terminal#6705. * chore: remove debug logging from ConPTY backend * fix: resolve Windows plugin directory and WASI mount errors Two Windows-specific fixes for the plugin system: 1. Replace colons with underscores in URL-derived plugin directory names (e.g. "zellij:tab-bar" -> "zellij_tab-bar"). Colons are illegal in Windows path components, causing OS error 123 on plugin dir creation. 2. Use FILE_FLAG_BACKUP_SEMANTICS when opening directories for WASI pre-opened mounts. Windows requires this flag to open directory handles, otherwise File::open() returns OS error 5 (access denied). Both fixes are behind #[cfg(windows)] — Unix behavior is unchanged. * fix: enable mouse support on Windows native console path Mouse events were silently dropped in the crossterm event loop, and enable_mouse() wrote VT escape sequences that don't set the required ENABLE_MOUSE_INPUT console mode flag. Add from_crossterm_mouse() converter, InputInstruction::MouseEvent variant, and use crossterm's EnableMouseCapture/DisableMouseCapture on Windows. * fix: Windows get_default_shell() now checks $SHELL before $COMSPEC * fix: resolve bare command names via PATH and PATHEXT on Windows CreateProcessW doesn't reliably resolve bare command names (e.g. "pwsh") through PATH the way Unix execvp does. Additionally, the existing command_exists() check didn't consider Windows PATHEXT extensions (.exe, .cmd, .bat, etc.). Add find_executable() and resolve_command() which search PATH with PATHEXT support on Windows, and use the resolved absolute path when spawning via CreateProcessW. * chore: run cargo fmt --all * fix: canonicalize expected paths in setup tests for Windows \\?\ prefix * fix: Windows CI test failures in spawn_and_read_output and snapshot test Use cmd /K instead of /C in spawn test so ConPTY has time to flush output before the pipe closes. Normalize backslashes in snapshot test to handle Windows path separators. * fix: strip redundant Shift and AltGr modifiers from Windows key events On the Windows native console path, crossterm reports physical modifier flags alongside the already-translated character. For example on French AZERTY, Shift+ù produces Char('%') with SHIFT, and AltGr+_ produces Char('\') with CTRL+ALT. These extra modifiers cause keybinding mismatches and prevent modified characters from being typed in plugin text inputs. Strip Shift for all Char events and Ctrl+Alt (AltGr) when the character is printable, matching Unix terminal behavior where only the resulting character is reported. Also fix raw byte synthesis for AltGr characters to emit plain UTF-8 instead of ESC-prefixed sequences. * fix: detect and clean up stale Windows sessions via PID-based liveness check Write server PID to marker files instead of creating empty files. assert_socket() on Windows now reads the PID and checks process liveness via OpenProcess, cleaning up stale marker files for dead sessions. * fix: connect reply pipe on Windows for kill-session and delete-session On Windows the server blocks on reply_listener.accept() after accepting the main pipe connection. Without a reply pipe connection, the route thread is never spawned and the KillSession message is never processed. * fix: wait for server Exit response in kill/delete session on Windows The previous fire-and-forget approach was unreliable: the client would disconnect before the server's route thread had time to read and process the KillSession message. Now we wait for the Exit response on the reply pipe, ensuring the server has fully processed the kill before we return. * fix: resolve Windows console mode race between VT input and mouse setup Two threads race over SetConsoleMode on the stdin console handle: - stdin_handler calls enable_vt_input() (read-modify-write) - input_handler calls enable_mouse() via crossterm's EnableMouseCapture (full SetConsoleMode overwrite to 0x0098) Depending on ordering, crossterm could clobber ENABLE_VIRTUAL_TERMINAL_INPUT (breaking the VT byte reader), or enable_vt_input could preserve ENABLE_QUICK_EDIT_MODE (intercepting mouse events at the console level). Fix enable_vt_input() to explicitly set the exact console mode needed (0x0298) instead of read-modify-write, clearing QUICK_EDIT_MODE and other line-editing flags. Fix enable_mouse()/disable_mouse() on the VT path (TERM is set) to use ANSI escape sequences instead of crossterm's Console API, avoiding the competing SetConsoleMode call entirely. Enable ENABLE_VIRTUAL_TERMINAL_PROCESSING on stdout first so ConPTY forwards the DEC private mode sequences to the terminal emulator. * fix: session-manager plugin kill session on Windows dual-pipe IPC The plugin's kill_sessions() only connected the main pipe and sent KillSession, but on Windows the server blocks on reply_listener.accept() before spawning the route thread. Without connecting the reply pipe the message was never processed. Add the same dual-pipe handling as the CLI kill_session(): connect the reply pipe first, send the message, then wait for the Exit response. * fix(windows): replace resize polling with event forwarding from stdin thread Forward crossterm Event::Resize from the stdin thread to the signal handler thread via an mpsc channel, replacing the 50ms polling loop. This makes terminal resizing much more responsive during mouse-driven resizes and eliminates wasteful polling when idle. When the VT reader path is active (terminal emulators with TERM set), the sender is dropped, causing the signal handler to automatically fall back to size-polling — preserving existing behavior for that path. Unix is unaffected: handle_signals receives None for the receiver and BlockingSignalIterator continues using signal_hook as before. * fix(windows): enable ANSI terminal queries on the VT reader path The startup ANSI query mechanism (pixel dimensions, colors, sync output) was blanket-skipped on Windows. The actual limitation is specific to the native console path, where crossterm's event::read() uses ReadConsoleInput (INPUT_RECORDs) and never reaches the byte-reader loop that parses ANSI responses. On the VT reader path (terminal emulators like Alacritty with TERM set), fill_buf() reads raw VT bytes via ReadFile — same as Unix — so ANSI query responses work normally. Move the use_vt_reader decision earlier and use it to gate the query, enabling it for the VT reader path while still skipping it on native console. * fix: handle early TerminalResize before client is fully registered On Windows, enable_mouse()'s SetConsoleMode call can generate a WINDOW_BUFFER_SIZE_EVENT that arrives as a resize before the server finishes processing the initial client connection. At that point set_client_data() hasn't been called yet, so set_client_size() silently no-ops on the None entry and min_client_terminal_size() returns None. Instead of panicking, skip the resize when the minimum size can't be determined — the server will query the terminal size once setup completes. * fix: remove unnecessary custom stack size Early versions of zelilj windows port crashed with stack overflow. Increasing stack size allowed proper startup and moving further with the porting effort. Current implementation no longer suffers from stack issues, so we can revert back to default stack size. * fix(windows): re-enable Ctrl+C handling inherited by ConPTY children The server is spawned with CREATE_NEW_PROCESS_GROUP, which disables Ctrl+C for the process. Children inherit this disabled state, so ConPTY child processes (shells, ping, etc.) silently ignore CTRL_C_EVENT signals generated by the pseudo-console. Call SetConsoleCtrlHandler(NULL, FALSE) early in start_server() to clear the inherited ignore flag before any ConPTY children are created. * refactor(windows): move inline cfg(windows) blocks to platform files Break out inline #[cfg(windows)] blocks from shared client code into the existing _unix.rs / _windows.rs platform files, per upstream feedback. - Split spawn_server into two #[cfg]-gated function definitions - Extract setup_ipc, enable_mouse_support, disable_mouse_support into os_input_output_unix.rs and os_input_output_windows.rs - Unify BlockingSignalIterator::new() signature across platforms - Extract native console stdin loop into stdin_handler_windows.rs * fix: remove sporadic info log statements * ci(windows): add Windows x64 release builds and upgrade CI - Add Windows x64 target to release.yml for both normal and no-web release matrices, with NASM, static CRT, .zip packaging, and PowerShell checksum steps - Upgrade build-windows in rust.yml from cargo check to cargo xtask build, add wasm32-wasip1 target and NASM - Add build_release() function and platform-aware e2e_build() to xtask/src/ci.rs - Add BuildRelease command definition to xtask/src/flags.rs * refactor(client): make resize channel unconditional across platforms Create the resize mpsc channel on all platforms instead of gating it behind #[cfg(windows)], avoiding conditionally-existing variables that are hard to follow. On Unix the sender is immediately dropped and the receiver is passed as None-equivalent to handle_signals. * refactor(windows): restructure signal iterator with if/else for channel vs poll Consolidate the quit check at the top of a single loop and use if/else for channel mode (native console) vs poll mode (VT reader). On channel disconnect, set resize_receiver to None and continue into the else branch instead of falling through. * docs(server): clarify comment about early resize before client init Explain why min_client_terminal_size() can return None even after set_client_size(): new_client() inserts None, and set_client_size() is a no-op on None entries since it uses as_mut().map(). * feat(web): add --server-startup-timeout flag for web server Make the hardcoded 10-second TCP-poll timeout in the non-Unix daemonize_web_server configurable via a CLI flag, defaulting to 10s. * fix(windows): use unique pipe names for ConPTY output on re-spawn When a held pane re-runs a command or drops to shell, do_spawn tried to create a named pipe with the same name as the previous spawn. The old ConPtyAsyncReader still held the read handle, so CreateNamedPipeW failed (FILE_FLAG_FIRST_PIPE_INSTANCE, max instances = 1) and the error was silently swallowed, leaving the pane blank. Add a monotonic AtomicU64 counter to the pipe name so each spawn gets a globally unique pipe, regardless of whether the previous one has been cleaned up yet. * ci(windows): enable static CRT for regular Windows release build The no-web Windows build already had RUSTFLAGS="-C target-feature=+crt-static" but the regular build was missing it, resulting in a dynamic CRT dependency. * docs(web): clarify --server-startup-timeout is Windows-only --------- Co-authored-by: divens <divens.dev@gmail.com>
* Improve CLI interface (add detach, switch session, blocking zellij run and ↵Aram Drevekenin2025-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | more) (#4492) * initial implementation * fix tests * move more ations * screen adjustments (does not compile) * plugin/pty adjustments (does not compile) * more progress, tests not compiling * fix tests * more progress, does not compile * more progress, compiles, tests failing * tests passing * rely on Drop for NotificationEnd * atomicify some more actions * fmt * move unblock input to route * don't pass hard-coded action names * refactor: consolidate completion channel logic * comment * track last active client * track cli clients explicitly * use the last active client for cli commands when possible * fix focus-next-pane for multiple clients * various fixes for multi-client actions from the cli * add detach action * fix tests * add switch session cli action * fix switch session deadlock * add and layout to switch-session cli action * blocking zellij run: add NewBlockingPane variant * blocking zellij run: wait forever mechanism * blocking zellij run: thread NotificationEnd as needed until TerminalPane (tests not compiling) * blocking zellij run: update cli * blocking zellij run: add command * blocking zellij run: finish implementation * fix tests * e2e test and close_on_exit fixes * fmt * fix e2e tests * fix plugin tests
* fix(ipc): make sessions compatible between versions (#4439)Aram Drevekenin2025-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * translate ipc tuple enum variants to struct enum variants * initial client/server contract * tests and missing types * migrate web server and remove rmp_serde * change socket folder * fix crash on unknown messages * fix client logout on unknown message * fix web client logout on unknown message * rustfmt * add comment and change log level * address compilation warnings * style(fmt): rustfmt * fix plugin system test assertions * add pr
* fix(ux): allow pasting and inputing wide-chars in search + tab rename + pane ↵Aram Drevekenin2025-07-18
| | | | | | | | | | | rename (#4303) * fix(ux): allow pasting to search/tab-rename/pane-rename * fix(ux): allow setting wide chars (eg. emoji) in tab/pane names * style(fmt): rustfmt * docs(changelog): add PR
* Feature: web-client/server to share your sessions in the browser (#4242)Aram Drevekenin2025-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * work * moar work * notes * work * separate to terminal and control channels * stdin working * serve html web client initial * serve static assets loaded with include_dir * merge * enable_web_server config parameter * compile time flag to disable web server capability * rustfmt * add license to all xterm.js assets * mouse working except copy/paste * helpful comment * web client improvements - move script to js file - add favicon - add nerd font - change title TODO: investigate if font license embedded in otf is sufficient * get mouse to work properly * kitty keyboard support initial * fix wrong type in preload link * wip axum websocket handlers - upgrade axum to v0.8.1, enable ws feature - begin setup of websocket handlers - tidy up imports * replace control listener * handle terminal websocket with axum * cleanup Cargo.toml * kitty fixes and bracketed paste * fix(mouse): pane not found crash * initial session switching infra * add `web_client_font` option * session switching, creation and resurrection working through the session manager * move session module to zellij-utils and share logic with web-client * some cleanups * require restart for enable-web-server * use session name from router * write config to disk and watch for config changes * rename session name to ipc path * add basic panic handler, make render_to_client exit on channel close * use while let instead of loop * handle websocket close * add mouse motions * make clipboard work * add weblink handling and webgl rendering * add todo * fix: use session name instead of patch on session switch * use "default" layout for new sessions * ui indication for session being shared * share this session ui * plugin assets * Fix process crash on mac with notify watcher. Use poll watcher instead of recommended as a workaround. * make url session switching and creation work * start welcome screen on root url * scaffold control messages, set font from config * set dimensions on session start * bring back session name from url * send bytes on terminal websocket instead of json - create web client os input and id before websocket connection * draft ui * work * refactor ui * remove otf font, remove margins to avoid scrollbar * version query endpoint for server status * web session info query endpoint * refactor: move stuff around * add web client info to session metadata * make tests pass * populate real data in session list * remove unnecessary endpoint * add web_client node to config, add font option * remove web_client_font * allow disabling the web session through the config - WIP * formalize sharing/not-sharing configuration * fix tests * allow shutting down web server * display error when web clients are forbidden to attach * only show sessions that allow web clients if this is a web client * style(fmt): rustfmt * fix: query web server from Zellij rather than from each plugin * remove log spam * handle some error paths better in the web client * allow controlling the web server through the cli * allow configuring the web server's ip/port * fix tests and format code * use direct WebServerStatus event instead of piggy-backing on SessionInfo * plugin revamp initial * make plugin responsive * adjust plugin title * refactor: share plugin * refactor: share plugin * add cors middleware * some fixes for running without a compiled web server capability * display error when starting the share plugin without web server support * clarify config * add pipelines to compile zellij without web support * display error when unable to start web server * only query web server when share plugin is running * refactor(web-client): connection table * give zellij_server_listener access to the control channel * fixes and clarifications * refactor: consolidate generate_unique_session_name * give proper error when trying to attach to a forbidden session * change browser URL when switching sessions * add keyboard shortcut * enforce https when bound to non-loopback ip * initial authentication token implementation * background color from theme * initial web client theme config * basic token generation ui * refactor set config message creation * also set body background * allow editing scrollback for plugins too * set scrollback to 0 * properly parse colors in config * generate token from plugin * nice login modals * initial token management screen * implement token authentication * refactor(share): token management screen * style(fmt): rustfmt * fix(plugin): some minor bugs * refactor(share): main screen * refactor(share): token screen * refactor(share): main * refactor(share): ui components * fix(responsiveness): properly send usage_width to the render function * fix cli commands and add some verbosity * add support for settings ansi and selection colors * add cursor and cursor accent * basic web client tests * fix tests * refactor: web client * use session tokens for authentication * improve modals * move shutdown to ipc * refactor: ipc logic * serialize theme config for web client * update tests * refactor: move some stuff around to prepare for config hot reload * config live reloading for the web clients * change remember-me UI wording * improve xterm.js link handling * make sure terminal is focused on mousemove * remove deprecated sharing indication from compact-bar * gate deps and functionality behind the web_server_compatibility feature * feat(build): add --no-web flag in all the places * fix some other build flows * add new assets * update CI for no-web (untested) * make more dependencies optional * update axum-extra * add web client configuration options * gracefully close connections on server exit * tests for graceful connection closing * handle client-side reconnect when server is down * fix: make sure ipc bus folder exists before starting * add commands to manage login tokens from the cli * style(fmt): rustfmt * some cleanups * fix(ux): allow alt-right-click on the web client without opening the context menu * fix: prevent attaching to welcome screen * fix: reload config issues * fix long socket path on macos * normalize config conversion and fix color gap in browser * revoke session_token cookie if it is not valid * fix: visual bug with multiple clients in extremely small screen sizes * fix: only include rusqlite for the web server capability builds * update e2e snapshots * refactor(web): client side js * some cleanups * moar cleanups * fix(tests): wait for server instead of using a fixed timeout * debug CI * fix(tests): use spawn_blocking for running the test web server * fix(tests): wait for http rather than tcp port * fix(tests): properly pass config path - hopefully this is the issue... * success! bring back the rest of the tests * attempt to fix the macos CI issue * docs(changelog): add PR --------- Co-authored-by: Thomas Linford <linford.t@gmail.com>
* build: Don't re-export foreign crates in utils (#4087)har7an2025-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build(utils): Don't use reexported dependency for internal code, but use the dependency directly. * build(client): Don't use re-exports from `utils` but turn `zellij-utils` dependencies into shared workspace dependencies instead and specify those in `Cargo.toml` explicitly. This gives a much better overview of what component in zellij uses which crates. The previous approach hides a lot of this information since it looks like crates are used in a single place where this isn't actually true. * deps(tile): Don't use re-exports from zellij-utils. * build(zellij): Don't use re-exports from zellij-utils. * build(server): Don't use re-exports from zellij-utils. * build(utils): Don't re-export foreign crates. * docs: Update Changelog with PR #4087. * style: Apply rustfmt. * style: Apply rustfmt. * build(e2e): Don't use re-export from zellij-utils. * test: Restore e2e tests. * style: Apply more formatting.
* feat(terminal): mouse AnyEvent tracking (1003)Autumn2025-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Switch to multi-valued mouse buttons and stub for remembering old mouse button state * Stubs for passing all mouse events from user-facing terminal to server side terminal(s) in, including protobuf. Removed "held" mouse actions. Currently commented out calls to left/middle/right-click/release -- need to fix this though, as selection/copy-paste are broken too. cargo build/test/run works OK. cargo xtask build/test/run fails, unable to find crate input::mouse. * 'cargo xtask build' working using refactored functions. * fix(plugins): various cwd fixes (#3545) * fix(plugins): various cwd fixes * fix tests * docs(changelog): floating_panes cwd fix * feat(plugins): rerun_command_pane API (#3546) * feat(plugins): rerun_command_pane API * fix tests * docs(changelog): rerun command pane plugin API * feat(plugins): command pane re-run event (#3553) * docs(changelog): CommandPaneReRun plugin event * feat(ux): first run setup-wizard (#3556) * separate saved/runtime structure, kind of working * serializing config * work * work * save config through the configuration screen * work * startup wizard * style(code): cleanups * fix(session): reload config from disk when switching sessions * style(fmt): rustfmt * fix(config): propagate cli config options to screen * style(fmt): rustfmt * docs(changelog): first run setup wizard * feat(ux): reload config at runtime (#3558) * feat(ux): reload config at runtime * style(fmt): rustfmt * docs(changelog): reload config at runtime * feat(ux): change themes at runtime (#3559) * docs(changelog): change themes at runtime * feat(plugins): API to temporarily bind keys to send a message to a specific plugin id (#3561) * docs(changelog): message to specific plugins API * feat(ux): reload config options at runtime (#3564) * change simplified_ui at runtime * change default_shell at runtime * change pane_frames (from config) at runtime * all other options * some refactoring * style(fmt): rustfmt * docs(changelog): reload config options at runtime * feat(plugins): add plugin APIs to affect other panes (#3576) * resize_pane_with_id and close_pane_with_id * focus_pane_with_id and edit_scrollback_for_pane_with_id * write_to_pane_id and write_chars_to_pane_id * lots more commands * style(fmt): rustfmt * docs(changelog): new plugin apis * docs(readme): update sponsors * feat(plugins): APIs to break multiple panes into a new tab or an existing tab (#3610) * feat(plugins): break multiple panes to a new tab * fix(layouts): properly ignore run instructions when breaking panes * feat(plugins): break multiple panes to existing tab * feat(apis): allow these methods to also specify whether they want focus changed to the tab * various fixes * allow specifying name for the new tab when breaking out panes * style(fmt): rustfmt * docs(changelog): break multiple panes APIs * feat(config): allow loading background plugins on startup (#3616) * remove old partial implementation * feat(plugins): allow loading background plugins on startup * add e2e test * update config * udpate config merging * style(fmt): rustfmt * docs(changelog): background plugins * feat(ui): built-in plugin manager (#3633) * add plugin list to session info * feat(plugins): new_plugin and reload_plugin API commands * feat(plugins): built-in plugin manager * style(fmt): rustfmt * update plugins * docs(changelog): plugin-manager * fix(resurrection): various serialization issues (#3636) * fix(serialization): use kdl-rs for serialization * style(fmt): remove dead code * tests(serialization): update snapshots * style(fmt): rustfmt * docs(changelog): resurrection fixes * fix(http): web requests (#3643) * docs(changelog): http fix * feat(cli): make --layout idempotent(-ish) (#3650) * feat(cli): if inside a session, apply --layout to the session * fix(screen): some focusing races when switching tab focus * style(fmt): rustfmt * docs(changelog): improve --layout flag * fix(plugins): handle race when setting plugin selectable (#3651) * docs(changelog): plugin selectable race * feat(cli): show CACHE_DIR in `zellij setup --check` (#3652) * docs(changelog): add cache dir to setup * fix(ui): various pane name fixes (#3653) * docs(changelog): pane name fixes * fix(ux): only damage the relevant swap layout layer when resizing panes (#3654) * docs(changelog): swap layout damage fix * fix(ui): set background color for UI components according to theme (#3658) * docs(changelog): ui component fix * fix(tab): recover from crash when resizing panes (#3659) * chore(git): Add plugin’s issue templates (#3621) Co-authored-by: Zykino <3809938+Zykino@users.noreply.github.com> * fix(ux): make sure esc works as expected in unlock-first (#3660) * fix(ux): make sure esc always drops us back to base mode * fix(ux): add locked * fix(plugins): handle concurrent http downloads (#3664) * docs(changelog): concurrent http plugin downloads * fix(plugins): various plugin api and other fixes (#3665) * fix(plugins): do not allow focusing an unselectable pane * fix(folders): make sure config and cache folders exist on app start * docs(changelog): plugin fixes * fix(plugins): force use curl system lib on macOS (#3668) * docs(changelog): fix http requests for macos * fix(resurrection): plugin alias resurrection (#3673) * fix(resurrection): make sure plugin aliases are serialized properly * style(fmt): rustfmt * docs(changelog): resurrection alias fix * fix(plugins): do not allow attaching to the same session (#3674) * docs(changelog): fix plugins attaching to same session * fix(plugins): allow switching to a new session with cwd without specifying a layout (#3676) * docs(changelog): switch_session_with_cwd plugin api * fix(config): watch/update config given with --config when appropriate (#3678) * docs(changelog): reload config flag fix * feat(plugins): rebind keys api (#3680) * feat(plugins): add API to explicitly unbind/rebind specific keys in specific modes * style(fmt): rustfmt * docs(changelog): rebind keys plugin api * fix(client): repeat retry screen instruction (#3570) * docs(changelog): sixel fix * feat(ui): rebind keys UI (#3686) * rebind action working * functional ui * responsive ui * some refactoring * properly reset ui state * minor fixes * style(fmt): rustfmt * style(fmt): remove dead code * chore(deps): update to Wasmtime 21.0.2 (#3685) This fixes a race condition which causes occasional crashes and may enable a sandbox escape: <https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-7qmx-3fpx-r45m> * docs(changelog): wasmtime patch upgrade * feat(plugins): add API to list clients, their focused panes and running commands/plugins (#3687) * fix(list-clients): properly show client info after a tab was closed * feat(plugins): add API to list clients, their focused panes and running commands/plugins * style(fmt): rustfmt * docs(changelog): list-clients plugin api * docs(changelog): rebind keys UI * feat(ui): bring back fullscreen indication (#3688) * feat(ui): bring back fullscreen indication * fix e2e tests * docs(changelog): bring back fullscreen indication * fix(ux): new interface/configuration touch-ups (#3691) * fix(ui): copy to clipboard in new ui * fix(ux): allow navigating out of scrolled pane * style(fmt): rustfmt * docs(changelog): ui touch-ups * fix(plugins): rebind insert (#3692) * fix(tab): recover from closing a pane outside the viewport * remap insert in plugin manager * fix(plugins): remap insert key * style(fmt): rustfmt * docs(changelog): insert rebind * fix(plugins): make sure to always render on first resize (#3693) * fix(plugins): make sure to always render on first resize * style(fmt): rustfmt * fix tests * docs(changelog): plugins first-render fix * fix(terminal): recover from partial line drop (#3695) * docs(changelog): grid fix * fix(configuration): leave notification up when base mode changes (#3696) * fix(layouts): suspend commands in remote layouts (#3697) * fix(layouts): suspend commands in remote layouts * style(fmt): rustfmt * docs(changelog): suspend commands in remote layouts * feat(plugins): add configurable black background for ui components (#3681) * feat(plugins): add transparent background for text and nested_list * chore: fix formatting issue * feat: invert flag behaviour * feat: implement bg_black handling for table cells * fix: order of selected and bg_black in protocol * chore: rename from bg_black to opaque * fix: explicit selected, if opaque and selected for text * chore: fix formatting issues * feat: opaque tab-bar * feat: opaque session-manager bars * feat: opaque ribbon in plugin manager * feat: opaque one-line ui * feat: opaque tab-bar in configuration plugin * style(fmt): various cleanups (#3698) * fix(configuration): rounding error in ui * style(fmt): remove warnings * style(fmt): rustfmt * docs(changelog): ui components bg fix * feat(theme): add theme ao (#3478) * feat(themes): add atelier sulphurpool theme (#3596) * feat(themes): added ayu mirage, light, and dark themes (#3567) Co-authored-by: Evan Lauer <evanlauer@u.boisestate.edu> * feat(themes): add Vesper theme (#3443) * feat(themes): add night-owl theme (#3393) Co-authored-by: Bruno Mesquita <bmesquita@atlassian.com> * feat: add iceberg dark/light themes (#3323) * theme: add onedark theme to the available themes (#3313) Onedark is a popular theme from Atom text editor. I've used these sources as the reference for implementing the theme in zellij. https://github.com/joshdick/onedark.vim https://www.figma.com/community/file/1137445418485757476/atom-one-dark-color-palette * feat(themes): add basic ANSI theme (#3308) * fix(theme): fix for gruvbox light and dark (#3255) the previous themes do not have the correct colors and aren't great for the eyes. when selecting e.g. to copy text, it uses red for light theme and the same bg for dark theme. the previous light theme is not even a light theme so I also fixed that as well. Signed-off-by: Soc Virnyl Estela <contact@uncomfyhalomacro.pl> * feat(themes): create lucario.kdl (#3030) * docs(changelog): new themes * style(fmt): remove warnings (#3701) * fix: (tabs) move to next tab if moving to next pane from fullscreen pane (#3498) Co-authored-by: Vasilis Manolopoulos <vmanolop@gmail.comh> * docs(changelog): MoveFocusOrTab fullscreen awareness * docs(readme): add https to curl download * fix(ux): configuration fixes (#3713) * fix(startup): try create config folder if it doesn't exist * fix(configuration): tab bar ui * fix(configuration): rebind ctrl-s to ctrl-a * fix(configuration): remove extra rebinding leaders screen * docs(changelog): configuration fixes * fix(ux): forward keys to pane in locked mode and base mode rather than hard-coded normal mode (#3715) * fix(keybindings): only forward clear keys in locked mode and default mode * style(fmt): rustfmt * docs(changelog): base mode keybindings fix * chore(release): v0.41.0 * HOTFIX: default plugins generic compilation issue * HOTFIX: patch version * chore(release): v0.41.1 * chore(repo): bump development version * fix(input): remove support for extra modifiers (#3725) * docs(changelog): kitty input fix * fix(input): refix ctrl-j (#3746) * fix(input): refix ctrl-j * fix e2e tests * docs(changelog): refix ctrl-j * fix(plugins): cwd and usability fixes (#3749) * fix(plugins): maintain cwd between plugin reloads * fix(plugin-manager): default to loading plugins in the foreground and allow sending space in configuration * docs(changelog): plugin fixes * fix(output-buffer): truncate grid height when not rendering it fully (#3750) * fix(output-buffer): truncate grid height when not rendering it fully * also fix for cases where the changed lines are not contiguous * docs(changelog): output-buffer fix * fix(tabs): maintain event order for MoveTab (#3758) * fix(tabs): maintain event order for MoveTab * style(fmt): rustfmt * docs(changelog): event ordering fix * fix(plugins): do not open extra instances of aliases (#3759) * docs(changelog): do not duplicate built-in plugins * fix(terminal): reset kitty keyboard support when resetting terminal state (#3760) * docs(changelog): kitty reset fix * fix(config): crash if unable to watch config folder (#3761) * docs(changelog): config dir crash fix * fix(statup): slow startup on some occasions (#3767) * add debug logs * add log messages * some more logs and possible fix? * remove logs * style(fmt): rustfmt * remove comment * docs(changelog): occasional slow startup fix * fix(panes): handle various invalid state situations (#3776) * docs(changelog): invalid state handling * chore: add vendored_curl feature (#3766) * docs(changelog): vendored curl option * fix(ux): change plugin manager shortcut (#3779) * docs(changelog): shortcut change * fix(screen): send PaneClosed event to plugins also when closing the whole tab (#3781) * docs(changelog): pane-closed event * feat(plugins): add /cache folder (#3787) * feat(plugins): add /cache folder * style(fmt): rustfmt * docs(changelog): plugin cache folder * docs(changelog): plugin cache folder url * chore(package): vendor common_path (#3780) * vendoring common_path * add original license to common_path * Clarify license scope * refactor: remove rand dependency --------- Co-authored-by: Aram Drevekenin <aram@poor.dev> * docs(changelog): vendor common_path * fix(plugins): derive hash and ord for PaneId (#3790) * docs(changelog): derive hash and ord for paneid * style(fmt): remove warnings * chore(version): set patch version * chore(release): v0.41.2 * chore(repo): bump development version * chore(repo): fix typo in lock file * fix(plugins): properly focus pane after tab was closed (#3797) * fix(plugins): properly focus pane after tab was closed * style(fmt): rustfmt * docs(changelog): focus_pane_with_id fix * fix(plugins): properly pad UI elements when they have a background (#3806) * fix(plugins): mark selected background up until component width * style(fmt): rustfmt * docs(changelog): ui component padding * feat(plugins): allow changing the plugin's `/host` folder (under a new permission) (#3827) * working without notifying plugins * permissions and events * cleanups and formatting * style(fmt): rustfmt * docs(changelog): allow plugins to change host folder * chore(repo): add funding.json (#3838) * chore(repo): add funding.json * update funding json url * fix(plugins): do not detach if using a slash in a session name (#3839) * docs(changelog): slash detach fix * fix(plugins): properly focus plugin after it was hidden (#3841) * docs(changelog): plugin hidden focus fix * fix(screen): off by 1 error when focusing layout tab (#3844) * docs(changelog): layout tab focus fix * fix(multiuser): properly clear fake cursors (#3845) * docs(changelog): multiplayer cursor fix * feat(ux): pin floating panes (#3876) * working * ui indication * add keybinding * add to plugin panes * fix with multiple cursors * toggle with the mouse * fix e2e tests and add new one * some cleanups * add to layouts * make mouse click more lenient * allow setting a new floating pane as pinned * make toggle work throughthe command line * add to plugin api * get tests to pass * style(fmt): rustfmt * docs(changelog): pin floating panes * fix(layout-applier): logical index pane sorting (#3893) * initial draft * working with floating panes as well * use the same method for applying an initial layout to tiled panes * some refactoring * all code paths working with logical positioning fallback! * get tests to compile * get e2e tests to pass * fix e2e remote runner * breadth-first layout sorting * fix some bugs * style(fmt): rustfmt * style(fmt): remove comments * docs(changelog): logical index pane sorting * fix(terminal): mode 2026 feature detection response (#3884) The response to the 2026 mode query was missing a `?` character. The response should be of the format `CSI ? 2026 ; N $ y` where N can be any value in the range 0-4 inclusive. References: https://gist.github.com/christianparpart/d8a62cc1ab659194337d73e399004036 https://vt100.net/docs/vt510-rm/DECRPM.html * docs(changelog): synchronized rendering query response * fix(terminal): cursor overflow (#3894) * docs(changelog): cursor overflow fix * fix(ux): make the Zellij mouse interaction work * fix(rendering): only render if selection/floating-pane position was changed * do not clear copied to clipboard message on mouse motion * various functionality fixes * fix tests * fixes and cleanups * style(fmt): rustfmt * fix(mouse): only report state to plugins when it changed * fix(plugins): send mouse clicks to inactive panes * tests: any event tracking in panes * style(fmt): rustfmt * style: remove unused stuff --------- Signed-off-by: Soc Virnyl Estela <contact@uncomfyhalomacro.pl> Co-authored-by: Autumn Lamonte <AutumnWalksTheLake@gmail.com> Co-authored-by: Aram Drevekenin <aram@poor.dev> Co-authored-by: Zykino <Zykino@users.noreply.github.com> Co-authored-by: Zykino <3809938+Zykino@users.noreply.github.com> Co-authored-by: Daniel Jankowski <Daniel.Jankowski@rub.de> Co-authored-by: Manuel de Prada Corral <6536835+manueldeprada@users.noreply.github.com> Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com> Co-authored-by: Michael Jones <yardquit@pm.me> Co-authored-by: carl <44021312+achristmascarl@users.noreply.github.com> Co-authored-by: Evthestrike <62308745+Evthestrike@users.noreply.github.com> Co-authored-by: Evan Lauer <evanlauer@u.boisestate.edu> Co-authored-by: Rafael Bardini <rbardini@users.noreply.github.com> Co-authored-by: Bruno Mesquita <brunocmesquita@gmail.com> Co-authored-by: Bruno Mesquita <bmesquita@atlassian.com> Co-authored-by: Chromo-residuum-opec <x@matte.fyi> Co-authored-by: Shone Binu <62597277+shonebinu@users.noreply.github.com> Co-authored-by: Mike Greiling <mike@pixelcog.com> Co-authored-by: Soc Virnyl S. Estela <socvirnyl.estela+github@uncomfyhalomacro.pl> Co-authored-by: Eric Raio <43896+ericraio@users.noreply.github.com> Co-authored-by: Vasileios Manolopoulos <44965914+VasilisManol@users.noreply.github.com> Co-authored-by: Vasilis Manolopoulos <vmanolop@gmail.comh> Co-authored-by: tranzystorekk <tranzystorek.io@protonmail.com> Co-authored-by: s1syph0s <34000276+s1syph0s@users.noreply.github.com> Co-authored-by: Darren Burns <darrenburns@users.noreply.github.com>
* feat(plugins): rebind keys at runtime (#3422)Aram Drevekenin2024-06-14
| | | | | | | | | | | | | | | * refactor(server): interpret keys on server so they can be rebound * feat(plugins): allow rebinding keys at runtime * various cleanups * add tests * style(fmt): rustfmt * fix(tests): address (some) e2e test flakiness * style(fmt): rustfmt
* feat(keybindings): support multiple modifiers (eg. Ctrl+Alt) and the kitty ↵Aram Drevekenin2024-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | keyboard protocol (#3383) * parse kitty keys from STDIN * work * work * replace internal Key representation with the new KeyWithModifier in all the places * work * work * allow disabling with config * adjust ordering * handle enabling/disabling properly on the client * support multiple modifiers without kitty too * normalize uppercase keys * get tests to pass * various cleanups * style(fmt): rustfmt
* feat(stdin): allow binding Ctrl J (#3307)hiasr2024-05-02
| | | | | * Fixed Control j keybindings * Fix formatting
* feat: add moving tab to other position (#3047)Bartosz Zbytniewski2024-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: add moving tab to other position * docs(changelog): revert changes * test: update config snapshots * refactor: get rid of HorizontalDirection enum * refactor: cleanup code order * refactor: use debug! instead of info! * refactor: use more defensive way to switch tabs * refactor: revert tip changes * refactor: code formatting * refactor: improve invalid input notification * refactor: inline fns for calculating target index --------- Co-authored-by: Jae-Heon Ji <atx6419@gmail.com>
* feat(client): terminal synchronized output (#2798)gmorer2023-10-13
|
* feat(panes): in place run (#2795)Aram Drevekenin2023-09-18
| | | | | | | | | | | | | | | * prototype * fix tests * add to all the things except plugins * add in-place to plugin commands * fix launch-or-focus should_float and in place behavior * various cleanups * style(fmt): rustfmt
* fix(input): block input thread for newtiledpane and newfloatingpane as well ↵Aram Drevekenin2023-08-31
| | | | (#2757)
* feat(sessions): add a session manager to switch between sessions, tabs and ↵Aram Drevekenin2023-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* feat(terminal): cli and bindable action to clear all buffers for a specific ↵Oleks Gnatovskyi2023-03-29
| | | | | | | | | | | | | | | | | | | | | | | pane (#2239) * fix typo * Add clear screen action * add proper test * added bindable action; remove pointless default impl * add default binding * use imsnif's variant * remove commented example config * remove log line --------- Co-authored-by: Aram Drevekenin <aram@poor.dev>
* feat(cli): add `GoToTabName` action to switch tab by name (#2120)哇呜哇呜呀咦耶2023-02-07
| | | | | | | | | | | | | | | | | | | * 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
* fix(panes): show visual error when failing to resize panes (#2036)Aram Drevekenin2022-12-19
| | | | | | | | | * 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
* feat(ux): show loading screen (#1997)Aram Drevekenin2022-12-07
| | | | | * feat(ux): show loading prompt * style(fmt): rustfmt
* Support clipboard to text input (#1926)哇呜哇呜呀咦耶2022-11-12
|
* feat(mouse): allow toggling mouse mode at runtime (#1883)Thomas Linford2022-10-31
|
* feat(cli): zellij run improvements (#1804)Aram Drevekenin2022-10-17
| | | | | | | | | | | | | | | | | * 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
* feat(config): switch to kdl (#1759)Aram Drevekenin2022-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* fix(terminal): SGR/UTF8 mouse reporting in terminal panes (#1664)Aram Drevekenin2022-08-17
| | | | | | | | | | | | | | | | | | | | | | | * work * work * fix: selection mishandling * style(fmt): rustfmt * style(comments): remove outdated * style(clippy): make clippy happy * fix(mouse): off by one sgr/utf8 reporting * style(fmt): rustfmt * fix(mouse): correctly report drag event code * fix(input): support mouse middle click * style(fmt): rustfmt
* fix(cli): let the exit message be different when detaching (#1573)Matthias Beyer2022-07-12
| | | | | | | | | | | | | | | | | | | | * 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>
* feat(terminal): sixel support (#1557)Aram Drevekenin2022-07-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* refactor(crates): move shared contents from zellij tile to zellij utils (#1541)har7an2022-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* add: debug information for certain actions (#1533)a-kenji2022-06-20
|
* fix: dispatch various actions correctly (#1530)a-kenji2022-06-19
|
* fix(action): dispatch of `edit-scrollback` (#1523)a-kenji2022-06-17
|
* fix: clarify comments (#1519)a-kenji2022-06-16
|
* fix(action): correctly dispatch the `Write` action (#1518)a-kenji2022-06-16
| | | The `Write` action should be called once per session.
* fix(action): send `WriteChars` once per action (#1516)a-kenji2022-06-16
| | | | `WriteChars` is not an idempotent action, that's why it should only be sent to it's destination client.
* fix: remove obsolete logs (#1504)a-kenji2022-06-15
|
* feat: add capability to dispatch actions from cli (#1265)a-kenji2022-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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(style): add trailing comma in match blocks (#1483)a-kenji2022-06-10
| | | This makes it easier to distinguish from normal blocks
* fix(compatibility): respond to bg and fg color ansi queries (#1358)Aram Drevekenin2022-04-28
| | | | | | | | | | | * fix(compatibility): respond to background/foreground queries * style(fmt): rustfmt * style(clippy): make clippy happy * style(fmt): rustfmt * style(fmt): remove unused code
* feat(signals): support XTWINOPS 14 and 16 (and query the terminal for them ↵Aram Drevekenin2022-04-12
| | | | | | | | | | | | | on startup and SIGWINCH) (#1316) * 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
* chore(deps): move from termion to termwiz for STDIN handling (#1249)Aram Drevekenin2022-03-23
| | | | | | | | | | | | | | | | | | | * fix(deps): switch from termion to termwiz for STDIN parsing * style(fmt): clippy * style(fmt): moar clippy * style(fmt): rustfmt * fix(tests): e2e mouse press * style(fmt): rustfmt * bring back polling * fmt fmt fmt * fix some e2e flakiness
* hotfix: do not send bracketed paste to panes where it is not onAram Drevekenin2022-03-16
|
* fix(input): handle discontiguous STDIN input (#1119)Aram Drevekenin2022-02-25
| | | | | | | | | | | | | | | | | * log stdin reads and events * attempt fix for incomplete mouse sequences * read events directly from stdin * fix flaky e2e test * bring back bracketed paste * rustfmt * remove unused Co-authored-by: Thomas Linford <linford.t@gmail.com>
* feat(ui): add floating panes (#1066)Aram Drevekenin2022-02-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * basic functionality * close and reopen scratch terminal working * embed/float and resize whole tab for floating and static floating panes * move focus working * fix focus change in floating panes * move pane with mouse * floating z indices * tests and better resize algorithm * starting to work on performance * some performance experimentations * new render engine * reverse painters algorithm for floating panes * fix frame buffering * improve ux situation * handle multiple new panes on screen without overlap * adjust keybindings * adjust key hints * fix multiuser frame ui * fix various floating/multiuser bugs * remove stuff * wide characters under floating panes * fix wide character frame override * fix non-frame boundaries interactions with floating panes * fix selection character width * fix title frame wide char overflow * fix existing tests * add tests * refactor output out of tab * refactor floating panes out of tab * refactor tab * moar refactoring * refactorings and bring back terminal window title setting * add frame vte output * remove more unused stuff * remove even more unused stuff * you know the drill * refactor floating panes and remove more stuffs * refactor pane grids * remove unused output caching * refactor output * remove unused stuff * rustfmt * some formatting * rustfmt * reduce clippy to normal * remove comment * remove unused * fix closign pane * fix tests
* fix(options): handling and overwriting cli opts (#859)a-kenji2021-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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' ```