From ef5d440b576d4233dc168383f441928b42716900 Mon Sep 17 00:00:00 2001 From: mr-flamous <131661276+mr-flamous@users.noreply.github.com> Date: Sat, 29 Apr 2023 10:03:33 +0300 Subject: [PATCH] --- screenshot.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/screenshot.sh b/screenshot.sh index 6d94d6a..be28cc9 100755 --- a/screenshot.sh +++ b/screenshot.sh @@ -10,13 +10,13 @@ if [[ "$1" == "-s" ]]; then IMAGENAME="$(date +'%d_%m_%Y-%H_%M_%S_%3N')" FILE="$IMAGEPATH$IMAGENAME.png" xclip -t image/png -sel clip -o > "$FILE" - URL=$(curl -F "file=@$FILE" https://x0.at/ 2>/dev/null) + URL=$(xclip -t image/png -sel clip -o | curl -F "file=@-;filename=.png" -Fsecret= https://0x0.st/ 2>/dev/null) printf "%s" "$URL" | xclip -sel clip echo "$URL" notify-send "Screenshot copied" "$URL" -# -c: copy data from clipboard and upload to x0.at +# -c: copy elif [[ "$1" == "-c" ]]; then - URL=$(xclip -t image/png -sel clip -o | curl -F "file=@-" https://x0.at/ 2>/dev/null) + URL=$(xclip -t image/png -sel clip -o | curl -F "file=@-;" -Fsecret= https://0x0.st/ 2>/dev/null) printf "%s" "$URL" | xclip -sel clip echo "$URL" notify-send "Data copied" "$URL"