Subtly change the color of your Visual Studio Code workspace. Ideal when you have multiple VS Code instances, use VS Live Share, or use VS Code's Remote features, and you want to quickly identify your editor.
MIT License
1.04k
stars
117
forks
source link
surpriseMeOnStartup - Not on first window (unless hardcoded peacock.Color) #399
Is your feature request related to a problem? Please describe.
Only Peacock colorize windows when
A. Hardcoded color values present in workspace (e.g. peacock.Color/workbench.colorCustomizations)
B. Additional new windows opened (first window remains as is)
Feature: surpriseMeOnStartup
Only apply a peacock color if there's more than one instance open.
Alternatively, first instance open uses existing theme window colors
Distinguish peacock.Color from surpriseMe setting with additional feature peacock.AutoSelectedColor. This allows someone to hardcode a peacock.Color for workspaces they want to specifically be that color. The rest, autoColored.
This could allow for scanning workbench.colorCustomizations for peacock.AutoSelectedColor; if found: Consider workbench.colorCustomizations as Peacock filled and delete/reset with some confidence.
Describe the solution you'd like
Pseudo code (would skip first instance for surpriseMe, would use peacock color if hard coded, otherwise would no run peacock tweaks on the first window):
if (vscode.instances.length > 1 && !peacock.Color) {
run peacock surpriseMe // Writes peacock.AutoSelectedColor
} else if (peacock.Color) { //Workspace has a **user set** window coloration, NOT peacock.AutoSelectedColor
use peacock.Color settings
}
else {
//otherwise do nothing, which should mean using existing theme's window coloring
}
Describe alternatives you've considered
Remove Peacock injected workbench.colorCustomizations on exit?
I'm not sure if you're able to detect if there's more than one instance open or not though, especially since VS Code is cross platform. It wouldn't be the worst thing in the world if it always applied a color scheme, but 80% of the time I'm only working in a single instance and wouldn't need the different color scheme (and I like my default theme colors, so it would be nice if they weren't overridden).
Is your feature request related to a problem? Please describe.
Only Peacock colorize windows when A. Hardcoded color values present in workspace (e.g.
peacock.Color
/workbench.colorCustomizations
) B. Additional new windows opened (first window remains as is)Feature:
surpriseMeOnStartup
peacock.Color
from surpriseMe setting with additional featurepeacock.AutoSelectedColor
. This allows someone to hardcode apeacock.Color
for workspaces they want to specifically be that color. The rest, autoColored.workbench.colorCustomizations
forpeacock.AutoSelectedColor
; if found: Considerworkbench.colorCustomizations
as Peacock filled and delete/reset with some confidence.Describe the solution you'd like
Pseudo code (would skip first instance for surpriseMe, would use peacock color if hard coded, otherwise would no run peacock tweaks on the first window):
Describe alternatives you've considered
workbench.colorCustomizations
on exit?Additional context https://github.com/johnpapa/vscode-peacock/issues/33#issuecomment-467944074