brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: screencapture -o -w grabs a window without the drop shadow

Terminal
~/tips/tip-macos-screencapture-no-shadow

screencapture -o -w ~/Desktop/settings.png

Captures one window as a clean image without the shadow around it.

Window screenshots on a Mac come with a big soft shadow. Great for a presentation, annoying for documentation.

Two flags fix it. -w allows only window selection, and -o leaves out the window shadow.

screencapture -o -w ~/Desktop/settings.png

Your pointer turns into a camera. Click the window and the file lands where you said. Add -c instead of a filename if you want it on the clipboard.

screencapture -o -w -c

The man page is clear that -o only does something in window capture mode. If you use it with a rectangle or a full screen capture, nothing changes.

The caveat is that you now have a window with hard edges on a white page. That looks fine on a dark blog theme and a bit lost on a white one. Try both.

If you write documentation or blog posts about macOS, this saves a round of cropping and editing. The system shortcut can do the same with the Option key, so use whichever you remember.

Further reading: screencapture.1 man page, On this site: screencapture -T 5 takes a screenshot after a delay, On this site: sips -Z shrinks photos from the terminal

More Terminal tips ioreg -rn AppleSmartBattery | grep CycleCount Terminal can save your windows and tabs as a window group Export a Terminal profile to a .terminal file and import it on another Mac mc hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029}]}' All Terminal tips (116) All topics

Link