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 -T 5 takes a screenshot after a delay

Screenshot
~/tips/tip-macos-screencapture-delay

screencapture -T 5 ~/Desktop/menu.png

Takes a screenshot after a few seconds so you can open menus first.

Some things vanish the moment you press a key: a hover tooltip, an open menu, a drag in progress.

screencapture has a timer for that. -T waits a number of seconds before it takes the picture. The man page says the default is 5.

screencapture -T 5 ~/Desktop/menu.png

Run the command, switch to the app, open the menu and wait. Add -x if you do not want the camera sound.

screencapture -x -T 8 ~/Desktop/menu.png

Apple also puts a timer in the screenshot toolbar. Press Shift-Command-5, open Options and pick a delay. The command line version is useful in a script or over SSH sessions where you still have a logged in desktop.

One caveat: the terminal itself may be the thing on screen when the timer ends. Click away from it quickly, or you will get a nice picture of your own prompt.

The delay is also useful for things that need two hands. Start the timer, grab the mouse and the keyboard, and set up the shot while the countdown runs. It is a boring command, but it covers what the normal shortcut cannot.

Further reading: screencapture.1 man page, Take a screenshot or screen recording on Mac (Apple Support), On this site: screencapture -o -w grabs a window without the drop shadow, On this site: softwareupdate –list shows pending macOS updates without opening Settings

More Screenshot tips Tap the preview > Full Page > Done > Save PDF to Files Shift-Command-5 > Options > Show Floating Thumbnail screencapture -R 0,0,1280,720 ~/Desktop/step-1.png All Screenshot tips (4) All topics

Link