Skip to content

Instantly share code, notes, and snippets.

@sakkke
Last active October 10, 2021 13:22
Show Gist options
  • Save sakkke/a5452209878e05faf3603bd7be56e508 to your computer and use it in GitHub Desktop.
Save sakkke/a5452209878e05faf3603bd7be56e508 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
screenshots_dir="$HOME/Pictures/screenshots"
[ ! -d "$screenshots_dir" ] && mkdir -vp "$screenshots_dir"
crop="$(crop)"
screenshot_path="$screenshots_dir/screenshot-$(date +%s).jpg"
import -window root -crop "$crop" "$screenshot_path"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment