I often find myself with a BUNCH of VS Code windows open during any given day. It could be a variety of projects, or even just different aspects of the same project.
M O N O R E P O
with frontend React code, backend Node.js code, persistence layer database code, in different folders, but same git repository.
Let’s make the cognitive context switching blatantly obvious when you move between them. With beautiful colors!
Let’s make our VS Code top bar rebeccapurple when we are in the react code.
In your VS Code file browser find or create a directory named .vscode
. Inside there, find or create a file named settings.json
.
In settings.json
, add the following configuration, and save the file:
{
"workbench.colorCustomizations": {
"titleBar.activeForeground": "#000",
"titleBar.inactiveForeground": "#000000CC",
"titleBar.activeBackground": "#663399"
}
}
Note: To customize the title bars in Linux, you may need to go to Settings > Window > Title Bar Style and change it from “Native” to “Custom” Special thanks to @phrakberg for that heads up!
You can then make any of these VS Code windows uniquely colored by using the same technique. Your rainbow awaits!
Disclaimer: I do not currently use the solutions mentioned in this section. However a trusted community member on Twitch recommended this, and I’m interested in trying it out, myself.
When you start using this technique and want a little more power, you can style other parts of your VS Code window beyond just the title bar.
One extension that can help you manage all those setting is Peacock, by John Papa, on the VS Code Marketplace.
If you try this out, let me know! I’m always curious to hear how creative people find solutions, and encourage sharing to all of us! Let me know on Twitter