Skip to content

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–ΌοΈ shotctl β€” macOS Screenshot Settings, From the Terminal

License: MIT macOS Homebrew

A tiny CLI for the macOS screenshot settings that are otherwise buried in defaults write com.apple.screencapture incantations β€” format, save location, window shadow, and filename prefix.

shotctl format jpg
shotctl location ~/Screenshots
shotctl status

πŸ“₯ Installation

brew install sleipner01/tap/shotctl

That's it. Tab completions work immediately β€” no .zshrc changes needed.

To update later: brew upgrade shotctl.

πŸ› οΈ Usage

Command What it does
shotctl format <fmt> Set the screenshot image format
shotctl location <dir> Set the directory screenshots are saved to
shotctl shadow <on|off> Include or drop the window shadow on window captures
shotctl prefix <string> Set the screenshot filename prefix
shotctl status Show all current settings
shotctl reset [setting] Restore one setting β€” or all of them β€” to the macOS default

Plus -h/--help and -v/--version.

Run any setting with no argument and it reports the current value instead of erroring, so you never have to remember the defaults key:

$ shotctl location
location: /Users/you/Screenshots

Change it with:  shotctl location <directory>

Every write is read back and verified, so you find out immediately if macOS didn't take the change.

$ shotctl status
com.apple.screencapture
  format    jpg
  location  /Users/you/Screenshots
  shadow    off
  prefix    Shot

Supported formats

png Β· jpg Β· jpeg Β· pdf Β· tiff Β· gif Β· bmp Β· heic

  • PNG β€” best for UI screenshots, text, graphics (lossless). The macOS default.
  • JPG/JPEG β€” best for photos (lossy, much smaller files)
  • HEIC β€” modern, good compression (macOS 10.13+)
  • PDF β€” vector-friendly, handy for print workflows
  • TIFF β€” large files, high quality (rarely needed)
  • GIF β€” limited use (256 colors)
  • BMP β€” uncompressed, rarely useful

An unrecognised format is passed through with a warning rather than rejected β€” macOS may support formats this list doesn't know about.

πŸ’‘ Why this tool?

I take many screenshots of print products, where the optimal format varies. Switching formats lets me significantly reduce file size on both:

  • internal servers, and
  • the websites where these images are used.

This tool makes that switch instant and painless πŸš€

πŸ“¦ Requirements

macOS. Nothing else β€” the script runs on the zsh that ships with the system.

Note: changing the save location or format affects the built-in screenshot UI (βŒ˜β‡§3 / βŒ˜β‡§4 / βŒ˜β‡§5). The screencapture command-line tool takes an explicit filename and ignores these settings.

πŸš€ Releasing

Tagging is all that's required β€” CI computes the checksum, bumps the Homebrew formula in sleipner01/homebrew-tap, and cuts the GitHub release:

git tag v1.1.0 && git push origin v1.1.0

The VERSION constant in bin/shotctl stays "dev" in git β€” the formula rewrites it at install time from the tag, so it can never drift.

🀝 Contributing

Contributions are welcome! Feel free to:

  • Report bugs or suggest features via Issues
  • Submit pull requests for improvements
  • Share feedback or use cases

πŸ“„ License

MIT License - see LICENSE file for details.

About

Control macOS screenshot settings β€” format, location, shadow, filename prefix πŸ“Έ

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages