Usage
Take, select, and mark up screenshots
sweetshot region # select a rectangle
sweetshot output # output of the focused window
sweetshot output DP-1 # a named output
sweetshot window # focused windowBy default a shot is saved as a PNG and copied to the clipboard. The saved path is printed on stdout.
output without a name falls back to the first output if Sweets can't be
asked for the focused window. window captures the window focused when
sweetshot started, without its border.
Reference
| Command | Does |
|---|---|
region | Select a rectangle, then capture it |
output [NAME] | Capture a whole output |
window | Capture the focused window |
| Option | Does |
|---|---|
--file | Save to a file only |
--clip | Copy to the clipboard only |
--dir <path> | Save to another directory. Must be absolute |
--cursor | Include the pointer |
--edit | Mark up the shot before saving |
| Exit code | Meaning |
|---|---|
0 | Done |
1 | Failed, also partly |
2 | Usage error or unknown output |
3 | Cancelled |
Region selector
The screen freezes while you select, so menus and tooltips stay in the shot.
| Input | Action |
|---|---|
| Drag | Select |
| Drag inside the selection | Move it |
| Click | Whole output. Outside a selection, clear it |
| Arrows | Move by 1 px. Ctrl: 10 px |
| Shift+Arrows | Resize by 1 px. Ctrl: 10 px |
Tab | Next output |
P | Show or hide the pointer |
Enter | Capture |
Esc | Cancel |
Editor
--edit opens the shot in an editor before saving. It works with every
command.
sweetshot region --editDrag to draw, Enter saves, Esc cancels. The toolbar does the same as the
keys. Tab hides it.
Keys are physical positions on a US layout.
| Key | Action |
|---|---|
A, L, R, E | Arrow (default), line, rectangle, ellipse |
D, H, X | Pen, highlighter, pixelate |
N | Numbered badge. Click to place |
F | Fill rectangles and ellipses |
1–9 | Red, orange, yellow, green, blue, purple, pink, white, black |
- / =, wheel | Thinner / thicker |
| Shift while drawing | 45° lines, squares, circles |
| Right button while drawing | Drop the shape |
Ctrl+Z | Undo |
Ctrl+Shift+Z, Ctrl+Y | Redo |
Saving
Shots go to Screenshots inside your pictures directory:
$XDG_PICTURES_DIR/ScreenshotsXDG_PICTURES_DIRfromuser-dirs.dirs, plus/Screenshots~/Pictures/Screenshots
The directory is created if missing. Use --dir to pick another one.
Files are never overwritten or left half-written.
- On Linux this needs
O_TMPFILE: ext4, btrfs, xfs, and tmpfs work. vfat, exFAT, and most FUSE mounts are refused. - On FreeBSD the file is written under a hidden
.sweetshot-*.tmpname and renamed when complete. A crash in between can leave that file behind. - On FAT, the mount sets the file's permissions.