Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Support for tmux's Control Mode #1935

Open
yankcrime opened this issue Jul 10, 2024 · 6 comments
Open

Feature: Support for tmux's Control Mode #1935

yankcrime opened this issue Jul 10, 2024 · 6 comments
Labels
gui GUI or app issue regardless of platform (i.e. Swift, GTK) vt Control sequence related

Comments

@yankcrime
Copy link
Member

tmux has a feature called Control Mode, which allows a client i.e a terminal emulator such as Ghostty to manage tmux panes. This has the benefit of enabling native integration with the terminal emulator and by extension the host OS system, making it easier to manage buffers without having to jump through hoops imposed when using tmux directly.

@mitchellh
Copy link
Contributor

mitchellh commented Jul 12, 2024

Ah yes, I've been meaning to do this. I've started working on at least the tmux control mode parser. I believe I'll bring that in via a PR first before integrating more parts of Ghostty into it.

Here is a list of TODOs that I plan on doing independently so we don't have one massive PR. The checklist today doesn't necessarily map 1:1 to a PR but is the set of somewhat separable work to do:

  • Control Mode DCS Parser (Tmux Control Mode Parser (ONLY the parser) #1946)
  • Termio needs to support not executing a subprocess
  • Apprt API changes to note non-subprocess-based surfaces
  • Termio hooks to trigger the proper events on tmux notifications
  • Parser for tmux command output (i.e. list-windows) and the command to send for it

@yankcrime
Copy link
Member Author

Nice!! I think it'll also need #189 to really make sense.

@mitchellh
Copy link
Contributor

mitchellh commented Jul 12, 2024

I got the control mode notification parser in in #1946. This is just one of many steps (see my first comment).

@mitchellh mitchellh added vt Control sequence related gui GUI or app issue regardless of platform (i.e. Swift, GTK) and removed enhancement labels Oct 2, 2024
@dtenenba
Copy link

Is this the same as the tmux integration in iTerm2 (enabled by adding -CC to the tmux command)?

If so, consider this a gigantic +1 (+1M). I'm so dependent on that feature that I'll probably continue to use iTerm2 until Ghostty or another terminal emulator supports it.

@yankcrime
Copy link
Member Author

@dtenenba Yes, an equivalent feature implemented in Ghostty is the intended outcome from this issue.

@jasonshanks
Copy link

Sorry is this also the same as 'programmatic control' so that Vim-Tmux-Navigator works simultaneous on Nvim and a tux terminal pane?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gui GUI or app issue regardless of platform (i.e. Swift, GTK) vt Control sequence related
Projects
None yet
Development

No branches or pull requests

4 participants