Feature Request - Hide close button on tabs - (or warn) #20074

Closed
opened 2026-01-31 07:02:38 +00:00 by claunia · 4 comments
Owner

Originally created by @nawlbergs on GitHub (Jun 14, 2023).

Description of the new feature/enhancement

Ability to remove the Close button on tabs... or Warn when closing a single tab.
Its not hard to accidently close a tab (especially if you rename the tab with a short name). I've done it many times.

Proposed technical implementation details (optional)

Setting (similar to "Warn when closing more than one tab") to remove the close button on tabs or Warn on single tab closure.
If Close button removed... right clicking would still allow you to close the tab. (obviously).

I want to not accidentally close tabs.

Originally created by @nawlbergs on GitHub (Jun 14, 2023). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Ability to remove the Close button on tabs... or Warn when closing a single tab. Its not hard to accidently close a tab (especially if you rename the tab with a short name). I've done it many times. <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) Setting (similar to "Warn when closing more than one tab") to remove the close button on tabs or Warn on single tab closure. If Close button removed... right clicking would still allow you to close the tab. (obviously). <!-- A clear and concise description of what you want to happen. --> I want to not accidentally close tabs.
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 07:02:38 +00:00
Author
Owner

@lhecker commented on GitHub (Jun 14, 2023):

You can hide the close button! Open your settings and click on "Open JSON file". Add the following to the end of the file under "themes":

{
    "name": "Dark (no close button)",
    "tab": 
    {
        "background": "terminalBackground",
        "showCloseButton": "never",
        "unfocusedBackground": "#00000000"
    },
    "tabRow": 
    {
        "background": null,
        "unfocusedBackground": "#333333FF"
    },
    "window": 
    {
        "applicationTheme": "dark",
        "useMica": false
    }
}

You can now select the "Dark (no close button)" in the Appearance settings

image

The only way to close the tab now is via Ctrl+Shift+W. We're working on a fix to close it via the middle mouse button over at #15517.

@lhecker commented on GitHub (Jun 14, 2023): You can hide the close button! Open your settings and click on "Open JSON file". Add the following to the end of the file under "themes": ```json { "name": "Dark (no close button)", "tab": { "background": "terminalBackground", "showCloseButton": "never", "unfocusedBackground": "#00000000" }, "tabRow": { "background": null, "unfocusedBackground": "#333333FF" }, "window": { "applicationTheme": "dark", "useMica": false } } ``` You can now select the "Dark (no close button)" in the Appearance settings ![image](https://github.com/microsoft/terminal/assets/2256941/2d4d4efe-d425-4a1e-a6d1-d8d21e90d770) The only way to close the tab now is via Ctrl+Shift+W. We're working on a fix to close it via the middle mouse button over at #15517.
Author
Owner

@zadjii-msft commented on GitHub (Jun 15, 2023):

Between the above answer and #5301 I'm gonna close this out. Thanks!

/dup #5301

@zadjii-msft commented on GitHub (Jun 15, 2023): Between the above answer and #5301 I'm gonna close this out. Thanks! /dup #5301
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Jun 15, 2023):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (Jun 15, 2023): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@paaloeye commented on GitHub (Feb 15, 2025):

You can hide the close button! Open your settings and click on "Open JSON file". Add the following to the end of the file under "themes":

{
"name": "Dark (no close button)",
"tab":
{
"background": "terminalBackground",
"showCloseButton": "never",
"unfocusedBackground": "#00000000"
},
"tabRow":
{
"background": null,
"unfocusedBackground": "#333333FF"
},
"window":
{
"applicationTheme": "dark",
"useMica": false
}
}
You can now select the "Dark (no close button)" in the Appearance settings

image

The only way to close the tab now is via Ctrl+Shift+W. We're working on a fix to close it via the middle mouse button over at #15517.

That's the best solution I found so far and can confirm it's working as advertised.
@lhecker Cheers for saving me countless hours of googling it.

@paaloeye commented on GitHub (Feb 15, 2025): > You can hide the close button! Open your settings and click on "Open JSON file". Add the following to the end of the file under "themes": > > { > "name": "Dark (no close button)", > "tab": > { > "background": "terminalBackground", > "showCloseButton": "never", > "unfocusedBackground": "#00000000" > }, > "tabRow": > { > "background": null, > "unfocusedBackground": "#333333FF" > }, > "window": > { > "applicationTheme": "dark", > "useMica": false > } > } > You can now select the "Dark (no close button)" in the Appearance settings > > ![image](https://github.com/microsoft/terminal/assets/2256941/2d4d4efe-d425-4a1e-a6d1-d8d21e90d770) > > The only way to close the tab now is via Ctrl+Shift+W. We're working on a fix to close it via the middle mouse button over at [#15517](https://github.com/microsoft/terminal/issues/15517). That's the best solution I found so far and can confirm it's working as advertised. @lhecker Cheers for saving me countless hours of googling it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20074