Skip to content
shzbkPublic

About

A passive, lightweight Windows tray utility that auto-saves clipboard images to disk.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clippped

A minimal, passive Windows tray utility that auto-saves any image placed on the clipboard (Win+Shift+S, PrintScreen, copy-image-from-browser, …) to a folder of your choice.

It never modifies the clipboard, never reads non-image data, and never touches the network.


Install

End users

  1. Download the latest ClipppedSetup-x.y.z.exe from the releases page (~2 MB).
  2. Run it. The installer is unsigned for now, so SmartScreen may show a "Windows protected your PC" dialog — click More info → Run anyway.
  3. The installer is fully offline and standalone — no runtime download, nothing to install separately. Works on Windows 10 (1903+) and Windows 11, which both ship with .NET Framework 4.8 preinstalled.
  4. The installer offers checkboxes for desktop shortcut, Start menu entry, and "auto-launch on Windows startup."
  5. Clippped runs silently in the system tray. Right-click the tray icon for the menu.

Developers (run from source)

Requires the .NET 8 SDK on Windows (build only — the runtime target is .NET Framework 4.8, which is part of Windows itself).

dotnet build .\Clippped.sln -c Release
.\Clippped\bin\Release\net48\Clippped.exe

Usage

The app has no main window — that's by design. Everything lives in the tray icon menu:

Menu item What it does
Pause / Resume Toggles the clipboard listener
Open save folder Opens your configured folder in Explorer (also: double-click the tray icon)
Open last image Opens the most recent save in your default image viewer
Settings… Opens the settings dialog
Exit Quits the app

What you can configure

  • Save folder (default: %USERPROFILE%\Pictures\ClipboardScreenshots)
  • Group into per-day subfolders (yyyy-MM-dd\)
  • Run on Windows startup (per-user; no admin)
  • Save notifications (tray balloon when an image is saved)
  • Sound on save (Windows asterisk sound)
  • Output format: PNG (lossless) or JPG (with quality slider, 10–100)
  • File-name template with tokens:
    • {datetime} → 2026-05-05_14-32-08
    • {date} → 2026-05-05
    • {time} → 14-32-08
    • {timestamp} → unix epoch seconds
    • {n} → 4-digit per-day counter (0001, 0002, …)

The default template is {datetime} and the default format is PNG, so out of the box you get 2026-05-05_14-32-08.png files.


Privacy

  • Non-image clipboard contents (text, files, HTML, RTF, audio…) are never read, decoded, or stored. The format check rejects them before any data is touched.
  • No telemetry. No network calls of any kind.
  • The only files written are the images you copy, plus a single settings.json at %APPDATA%\Clippped\.

Build & ship installer

Requires the .NET 8 SDK (for the build tooling) and Inno Setup 6.

# One-time: install Inno Setup
winget install JRSoftware.InnoSetup

# Build the installer (compiles app, then runs Inno Setup)
powershell -File .\installer\build-installer.ps1

Output lands in installer\Output\ClipppedSetup-1.0.0.exe (~2 MB). That single file is what you distribute — fully offline, no runtime download needed.

Why .NET Framework 4.8 instead of modern .NET: a self-contained .NET 8 build of this tray utility weighed 68 MB; a framework-dependent .NET 8 build weighed 208 KB but required ~70% of users to download a 57 MB runtime on first install. .NET Framework 4.8 is preinstalled on every supported Windows 10 and 11 box, so the app can ship as a 50 KB EXE with no runtime tax. We use zero modern-.NET-only APIs in this codebase.


Architecture

File Responsibility
Program.cs Entry point, single-instance mutex, exception handling, Application.Run.
TrayApplicationContext.cs Tray icon, menu, lifecycle, UI marshalling.
ClipboardMonitor.cs Message-only NativeWindow listening for WM_CLIPBOARDUPDATE.
ClipboardImageHandler.cs Reads image, dedup, file-name templating, PNG/JPG encode, save off-thread.
Win32ClipboardReader.cs P/Invoke for raw HGLOBAL reads — the .NET Clipboard.GetData("PNG") API returns a zero-filled buffer for non-standard formats.
SettingsForm.cs Tabbed WinForms settings UI.
AppSettings.cs JSON-backed settings load/save.
StartupManager.cs HKCU Run registry helper for auto-start.
app.manifest DPI awareness, supported OS, asInvoker execution level, UTF-8 ANSI.
app.ico Multi-resolution app icon (16/20/24/32/48/64/128/256), generated by tools\generate-icon.ps1.
installer\Clippped.iss Inno Setup script.

Clipboard read path

ClipboardImageHandler.TryExtractImage checks formats in this order:

  1. PNG — Snipping Tool / Win+Shift+S provides this directly. Read via Win32ClipboardReader (raw HGLOBAL), since the .NET wrapper Clipboard.GetData("PNG") returns a zero-filled buffer for non-standard formats. PNG signature is validated before saving.
  2. CF_DIB / CF_BITMAP — round-tripped through System.Drawing.Image and re-encoded to the configured output format.

Anything else returns null and the change is dropped without further inspection. Reads retry up to 4 times with linear backoff because OpenClipboard is exclusive across processes.

Threading

  • The WM_CLIPBOARDUPDATE message arrives on the UI thread (the message-only window's WndProc).
  • The synchronous clipboard read happens on that same UI thread (STA required); encoding and file I/O dispatch to a thread-pool task so the message pump stays responsive.
  • Notifications and other UI-bound callbacks are marshalled back via the captured SynchronizationContext.

Industry-standard hygiene

  • Single-instance named-mutex guard.
  • asInvoker manifest — no UAC prompts, runs as the current user.
  • PerMonitorV2 DPI awareness declared in the manifest.
  • UTF-8 ANSI codepage enabled in the manifest (clean filenames).
  • Per-user HKCU autostart — no admin required.
  • Unhandled exception handlers surface crashes in a dialog instead of dying silently.
  • .NET Framework 4.8 target — preinstalled on every Windows 10/11 box, so the deployed EXE is ~50 KB and the installer is fully offline.
  • Hand-rolled JSON — zero NuGet dependencies, single-EXE deployment.
  • Inno Setup installer with Start menu/desktop shortcut tasks, uninstaller registration, and a kill-running-app step on uninstall.

License

MIT — see LICENSE.

About

A passive, lightweight Windows tray utility that auto-saves clipboard images to disk.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages