From ab41b066b057250181e4d795bc5cb6608b9051d8 Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Thu, 13 Jun 2024 05:53:42 +0000 Subject: [PATCH] Update zipline/flameshot.sh --- zipline/flameshot.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zipline/flameshot.sh b/zipline/flameshot.sh index efc3b6a..1f31c9c 100644 --- a/zipline/flameshot.sh +++ b/zipline/flameshot.sh @@ -7,8 +7,10 @@ trap 'rm -f "$temp_file"' EXIT # Replace TOKEN and ZIPLINE_URL with your authorization token and the url to your Zipline instance before use, nothing else needs modified if curl -sS -fH "authorization: TOKEN" https://ZIPLINE_URL/api/upload -F file=@/tmp/ss.png -H "Content-Type: multipart/form-data" >"$temp_file" 2>&1; then - jq -r '.files[0]' <"$temp_file" | tr -d '\n' | xsel -ib - notify-send -a "Flameshot" -u low -h "string:desktop-entry:org.flameshot.Flameshot" "Upload Successful" "Link copied to clipboard" + link=$(jq -r '.files[0]' <"$temp_file" | tr -d '\n') + echo "$link" | xsel -ib + notify-send -a "Flameshot" -u low -i /tmp/ss.png -h "string:desktop-entry:org.flameshot.Flameshot" "Upload Successful" "Link copied to clipboard:\n$link" + rm -f /tmp/ss.png else notify-send -a "Flameshot" -u critical -h "string:desktop-entry:org.flameshot.Flameshot" "Upload Failed" "$(<"$temp_file")" fi