Please allow me to change the terminal theme/colors programmatically
Prerequisites
- [X] I have written a descriptive issue title.
- [X] I have searched all issues to ensure it has not already been reported.
Summary
I would like to change the theme/colors of vscode (or at least the powershell terminal window) programmatically. Is there some code.cmd command line option for this? Or maybe something could be added to the $PsEditor that lets me set the vscode theme?
I am able to do this with the powershell_ise, but can't get parity when migrating to the code plugin. The reason I need this is because I have several entirely different powershell uses/environments that need to be open at once. Azure TiP vs Tshell vs Windows build window, etc. If I can't set a color scheme per-window then I confuse myself.
The only workaround I have so far is even more copies of the portable vscode install, each with their own settings. Is there a better way?
Proposed Design
Add some function to the $PsEditor that lets me set the vscode theme (by string name?)
Thanks @NickVH-MS we would consider a more generalized approach to setting VSCode settings from the PSEditor
Thanks @SydneyhSmith, that would be great. I'm looking forward to such an enhancement for the $PSEditor.
even more copies of the portable vscode install, each with their own settings
Yes. You can have that same effect with zero portable installs. You can use:
code --profile name
My wrapper explicitly sets directories, but I think that's optional. So a few options are:
- Declare your theme in your workspace file, verses the global one
-
--user-data(this has been around, but now it's easier) -
--profileand--temp-profile( this is new in the last 1-2 patches ) - and even newer (from: 1.73 ) option is another settings, that I'm not totally sure how it compares. https://code.visualstudio.com/updates/v1_73#_settings-profiles ( Even newer, in the insider build )
I think the one in 1.73 is for multiple settings on a single profile and/or syncing. If you go the --profile route, you can have multiple global profiles.
- I started a wrapper to let me use simplified virtual envs. Invoke-VsCodeProfileVEnv