VS Code Claude Layout — snap VS Code windows and Claude Code for VS Code panel when on a duplicated window.
This script is Windows only.
PowerShell script to snap VS Code window across dual monitors and Claude Code panel snapped to a position only when duplicating a window. You must change the screens' coordinates to your liking, as in: "with Claude Code panel snapped on the right(...)"; This only works when you Command Palette Trigger 'Ctrl+Shift+P' Workspaces: Duplicate As Workspace in New Window — there still needs to be an update to detect when it's a new window that is not snapped.
If the coordinates for the duplicated window aren't the same on your screen/instance, you'll have to update them.
- Hotkey:
Ctrl+Alt+Vsnaps current VS Code window - Window positioning: Spans two bottom monitors (3840x953 at 0,1083)
- Panel divider: Drags Claude Code panel divider to center (X=1920)
- Duplicate option: Can duplicate workspace before snapping
- **There's also 'Ctrl+Alt+N' for another setup across another 2 dual screens.
powershell -ExecutionPolicy Bypass -File VSCodeClaudeLayout.ps1 -Oncepowershell -ExecutionPolicy Bypass -File VSCodeClaudeLayout.ps1 -Once -Duplicatepowershell -ExecutionPolicy Bypass -File VSCodeClaudeLayout.ps1- Run
CreateShortcut.ps1to create a desktop shortcut - Optionally add the shortcut to
shell:startupfor auto-run on login
Edit these values in VSCodeClaudeLayout.ps1 to match your monitor setup:
$TargetX = 0 # Window X position
$TargetY = 1083 # Window Y position
$TargetWidth = 3840 # Window width (spans 2 monitors)
$TargetHeight = 953 # Window height
$DividerTargetX = 1920 # Panel divider position (center)VSCodeClaudeLayout.ps1- Main scriptCreateShortcut.ps1- Creates desktop shortcut