Windows tray application that bridges clipboard images and Claude Code in WSL. Press Ctrl+V in Windows Terminal with a screenshot in the clipboard — ScreenCode saves the image to the WSL filesystem and pastes the file path, so Claude Code can read it directly.
- Copy a screenshot to the clipboard (Win+Shift+S, Print Screen, etc.)
- Focus Windows Terminal (with Claude Code or any WSL shell)
- Press Ctrl+V or Shift+Insert
- ScreenCode intercepts the paste, saves the image as PNG to
~/.img/, and types the Linux file path into the terminal - Claude Code reads the image from the path
If the clipboard contains text (not an image), paste works normally — no interception.
| Icon | Meaning |
|---|---|
| ○ | Clipboard empty |
| T | Text in clipboard |
| Im | Image in clipboard (will be intercepted) |
| ○ gray | Interception disabled |
- Windows 10/11
- .NET 10 SDK
- WSL with any Linux distribution
dotnet publish src/ScreenCode/ScreenCode.csproj -c Release -r win-x64The output is in src/ScreenCode/bin/Release/net10.0-windows/win-x64/publish/.
src\ScreenCode\bin\Release\net10.0-windows\win-x64\publish\ScreenCode.exeA green circle appears in the system tray. Right-click for options.
Right-click the tray icon → check Start with Windows. This adds a registry entry to HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.
Settings are stored in %LOCALAPPDATA%\ScreenCode\settings.json. Edit via tray menu → Settings... or directly:
{
"wslDistro": "",
"imageDirectory": "",
"linuxUser": "",
"enableLog": false,
"restoreClipboard": true
}| Setting | Default | Description |
|---|---|---|
wslDistro |
auto-detected | WSL distribution name (e.g. Ubuntu, ubuntu-dev) |
imageDirectory |
~/.img |
Linux path where screenshots are saved |
linuxUser |
Windows username | Linux username for home directory |
enableLog |
false |
Write debug log to %LOCALAPPDATA%\ScreenCode\screencode.log |
restoreClipboard |
true |
Restore original image to clipboard after pasting the path |
Empty values trigger auto-detection. WSL distro is detected via wsl --list --quiet.
Ctrl+V → KeyboardHook (WH_KEYBOARD_LL)
│
├── Not Windows Terminal? → pass through
├── No image in clipboard? → pass through
│
└── Image detected → suppress keystroke
│
Worker thread (STA)
│
├── ClipboardHelper.GetImage()
├── ImageSaver.Save() → \\wsl.localhost\<distro>\...
└── PathInjector.InjectPath()
│
├── SetText(path) → clipboard
└── SendInput(Ctrl+V) → paste path
All Win32 interop is via P/Invoke — no third-party dependencies.
| Component | Purpose |
|---|---|
KeyboardHook |
Global low-level keyboard hook (WH_KEYBOARD_LL) |
WindowDetector |
Checks if foreground window is Windows Terminal |
ClipboardHelper |
Clipboard access with retry logic |
ImageSaver |
Saves PNG to WSL filesystem via UNC path |
PathInjector |
Injects file path via clipboard + simulated Ctrl+V |
ClipboardMonitor |
Listens for clipboard changes (WM_CLIPBOARDUPDATE) |
IconGenerator |
Programmatic tray icon generation via GDI+ |
Settings |
JSON config with auto-detection fallbacks |
StartupManager |
Registry-based auto-start management |
- .NET 10.0 / C# 14
- Windows Forms (NotifyIcon only — no windows)
- Win32 P/Invoke (SetWindowsHookEx, SendInput, GetForegroundWindow)
- System.Drawing.Common (GDI+ for icon generation and image saving)
MIT
Приложение в системном трее Windows, которое связывает буфер обмена с Claude Code в WSL. Нажмите Ctrl+V в Windows Terminal со скриншотом в буфере — ScreenCode сохранит изображение в файловую систему WSL и вставит путь к файлу, чтобы Claude Code мог его прочитать.
- Скопируйте скриншот в буфер обмена (Win+Shift+S, Print Screen и т.д.)
- Переключитесь на Windows Terminal (с Claude Code или любым WSL-шеллом)
- Нажмите Ctrl+V или Shift+Insert
- ScreenCode перехватывает вставку, сохраняет изображение как PNG в
~/.img/и вводит Linux-путь к файлу в терминал - Claude Code читает изображение по этому пути
Если в буфере текст (не изображение) — вставка работает как обычно, без перехвата.
| Иконка | Значение |
|---|---|
| ○ | Буфер пуст |
| T | Текст в буфере |
| Im | Изображение в буфере (будет перехвачено) |
| ○ серая | Перехват отключён |
- Windows 10/11
- .NET 10 SDK
- WSL с любым дистрибутивом Linux
dotnet publish src/ScreenCode/ScreenCode.csproj -c Release -r win-x64Результат в src/ScreenCode/bin/Release/net10.0-windows/win-x64/publish/.
src\ScreenCode\bin\Release\net10.0-windows\win-x64\publish\ScreenCode.exeВ системном трее появится зелёный кружок. Правый клик — меню.
Правый клик по иконке → отметьте Start with Windows. Добавляет запись в реестр HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.
Хранятся в %LOCALAPPDATA%\ScreenCode\settings.json. Открыть через меню трея → Settings... или вручную:
{
"wslDistro": "",
"imageDirectory": "",
"linuxUser": "",
"enableLog": false,
"restoreClipboard": true
}| Параметр | По умолчанию | Описание |
|---|---|---|
wslDistro |
автоопределение | Имя WSL-дистрибутива (напр. Ubuntu, ubuntu-dev) |
imageDirectory |
~/.img |
Linux-путь для сохранения скриншотов |
linuxUser |
имя пользователя Windows | Имя пользователя Linux для домашней директории |
enableLog |
false |
Писать лог в %LOCALAPPDATA%\ScreenCode\screencode.log |
restoreClipboard |
true |
Восстанавливать картинку в буфере обмена после вставки пути |
Пустые значения — автоопределение. Дистрибутив WSL определяется через wsl --list --quiet.
MIT