# Hide From Screen Capture Obsidian plugin that excludes all Obsidian windows (main window and any popped-out panes) from screen-share/recording capture on Windows, using `SetWindowDisplayAffinity(WDA_EXCLUDEFROMCAPTURE)` via Electron's `BrowserWindow.setContentProtection()`. ## How it works - A ribbon icon (left sidebar) toggles capture-hiding on/off. - Protected: `eye-off` icon, highlighted. - Unprotected: `eye` icon, normal. - Hiding is **enabled by default** on first install. - The toggle state persists across restarts. - Obsidian's Settings dialog is an in-window modal (not a separate OS window), so it is automatically covered whenever the main window is protected. Popped-out tab windows are protected too, via Obsidian's `window-open` workspace event. - Windows-only. On other platforms the ribbon button is inert (no-op, no errors). - Disabling/removing the plugin turns protection back off on unload. ## Install (manual / dev) ``` npm install npm run build ``` Then copy (or symlink) `manifest.json`, `main.js`, and `styles.css` into `/.obsidian/plugins/hide-from-capture/`, and enable the plugin from Obsidian's Community Plugins settings. For iterative development, use `npm run dev` (esbuild watch mode) and symlink the plugin folder into your vault so rebuilds are picked up without recopying. ## Verifying it works Press `Win+Shift+S` (Snipping Tool) and try to capture the Obsidian window while protection is enabled — it should appear black or be omitted from the capture. Toggle the ribbon button off and repeat to confirm the window captures normally again.