X-Git-Url: https://git.slaskete.net/einar-bin/blobdiff_plain/858e662f521c505898e437c54615c56faae32aee..269e8fe473c36b750b0fb69b924388a18439f449:/screenshot.sh diff --git a/screenshot.sh b/screenshot.sh index 858797a..973b581 100755 --- a/screenshot.sh +++ b/screenshot.sh @@ -19,11 +19,11 @@ function errcho() { } function take_screenshot() { - FILENAME="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6 | head -n 1).png" + FILENAME="$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 6 | head -n 1).png" gnome-screenshot -f "${LOCALPATH}/${FILENAME}" -p "$@" scp -q "${LOCALPATH}/${FILENAME}" "${REMOTEUSER}@${REMOTEHOST}:${REMOTEPATH}" - printf "${URLBASE}/${FILENAME}"|xclip -selection p - printf "${URLBASE}/${FILENAME}"|xclip -selection c + echo -n "${URLBASE}/${FILENAME}"|xclip -selection p + echo -n "${URLBASE}/${FILENAME}"|xclip -selection c notify-send -i applets-screenshooter "screenshot.sh" "Screenshot published to ${URLBASE}/${FILENAME}" }