allow setting window title via command line option #23249

Closed
opened 2026-01-31 08:36:39 +00:00 by claunia · 2 comments
Owner

Originally created by @Guest0x0 on GitHub (May 10, 2025).

Description of the new feature

I mean window title here, not tab title, which is already supported.

Programs like AutoHotKey and komorebi rely on window properties such as window title and window class to identify windows. Unfortunately, all wt windows have the same title (Terminal) and class CASCADIA_HOSTING_WINDOW_CLASS, so there is no way to classify different wt windows (e.g. quake mode window v.s. normal window).

If wt has a command line option that sets the window title to a user specified value, users can classify different wt windows by manually specifying the title when launching wt.

Proposed technical implementation details

Add a command line option --window-title. Any window created by wt --window-title <text> will have <text> as window title.

open question: if an existing window is picked, should we modify the title of that existing window?

Originally created by @Guest0x0 on GitHub (May 10, 2025). ### Description of the new feature I mean *window title* here, not *tab title*, which is already supported. Programs like AutoHotKey and [komorebi](https://github.com/LGUG2Z/komorebi/issues/73) rely on window properties such as window title and window class to identify windows. Unfortunately, all wt windows have the same title (`Terminal`) and class `CASCADIA_HOSTING_WINDOW_CLASS`, so there is no way to classify different `wt` windows (e.g. quake mode window v.s. normal window). If wt has a command line option that sets the window title to a user specified value, users can classify different wt windows by manually specifying the title when launching `wt`. ### Proposed technical implementation details Add a command line option `--window-title`. Any window created by `wt --window-title <text>` will have `<text>` as window title. open question: if an existing window is picked, should we modify the title of that existing window?
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 08:36:40 +00:00
Author
Owner

@DHowett commented on GitHub (May 14, 2025):

Thanks for the request! It reminds me of #4183 and #1320 for various reasons. Decoupling the window title from the tab title and allowing you to specify what goes into that title would definitely be a solution here...

But I'm not sure it's the right one for your use case.

Considering that windows already support alphanumeric window names (which I think can contain spaces 😱), rather than titles, would it be helpful if we just put those assigned names in the HWND title?

We currently only surface them in the tray icon context menu and via the "show window names" action.

Image

Would this work/?

Image

@DHowett commented on GitHub (May 14, 2025): Thanks for the request! It reminds me of #4183 and #1320 for various reasons. Decoupling the window title from the tab title and allowing you to specify what goes _into_ that title would definitely be _a_ solution here... But I'm not sure it's the right one for your use case. Considering that windows already support alphanumeric window names (which I think can contain spaces 😱), rather than titles, would it be helpful if we just put those assigned names in the HWND title? We currently only surface them in the tray icon context menu and via the "show window names" action. ![Image](https://github.com/user-attachments/assets/c6edca6a-94a5-46e8-92be-2dd324ef518d) Would this work/? ![Image](https://github.com/user-attachments/assets/14db9504-0006-40a0-8920-a699a37e6bd7)
Author
Owner

@Guest0x0 commented on GitHub (May 15, 2025):

Oops, it seems that I have "showTerminalTitleInTitlebar": false but forgot about it, that's why I get the static Terminal title.

With "showTerminalTitleInTitlebar": true, I can customize the window title via VT title, and that's enough for my case. Thanks.

@Guest0x0 commented on GitHub (May 15, 2025): Oops, it seems that I have `"showTerminalTitleInTitlebar": false` but forgot about it, that's why I get the static `Terminal` title. With `"showTerminalTitleInTitlebar": true`, I can customize the window title via VT title, and that's enough for my case. Thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23249