Pragmatism in the real world

QuickSS: Screenshot the active window on Mac

Back in 2016, I wrote about using QuickGrab to take a screenshot of the active window via a single key press with no mouse use required.

It’s now 2025 and I’m still using this and Apple has announced that Rosetta 2 will be phased out in a couple of years. As QuickGrab is one of the few Intel-only apps I still use, I thought I’d recompile for Apple Silicon and it was then that I ran into trouble:

$ gcc -framework cocoa -x objective-c -o quickgrab quickgrab.m
quickgrab.m:92:26: error: 'CGWindowListCreateImage' is unavailable:
obsoleted in macOS 15.0 - Please use ScreenCaptureKit instead.

Obsoleted in macOS 15.0 isn’t something you want to see! The APIs that QuickGrab use are no longer part of the SDK and so it cannot be compiled. Hence I decided to replace it with a Swift version and also take the opportunity to add additional features that I wanted.

While on holiday, I wrote QuickSS. I spent some time playing around with ScreenCaptureKit, but couldn’t get it to replicate the window shadows that the standard screenshot tool on shift+cmd+4 does. To solve this I decided to use screencapture to take the screenshot which is provided by macOS.

Screenshot to file

To save a screenshot of the active window directly to a file, just run quickss. You probably want to select cmd+tab to a different window, so prefix with sleep:

rob@Caledonia QuickGrab (master *) $ sleep 3; quickss 
Capturing window ID: 5940 [Safari: 'Rob Allen – Pragmatism in the real world']
Screenshot saved to: /Users/rob/Downloads/Screenshot 2025-07-22 at 11.00.00.png

As it’s my app, I made some changes to match the way I work with it. Firstly it defaults to saving the file to the Downloads folder and names it the same as the default screenshot utility. You can use --file to override this should you need to and --quiet will output just the filename which is useful for onward scripting, or displaying in notifications.

Screenshot directly to clipboard

I also added the ability to put the screenshot directly onto the clipboard with --clipboard

$ sleep 3; quickss --clipboard
Capturing window ID: 5940 [Safari: 'Rob Allen – Pragmatism in the real world']
Screenshot copied to clipboard

I can now paste directly into Slack/Discord/Messages/Messenger/WhatsApp/Signal/etc. (Yes, there are far too many of these services nowadays!)

Keyboard shortcut

Obviously, the best way to run this is to use global keyboard shortcuts. My preference is to use ⌃⌥⌘4 to put the screenshot onto the clipboard and ⇧⌃⌥⌘4 to save it to file.

Using Shortcuts.app

You can use the Shortcuts app for this and create a shortcut for copying to clipboard like this:

Quickss take screenshot to cliboard.

The equivalent for saving to file is the same, except that you don’t need the --clipboard parameter.

Using Alfred

I use Alfred for these sort of things, so I wrote a Workflow to do this based on the previous one:

Quickss alfred workflow.

It’s downloadable from the QuickSS latest release page.

That’s it

Over the years, I’ve found that having a global hotkey to screenshot the current active window is really helpful. I like it even more now that it goes directly to the clipboard.

Thoughts? Leave a reply

Your email address will not be published. Required fields are marked *