Replacing Dropbox Capture with Raycast

Published
Last updated

The other week I found out that Dropbox is shutting down the Dropbox Capture app and service:

Matt Hamlin

Matt Hamlin

@matthamlin.me

Damn, now looking for a good screenshot and screen recording mac app!
Screenshot of an email from Dropbox announcing that Dropbox Capture will be discontinued on March 24th 2025
20 days agoView on bsky.app
2
1
0
0

For those that don't know, Dropbox Capture provided a really nice user experience for taking screenshots and screen recordings, automatically uploading them to Dropbox, and then copying a share link to easily share all in one go.

I basically used it every day, whether it was capturing a screenshot for a code change I was working on, or clipping a meme somewhere to share in a Discord chat - I heavily used the tool!

Now that its being shut down however, I started to look for a replacement.

I tried out a few of the options that folks recommended, and even tried to go back to the native macOS Screenshot utility, but none seemed to provide the nice UX of both saving the file to my Dropbox but also copying it to the clipboard to let me share it immediately as well.

I then stumbled across this blog post which shared a quick shell script and Apple Shortcut to run the script based on a keyboard shortcut.

I tested this workflow out for a bit but it seemed a bit hit or miss on if the keyboard shortcut would trigger the script. After a bit of messing around with it - I think I found a sweet spot building on the script but using Raycast instead of Shortcuts to manage the keyboard shortcut part for me! The gist was using Raycast's Script Command feature!

Here's how I built out my "Better Screenshot" workflow using Raycast:

  1. Open Raycast
  2. Search for Create Script Command
  3. Choose the following:
    1. Template: Bash
    2. Mode: Silent
    3. Title: Whatever you want! I called it Better Screenshot
    4. You can leave the rest of the inputs as-is / blank
    5. Create the script

Within the created script, you'll want to paste in the following snippet (copied and slightly edited from the above linked blog post):

1#!/bin/bash
2
3# Required parameters:
4# @raycast.schemaVersion 1
5# @raycast.title Better Screenshot
6# @raycast.mode silent
7
8# Optional parameters:
9# @raycast.icon 🤖
10
11# Documentation:
12# @raycast.author <your name>
13# @raycast.authorURL <your URL>
14
15# Usage:
16#
17# $ better-screenshot
18#
19# Then, either:
20# - drag and release the mouse to select an area to screenshot
21# - press spacebar and click the mouse to select the current window
22
23# Construct a unique-ish filename like:
24# screenshot-2024-03-16-16h43m48s.png
25isoTime=$(date +"%Y-%m-%d-%Hh%Mm%Ss")
26fileName="$HOME/Library/CloudStorage/Dropbox/Capture/screenshot-$isoTime.png"
27
28# The -i will put the Screenshot app into interactive mode (like cmd-shift-4)
29screencapture -i "$fileName"
30
31if [ -f "$fileName" ]; then
32 # This gnarly "«class PNGf»" incantation is for some reason necessary to copy the file
33 osascript -e "set the clipboard to (read (POSIX file \"${fileName}\") as «class PNGf»)"
34fi
1#!/bin/bash
2
3# Required parameters:
4# @raycast.schemaVersion 1
5# @raycast.title Better Screenshot
6# @raycast.mode silent
7
8# Optional parameters:
9# @raycast.icon 🤖
10
11# Documentation:
12# @raycast.author <your name>
13# @raycast.authorURL <your URL>
14
15# Usage:
16#
17# $ better-screenshot
18#
19# Then, either:
20# - drag and release the mouse to select an area to screenshot
21# - press spacebar and click the mouse to select the current window
22
23# Construct a unique-ish filename like:
24# screenshot-2024-03-16-16h43m48s.png
25isoTime=$(date +"%Y-%m-%d-%Hh%Mm%Ss")
26fileName="$HOME/Library/CloudStorage/Dropbox/Capture/screenshot-$isoTime.png"
27
28# The -i will put the Screenshot app into interactive mode (like cmd-shift-4)
29screencapture -i "$fileName"
30
31if [ -f "$fileName" ]; then
32 # This gnarly "«class PNGf»" incantation is for some reason necessary to copy the file
33 osascript -e "set the clipboard to (read (POSIX file \"${fileName}\") as «class PNGf»)"
34fi

You can then save the file and jump back into Raycast.

Open Raycast and then open it's settings (e.g. Cmd + ,), go to Extensions, and search for the name of your Script Command, e.g. Better Screenshot, once you find it in the table - you'll want to record a keyboard shortcut for it. I opted to use the same shortcut that Dropbox Capture used for screenshots (Option + shift + s).

Now when you hit that keyboard short cut it should show the screenshot cursor allowing you to click and drag to select an area of the screen, and once you do it will both copy the screenshot to the clipboard and also save the file to the location in the script above.

A quick note on the file location in the script above - this assumes you're storing the file in the Dropbox/Capture/ directory. Additionally - I found that you need to update/opt-in to some feature within the Dropbox mac app to have the Dropbox drive mounted under ~/Library/CloudStorage.