Created
January 3, 2014 19:40
-
-
Save johntyree/8245054 to your computer and use it in GitHub Desktop.
Screenshot with scrot for hotkeys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#GistID: 8245054 | |
# By default we take a full screen shot and name it the current time | |
# If -s is passed as first argument, we do window/selection mode | |
DATETIME=$(date +%F_%T.%N | rev | cut -c 8- | rev) | |
OUTPUTDIR="~/Pictures/Screenshots/" | |
# exec_string="mv \$f $OUTPUTDIR; notify-send -i '$PWD/\$m' '\$f' && rm \$m" | |
exec_string="mv \$f $OUTPUTDIR; rm \$m" | |
scrot "$@" -bt 30% "$DATETIME.png" -e "$exec_string" \ | |
&& copy <<< $(abspath "${OUTPUTDIR}/${DATETIME}.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment