Score:0

Start Visual Studio Code maximized from Bash

cn flag

I am working on a project consisting of several components, which are separately opened in different Visual Studio Code instances, running on different displays. In order to set everything up more quickly on a day-to-day basis, I wrote a very small bash script, initializing all instances. The script contains multiple lines like this:

code <folder-path> --new-window

However, windows created this way have to be maximized manually, an effort, which I would also like to automatize. Is there any way to start a new Visual Code instance from terminal with a maximized window? I already checked the help-options, but there doesn't seem to be dedicated options for displaying the window.

pw flag
Oli
@Community What's hard to understand? How do you launch VS Code as maximised?
Anders F. U. Kiær avatar
in flag
get some ideas @ `https://github.com/jc00ke/move-to-next-monitor/blob/master/move-to-next-monitor` . You will find a lot on SE too, when you know some of the tools to use/search for eg. wmctrl.
Score:2
cn flag

Changing the setting window.newWindowDimensions in Visual Studio Code to maximized worked for my case. For more complex cases and moving windows to different displays, I would suggest Wnck as described in this answer.

ar flag
Thanks. exact setting I was looking for.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.