Add keyboard shortcuts to rename tabs/windows and cycle tab color#672
Open
fabdelgado wants to merge 2 commits into
Open
Add keyboard shortcuts to rename tabs/windows and cycle tab color#672fabdelgado wants to merge 2 commits into
fabdelgado wants to merge 2 commits into
Conversation
Renaming a tab/window and setting a tab color already existed but were buried in the View menu with no key equivalents, which makes organizing a window full of tabs (e.g. many concurrent agents) slow. This wires up default shortcuts and adds a one-keystroke color cycle: - Edit Tab Title: Ctrl-Cmd-R (reuses editTabTitle:) - Edit Window Title: Ctrl-Opt-Cmd-R (reuses editWindowTitle:) - Cycle Tab Color: Ctrl-Cmd-E (new cycleTabColor: action) cycleTabColor: steps the current tab through the tabColorMenuOptions presets, then to no color, then wraps around. The shared "apply a color to every session in a tab" logic is hoisted into applyTabColor:toTab:, used by both the color menu and the new shortcut. Preset parsing is extracted to +[ColorsMenuItemView presetTabColors] so the menu and the cycle share one source of truth.
Owner
|
Can't use control-command or control-opt-command for a shortcut because they are reserved for creating new windows/tabs. Commit e376ba3 adds a spreadsheet documenting the existing shortcuts. Cycle tab color is worth keeping, though. Just revert the shortcut changes. |
Per review: Ctrl-Cmd and Ctrl-Opt-Cmd are reserved for creating new windows/tabs, so the Edit Tab Title, Edit Window Title, and Cycle Tab Color key equivalents are removed. The cycleTabColor: action and its menu item are kept (now with no default shortcut), along with the shared applyTabColor:toTab: and +[ColorsMenuItemView presetTabColors] refactors.
Author
|
Ready the changes!, thanks! |
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.
Renaming a tab/window and setting a tab color already existed but were buried in the View menu with no key equivalents, which makes organizing a window full of tabs (e.g. many concurrent agents) slow.
This wires up default shortcuts and adds a one-keystroke color cycle:
cycleTabColor: steps the current tab through the tabColorMenuOptions presets, then to no color, then wraps around. The shared "apply a color to every session in a tab" logic is hoisted into applyTabColor:toTab:, used by both the color menu and the new shortcut. Preset parsing is extracted to +[ColorsMenuItemView presetTabColors] so the menu and the cycle share one source of truth.