feat: tmux control mode with layout sync, capture, and pane management - #1070
Draft
ksanislo wants to merge 1 commit into
Draft
feat: tmux control mode with layout sync, capture, and pane management#1070ksanislo wants to merge 1 commit into
ksanislo wants to merge 1 commit into
Conversation
Add tmux -CC (control mode) integration to Terminator, allowing it to act as a native GUI frontend for tmux sessions. Core tmux integration (terminatorlib/tmux/): - protocol.py: subprocess and PTY bridges for tmux control mode - layout.py: parser for tmux layout strings into tree structures - controller.py: per-session controller managing terminals ↔ panes - handlers.py: layout-change, %output, window add/close/rename - state.py: GObject state machine with signal-driven transitions Layout synchronization: - _apply_ratios maps tmux layout trees to GTK paned positions with cell-aligned boundaries (char_sep padding + round-up alignment) - _snap_position uses math.ceil to match _apply_ratios grid - _char_snap updated on VTE allocation for post-realization accuracy - Expected allocations propagated to nested paneds to avoid stale GTK values during initial layout cascade - Suppress spurious resize-pane during add-pane operations Initial attach: - capture-pane feeds existing content to VTE on attach - Target-based settling ensures VTE sizes match tmux tree before capturing (active-window panes only) Supporting changes: - CLI: --tmux-attach, --tmux-new options - IPC/DBus: tmux session routing for new windows - Window: character-grid geometry hints, tmux-aware resize - Config/prefs: overlay titlebar/scrollbar, auto-minimize origin - Paned: cell-boundary snapping, tmux-managed handle tracking, do_size_allocate target restoration - Docs: man pages and adoc for tmux options and config - Tests: layout parser and protocol unit tests
Author
|
This is my attempt at expanding terminator with tmux integration support. It's still a bit too buggy to be considered yet, but it would be nice to get your thoughts on what you would want to see in here to allow this to be eligible for inclusion. |
Member
|
Wow, this is a lot. I've able to read through about half the diff and so far it looks really good. I'm going to need to sit with this a while and spend a good chunk of my rare free time with it before I can give you some feedback but I really like what you've done so far. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add tmux -C (control mode) integration to Terminator, allowing it to act as a native GUI frontend for tmux sessions.
Core tmux integration (terminatorlib/tmux/):
Layout synchronization:
Initial attach:
Supporting changes: