fix issue with clipboard-save

This commit is contained in:
Sam 2024-08-15 13:32:04 +01:00
parent f6b8aeca69
commit f3ad132675
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@
*image*) *image*)
echo "$(${xclip}/bin/xclip -selection clipboard -t TARGETS -o)" echo "$(${xclip}/bin/xclip -selection clipboard -t TARGETS -o)"
filename=$(${xclip}/bin/xclip -selection clipboard -t image/png -o | ${openssl}/bin/openssl sha1 | cut -b 49-) filename=$(${xclip}/bin/xclip -selection clipboard -t image/png -o | ${openssl}/bin/openssl sha1 | cut -b 49-)
file_exists=$(/bin/ls $image_location | grep $filename | sed "s/\..*//") file_exists=$(ls $image_location | grep $filename | sed "s/\..*//")
[[ $filename != "$file_exists" ]] && [[ $filename != "$file_exists" ]] &&
xclip -selection clipboard -t image/png -o > "$image_location/$filename.png" && xclip -selection clipboard -t image/png -o > "$image_location/$filename.png" &&
notify-send -t 5000 "Image Copied" "$image_location/$filename.png" notify-send -t 5000 "Image Copied" "$image_location/$filename.png"
@ -22,7 +22,7 @@
*UTF8_STRING*) *UTF8_STRING*)
echo "$(${xclip}/bin/xclip -selection clipboard -t TARGETS -o)" echo "$(${xclip}/bin/xclip -selection clipboard -t TARGETS -o)"
filename=$(${xclip}/bin/xclip -selection clipboard -t UTF8_STRING -o | ${openssl}/bin/openssl sha1 | cut -b 49-) filename=$(${xclip}/bin/xclip -selection clipboard -t UTF8_STRING -o | ${openssl}/bin/openssl sha1 | cut -b 49-)
file_exists=$(/bin/ls "$text_location" | grep "$filename" | sed "s/\..*//") file_exists=$(ls "$text_location" | grep "$filename" | sed "s/\..*//")
echo "$filename" "$file_exists" echo "$filename" "$file_exists"
[[ "$filename" != "$file_exists" ]] && [[ "$filename" != "$file_exists" ]] &&
xclip -selection clipboard -t UTF8_STRING -o > "$text_location/$filename" xclip -selection clipboard -t UTF8_STRING -o > "$text_location/$filename"

View File

@ -22,7 +22,7 @@
clipboard-image-recall /tmp/clipboard/images/ clipboard-image-recall /tmp/clipboard/images/
Print Print
flameshot gui env QT_AUTO_SCREEN_SCALE_FACTOR=1.5 QT_SCREEN_SCALE_FACTORS="" flameshot gui
control + F7 control + F7
emoji-picker emoji-picker