Skip to content

Instantly share code, notes, and snippets.

@nejni-marji
Created June 6, 2016 17:47
Show Gist options
  • Save nejni-marji/e631968096180d76c2cd544a1d6c5efb to your computer and use it in GitHub Desktop.
Save nejni-marji/e631968096180d76c2cd544a1d6c5efb to your computer and use it in GitHub Desktop.
#!/bin/bash
export DIR="$HOME/Pictures/Screenshots"
scrot "$@" --exec '
mv $f \$DIR/All/$f &&
mkdir -p \$DIR/%Y/%m/%d/ &&
ln \$DIR/All/$f \$DIR/%Y/%m/%d/%T-$wx$h.$t &&
ln -f \$DIR/All/$f \$DIR/Latest.$t &&
rm \$DIR/Today &&
ln -s \$DIR/%Y/%m/%d \$DIR/Today
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment