microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.43k stars 28.95k forks source link

Add ability to remove `rootNameShort` in window title if `rootNameShort` is empty string #190006

Open nikitavoloboev opened 1 year ago

nikitavoloboev commented 1 year ago

I have a workspace that is an empty space . In VSCode the title bar with this will look like:

image

I would like so that the title bar only shows the file name in this case.

So just readme.md in above case.

And in case of a workspace with some name like rust instead of below:

image

It should be main.rs - rust. No need to show the (Workspace).

Is it possible to customise the window title in this way?

nikitavoloboev commented 1 year ago

My current window title is: ${activeEditorShort}${separator}${rootName}${separator}${profileName}

image

I don't see how I can remove - (Workspace) in available options.

nikitavoloboev commented 1 year ago

I basically want to modify rootName I think. Have it stop showing (Workspace) in it as an option.

Would be so amazing if you can add this. ♥️

nikitavoloboev commented 1 year ago

Ok actually this: ${activeEditorShort}${separator}${rootNameShort}${separator}${profileName} is what I was looking for.

image

It shows separator as there is empty space name as the workspace and it still shows that.

Is there by chance a way to make the window title more dynamic? So if the name is ` empty space, it won't showrootNameShort` and thus not show the separator?

sbatten commented 1 year ago

Are you saying your workspace name is all whitespace?

nikitavoloboev commented 1 year ago

Yes basically I have a default workspace I often run and dislike having `(Workspace) there.

I would like to hide the (Workplace) in general from the name. Can I do that?

image

So have above showing. Even when in a workspace. No additional (Workplace) appended.

Thanks a lot.

sbatten commented 1 year ago

${rootNameShort} seems to be what you want but I'm not sure about the workspace name being all whitespace. how did you set that up?

nikitavoloboev commented 1 year ago

how did you set that up?

image

you can have empty space in a file

nikitavoloboev commented 1 year ago

I have this as name now:

"window.title": "${activeEditorShort}${separator}${rootNameShort}${separator}${profileName}",

Not sure which part I have to remove.