Skip to content

Support tmux control mode #336

@wez

Description

@wez

tmux offers a control mode that allows a terminal emulator to issues commands and react to events happening in a tmux server through the terminal input/output streams.

This issue tracks adding support for this control mode such that it is treated as a multiplexer domain within wezterm, allowing wezterm to connect to a tmux instance and render native windows, tabs and panes for the "remote" tmux session(s).

The basics:

  • tmux -CC attach attaches a domain to the tmux server
  • query and parse the list of sessions, windows, panes
  • synthesize and update the corresponding wezterm windows, tabs, panes in the Mux (with stubs for the render related functions)
  • Deal with ESC k <title> ESC \\ title sequence
  • implement render related functions to get line data from scrollback
  • implement key event related functions in terms of sending keys to the appropriate pane
  • implement spawn/split functions in terms of tmux commands

For a well integrated feature:

  • decide what to do with the tmux -CC attach pane. iTerm2 "buries" the hosting session, rendering it invisible while the tmux stuff is active. Right now wezterm prints a banner that says how to exit the session and leaves it in place
  • Cook up config options ala unix_domains to specify favorite tmux sessions to attach to, optionally with an ssh bootstrap, so that it is simple to do something like wezterm connect tmux-on-my-remote-server to have it ssh in and reconnect the windows/tabs/panes in a single step

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions