X-Git-Url: https://git.slaskete.net/einar-bin/blobdiff_plain/c53baa5c435098067dc467ae02dbf33dcc03b766..808e834575c4cf0a65cc9d4c72379c63449f4b5c:/screenshot.sh?ds=sidebyside diff --git a/screenshot.sh b/screenshot.sh index e3b0037..842ff34 100755 --- a/screenshot.sh +++ b/screenshot.sh @@ -20,7 +20,7 @@ function errcho() { function take_screenshot() { FileName="$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 6 | head -n 1).png" - if [ "$@" = "clipboard" ]; then + if [ "$*" = "clipboard" ]; then xclip -out -selection clipboard -t image/png > "/tmp/${FileName}" 2>/dev/null if [ "$(file -b --mime-type "/tmp/${FileName}")" == "image/png" ]; then mv "/tmp/${FileName}" "${LocalPath}/"