Mac Screenshot Improvement
Sam Cooper Automation for Mac Screenshot Naming and Annotation
I find myself taking screenshots often.
Like, really often.
Between Slack messaging and AI uploads the ability to be nimble with screenshotting is a must.
This small bit of automation and hotkey combo address the major deficiencies with the Mac's "out of the box" snapshot setup:
a) it's hard to find a snapshot
b) the generic timestamped name is not helpful
The Basics
A quick review:
Cmd-Shift-3- hotkey combo to snap the whole screenCmd-Shift-4- my previous goto, the hotkey option which snaps a windowCmd-Shift-5- bring up the GUI to manage screenshotting (to modify the default folder where snapshots land: select the `Options > Other location...` menu item).
Baby Steps unto now
The limits of my screenshotting customization up until this point have been to change the default folder from ~/Desktop to ~/Documents/screenshots
This folder is now filled with screenshot sprawl.
I have gajillion files with names like screenshot_2025-01-26_15-12-47.
This isn't the worst. I can flip through them, previewing and finding what I need to usually...
But what if I know that I'm taking a screenshot that I'm going to want to find again?
Enter some simple automation:
Preview is the focal point on the Mac for screenshots since it's the default image viewer and Preview has decent image annotation tools.
The goal of this exercise will be to streamline our Preview workflow:
- When I perform a custom screenshot have the file opened in Preview automatically (navigating in the Finder down to the most recent snapshot is painful).
- Allow for easy renaming of the screenshot. Snapshots happen fast and I want to be able to rename them quickly while the file is in front of me.
1. Custom Snapshot that opens in Preview
- Add another hotkey combo (
Cmd-Shift-8) that takes the screenshot - Once captured the image will open in Preview immediately
Overview
There is a CLI tool in Mac OS that performs screenshots: screencapture.
We can drive it via an applescript.
I prefer to capture just the window so have called it with -W in the script below. Bonus: while in capture mode you can hit the spacebar to go into crosshair mode.
The applescript can be created in Automator as a Quick Action.
It will then be available in your keyboard shortcuts.
Instructions
1. Create a ~/Documents/screenshots directory
2. Open Automator
3. Create a new Quick Action using the intro screen or File > New should get you going.
4. Change the Workflow recieves current selection to no input and leave it set to any application
5. From the left side of Automator search for Run Applescript and drag it into the automation window.
6. Paste the below code into the script window:
on run {input, parameters}
set screenshotsPath to POSIX path of (path to documents folder) & "screenshots/"
set timeStamp to do shell script "date +%Y-%m-%d_%H-%M-%S"
set fileName to "screenshot_" & timeStamp & ".png"
do shell script "screencapture -W " & quoted form of (screenshotsPath & fileName)
do shell script "open " & quoted form of (screenshotsPath & fileName)
return input
end run 7. Test the Applescript by hitting the "Play" (Arrow) button.
8. Save the Quick Action and call it ScreenshotAndOpen.
9. To setup the keyboard shortcut: Open System Preferences and go to the Keyboard screen.
10. Select the Keyboard Shortcuts... button.
11. From the categories on the left hand side select Services
12. Then in the checkbox box option displayed in the main windows open the General group and you should see your QuickAction called ScreenshotAndOpen.
13. Double click on the keycombo box on the right hand side and you will be able to put in your custom key combination. I've gone with Cmd-Shift-8 to make it similar to the previous screen capture combinations (with the 8 key being a bit easier to reach).
A note about System Preferences > Screen and System Audio Recording
When you create your own script to do the screen capture you will need to enable it for each App.
You can control this in your:
System Preferences > Privacy & Security > Screen & System Audio RecordingThere you can allow access.
Perform this for apps you are using to screenshot and you should be set.
You should now be able to take screenshots using Cmd-Shift-8 and have them open up right away in Preview.
2. Allow for easy renaming of the screenshot
Preview has a hotkey combo for Save As, but not for Save. (which is what we need here)
There is a File > Rename... option that is exactly what we want (but alas no hotkey).
Fortunately, Keyboard Shortcuts supports us making an Application shortcut based on the menu name.
You can set this up so any App with the menu item `Rename...` can be triggered with Cmd-Shift-R
Conclusion
With that, you have a nice hotkey driven snapshotting solution.
I use it all the time:
Cmd-Shift-8- (wait a sec for automation)
Enter- (wait for it to open in Preview)
Cmd-Shift-R- Punch out a quick descriptive name
Bonus tip: To copy a doc in Mac when you have it live in front of you:
Click and hold on the mini doc icon in the top center of any document.
With a split second hold you can now drag/drop that file anywhere.
Note: these instructions were written using Mac OS Sequoia 15.2