zed
zed copied to clipboard
Configure window title pattern
Check for existing issues
- [X] Completed
Describe the feature
Currently, Zed's windows titles take the form of {filename} — {project}, e.g. channel.rs — app.
I would like to configure this to be the inverse: {project} — {filename}, e.g. app — channel.rs.
I tend to have one window for each project, with multiple projects open at once. Having the project name prefix the filename ensures that in my window switcher, the project name is always visible even when the title is truncated.
As-is, I can wind up with situations like:
Cargo.toml — project_aCargo.toml — project_bCargo.toml — project_c
Truncated to:
Cargo.toml — pr...Cargo.toml — pr...Cargo.toml — pr...
Searching for this, I only turned up #5283 — which should possibly be closed as complete anyway since I am seeing details in the window title.
If applicable, add mockups / screenshots to help present your vision of the feature
Example of the situation I can currently find myself in when switching windows: (this is the full width of my switcher)
Vision of the feature: my prior VSCode setting:
"window.title": "${rootName}${separator}${activeEditorShort}",
(or as a quicker fix, even just an option to omit the filename and show only the project, which saves building any sort of template string parsing)
I stumbled upon a problem when I want to find a Zed window, but I can't just search by Zed, because it's not there. As an example, a VSCodium window has its name in the title, maybe Zed should have it too:
wmctrl -l
0x04600003 0 nixos idea.log - log - VSCodium
0x00600003 4 nixos Alacritty
0x0180003d 0 nixos Configure window title pattern · Issue #14534 · zed-industries/zed — Mozilla Firefox
0x03a00003 0 nixos wmctrl -l
0x03c00002 0 N/A settings.json — <- this is Zed
Overall having a configurable window title patter is a good idea IMO.
For anyone who might wish to give this a go, the relevant code is fn update_window_title in crates/workspace/src/workspace.rs.
Also, it would be nice to have a setting for workspace title, like what Intellij has, for example:
The project is in ~/Projects/ums, the workspace title will be ums, and I want to set the workspace title to User Management Service.
Same here. It would be nice to have a mechanism to set a title for a project. In my case, I have a project with manually added folders (monorepo, too many packages inside, and I only want a subset of those packages). Zed uses the name of the topmost folder in the list as the title, and this does not reflect the purpose of the project.
I stumbled upon a problem when I want to find a Zed window, but I can't just search by Zed, because it's not there. As an example, a VSCodium window has its name in the title, maybe Zed should have it too:
Ran into this as well today. All the programs i have open have the program name in the title, Zed is the lone exception. Makes it a real pain to setup keyboard shortcuts to switch to the Zed window.
I'll open a PR hard-coding the — Zed clearly there's a need for it, it's a simpletitle.push_str(" — "); title.push_str(RELEASE_CHANNEL.display_name()), should should the collab ↙/↗ be before or after it? Imo it can even go after the project name instead of the edited file because it's logically per-project and it's more visible if the title gets cut-off