X-Git-Url: https://git.slaskete.net/einar-bin/blobdiff_plain/1facd0220e9c5fdc07e7dea2d8aa7707ce4b7887..85e66018144ee26e09e833ce155bfc47a25b0ad4:/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}" }