Screen Mask
Cover parts of your Windows desktop with overlays you never have to touch.
Screen Mask puts black (or colored, or semi-transparent) rectangles over your
screen to hide things: a second monitor during a call, a notification corner
while recording, a panel you don’t want on a screenshot. The trick is that the
overlays themselves are not interactive. You shape them from a separate control
window that shows a scaled, pixel-ruled map of your whole desktop.

Written in Go against the raw Win32 API. No external dependencies, no runtime,
no installer. One .exe.
- PingTracer-web — Ping monitor in Nim.
- simple-desktop-replay — Always-on rolling replay buffer for the Windows desktop: a low-overhead RAM DVR that keeps the last few minutes of screen so you can save the…
- oss — Network monitor for Windows, local, privacy-respecting, per-app (ETW-first, no Npcap)
- dir-cpu — Real-time CLI that shows CPU usage aggregated by filesystem directory
- videos-to-tomontage-thumbnails — Generate thumbnail montages from video files to quickly identify and browse your video collection
- multi-timer-audio-recorder — Unified controls for stopwatch, timer, and audio recording. Perfect for interviews, workouts, cooking, and productivity sessions.
- clipboard-automation — Cross Platform one-way Clipboard Control Application for Android and iOS, made with Flutter. Compatible with Windows 10, Linux, OSX
Why it works this way
Most masking tools make the mask draggable, so the cover and the controls end up
on the same surface and fight over every click. Screen Mask keeps the cover dumb
and moves all the shaping to a preview window, so a click on your desktop is
never ambiguous. The full argument is in philosophy.md.
Controls
| Action |
Result |
| Drag on empty canvas |
Create a new mask |
| Drag inside a mask |
Move it |
| Drag a blue handle |
Resize it |
| Right-click a mask |
Delete it |
| Click a mask (canvas or list) |
Select it |
Del |
Delete selected mask |
Esc |
Cancel the in-progress drag |
| Opacity slider |
Set the mask’s alpha (8–255) |
| Click-through checkbox |
Let the mouse pass through the overlay |
| Color swatch |
Recolor the mask |
Multi-monitor works out of the box. The canvas represents the full virtual
screen, so masks on a monitor above or to the left of your primary display show
up at negative coordinates, exactly as Windows sees them.
Install
Grab the latest screenmask.exe from the
Releases page and run it.
Nothing to install; it’s a single self-contained executable.
Build from source
Windows-only (every source file is guarded with //go:build windows), but it
cross-compiles from any host:
make build # -> screenmask.exe (GUI subsystem, no console window)
make build-console # keep a console attached for debugging output
make vet
Or without make:
GOOS=windows GOARCH=amd64 go build -ldflags="-H=windowsgui -s -w" -o screenmask.exe .
How it’s built
The control window is a scaled preview of the virtual desktop; every mask you
draw there owns one layered, top-most overlay window on the real desktop, and
edits to the preview are pushed straight to that overlay.

| File |
Responsibility |
main.go |
Entry point, window-class registration, message loop |
win32.go |
Typed syscall bindings, constants, structs |
app.go |
App state, coordinate mapping, window procedure, layout |
canvas.go |
Left pane: hit-testing, mouse handling, drawing |
panel.go |
Right pane: control layout, drawing, interaction |
mask.go |
Mask model and overlay-window lifecycle |
paint.go |
Double-buffered paint of the control window |
Diagram sources live in docs/ as Typst files.
Contributing
Bug reports and pull requests are welcome. See
CONTRIBUTING.md and the
Code of Conduct. To report a security issue, see
SECURITY.md.
License
Apache License 2.0. See LICENSE. If you use this in academic work,
citation metadata is in CITATION.cff.
评论