Skip to content

Commit

Permalink
Add context menu for quick terminal tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
sohsatoh committed Jan 25, 2025
1 parent 3d9e81e commit 0eaa841
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ struct QuickTerminalTabBarView: View {
onSelect: { tabManager.selectTab(tab) },
onClose: { tabManager.closeTab(tab) }
)
.contextMenu {
Button("Close Tab") {
tabManager.closeTab(tab)
}
Button("Close Other Tabs") {
tabManager.tabs.forEach { otherTab in
if otherTab.id != tab.id {
tabManager.closeTab(otherTab)
}
}
}
}
.onDrag {
tabManager.draggedTab = tab
return NSItemProvider(object: tab.id.uuidString as NSString)
Expand Down

0 comments on commit 0eaa841

Please sign in to comment.