Skip to content

Instantly share code, notes, and snippets.

@iArnaud
Forked from andytlr/screenshots.sh
Created May 16, 2014 14:41
Show Gist options
  • Save iArnaud/cad9352888463b2c3472 to your computer and use it in GitHub Desktop.
Save iArnaud/cad9352888463b2c3472 to your computer and use it in GitHub Desktop.
# This version uses 'imguru' to also upload to Imgur.
# Get it here: https://github.com/FigBug/imguru
# It won't work if it isn't in your path
# I use ZSH so I needed to set Alfred to use ZSH.
# Opens output in default browser and copys it to the clipboard.
mkdir ~/Dropbox/Screenshots/
timestamp=`date '+%Y%m%d-%k%M%S'`
screencapture -i -o ~/Dropbox/Screenshots/ss-$timestamp.png
imgururl=`imguru ~/Dropbox/Screenshots/ss-$timestamp.png`
open $imgururl
echo $imgururl | pbcopy
# This will capture a selection. Hit space to change to window selection.
# The -o removes the window shadow from window selections.
# If you digg that, remove it.
# Trigger with Alfred.app using a hotkey.
# I'm using `Opt` + `Shift` + `4` so it almost matches the system version
# but uses `Opt` instead of `Cmd`.
mkdir ~/Dropbox/Screenshots/
screencapture -i -o ~/Dropbox/Screenshots/ss-`date '+%Y%m%d-%k%M%S'`.png
open ~/Dropbox/Screenshots/
# This will capture the whole screen but only capture the *current* monitor.
# Not both.
# Trigger with Alfred.app using a hotkey.
# I'm using `Opt` + `Shift` + `3` so it almost matches the system version
# but uses `Opt` instead of `Cmd`.
mkdir ~/Dropbox/Screenshots/
screencapture -m ~/Dropbox/Screenshots/ss-`date '+%Y%m%d-%k%M%S'`.png
open ~/Dropbox/Screenshots/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment