Repository navigation
Add "Move to new tab" option for split terminals - #1146
Open
iam-shanmukha wants to merge 1 commit into
Open
iam-shanmukha wants to merge 1 commit into
iam-shanmukha wants to merge 1 commit into
Conversation
- Add move_to_new_tab() and can_move_to_new_tab() in Terminal class - Add 'Move to new tab' right-click popup menu item - Add move_to_new_tab keybinding option in preferences and config - Fix Gtk.Notebook.detach_tab argument in notebook.py - Add comprehensive unit tests in tests/test_move_to_new_tab.py
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.
Overview
Currently, Terminator allows splitting terminals horizontally and vertically, zooming them temporarily, and opening new empty tabs. However, there is no direct option to take an existing split terminal pane and move it into its own full-screen tab while preserving the running shell session, command history, and active processes.
This PR adds a "Move to new tab" option in the terminal context menu (as well as a configurable shortcut action in Preferences) for split terminals.
Details
Terminal.can_move_to_new_tab()&Terminal.move_to_new_tab():Paned).Paned.hoover()on the parentPanedso the remaining sibling terminal expands to occupy the full container/tab.Notebookif the window is not yet tabbed, or appends a new tab to the existingNotebook.Move to _new tabinTerminalPopupMenudirectly afterOpen _Tab.can_move_to_new_tab()), and greyed out when already alone in a tab or window.move_to_new_tabin default keybindings andPrefsEditorso users can assign a keyboard shortcut.Notebook.remove:Gtk.Notebook.detach_tabtakes aGtk.Widgetinstance, butpage_num(int) was being passed. Fixed to passwidgetto preventTypeError: argument child: Expected Gtk.Widget, but got int.Terminator.find_terminal_by_uuid:uuidattribute on terminal objects before accessingterminal.uuid.urn.Testing
tests/test_move_to_new_tab.py:test_can_move_to_new_tab_single_terminaltest_can_move_to_new_tab_split_terminalstest_move_to_new_tab_without_existing_notebooktest_move_to_new_tab_with_existing_notebooktest_move_to_new_tab_nested_panedspytest(all 36 tests passing).python3 -m compileall -f terminatorlib/ tests/ remotinator terminator.