I didn't realize how much a tiny thing was bugging me until I fixed it.
On any given day I've got four or five VS Code windows open. A client repo, some infra scripts, a notes folder, a sandbox I'm poking at. And every time I'd hover over the taskbar to switch between them, Windows would show me the same unhelpful thing for each one:
settings.json - my-project package.json - my-project README.md - my-project
The file name first. The project name second, usually cut off. So the one piece of information I actually needed — which project is this? — was the part getting truncated. I'd end up clicking through windows one by one like I was checking pockets for my keys.
Turns out VS Code lets you fix this in about two minutes.
The setting
There's a setting called
window.title that controls exactly what shows up in the title bar (and, importantly, in that taskbar hover tooltip). By default it leads with the active file. You just flip it around so it leads with the folder name.Open your settings JSON (
Ctrl+Shift+P → "Preferences: Open User Settings (JSON)") and add:"window.title": "${rootName}${separator}${appName}"
That's it. Now every window announces itself as:
my-project — Visual Studio Code
No file name, no clutter, just the thing I care about. Hover over the taskbar and I know instantly which project I'm looking at.
The variables, if you want to tweak it
VS Code gives you a handful of placeholders you can mix and match:
${rootName}— your workspace or folder name (the project)${activeEditorShort}— the current file name${appName}— "Visual Studio Code"${separator}— a tidy—divider that politely disappears when a segment is empty
So if you do still want the file name, just put the project first where it belongs:
"window.title": "${rootName}${separator}${activeEditorShort}"
And if you like things to really jump out, wrap the project name in brackets:
"window.title": "[${rootName}]${separator}${activeEditorShort}"
Put this in your User settings (not a workspace
.vscode/settings.json) so it applies to every project you open, not just one.Bonus: give each project a color
Once I'd fixed the name, I went one step further. You can tint the title bar a different color per project, so you're not even reading — you just see which one you're in. Drop this in a repo's
.vscode/settings.json:{
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#283324",
"titleBar.inactiveBackground": "#394635"
}
}
Now my client work is green, my infra repo is a deep blue, my sandbox is a slightly alarming orange. The name tells me the details; the color tells me at a glance. Muscle memory took over within a day.
Why such a small thing matters
None of this is clever. It's not a productivity hack that's going to 10x anything. But context-switching has a cost, and every little "wait, which window is this" moment is a tiny tax on your attention. Removing a dozen of those a day adds up to a workspace that just feels calmer.
Two minutes, two settings. Worth it.
No comments:
Post a Comment