Skip to content

Instantly share code, notes, and snippets.

@jb55

jb55/snap.sh Secret

Created January 30, 2018 17:23
Show Gist options
  • Save jb55/4d60e7fa518cd7816d1ba653fe8d9f4a to your computer and use it in GitHub Desktop.
Save jb55/4d60e7fa518cd7816d1ba653fe8d9f4a to your computer and use it in GitHub Desktop.
#!/nix/store/65l6hr8snf4v823f974k97jc65i7bhvf-bash-4.4-p12/bin/bash
SS_DIR="${SHARE_SS_DIR:-$HOME/Dropbox/img/ss}"
SNAP_NOTIFY_MSG="${SNAP_NOTIFY_MSG:-upload complete}"
SNAP_NOTIFY_TITLE="${SNAP_NOTIFY_TITLE:-snap}"
SNAP_NOTIFY_ICON="${SNAP_NOTIFY_ICON:-dialog-information}"
SNAP_NOTIFY_TIMEOUT="${SNAP_NOTIFY_TIMEOUT:-3000}"
export SHARE_SS_DIR="$SS_DIR"
scrot "${SS_DIR}/%b%d-%H%M%S.png" "$@" -e 'hashshare $f' | xclip
notify-send "${SNAP_NOTIFY_TITLE}" \
"${SNAP_NOTIFY_MSG}" \
-t "${SNAP_NOTIFY_TIMEOUT}" \
"--icon=${SNAP_NOTIFY_ICON}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment