Skip to content

Instantly share code, notes, and snippets.

@madprops
Last active August 20, 2023 23:04
Show Gist options
  • Save madprops/6d5dc03aaed936dc3e20d03b87e90d74 to your computer and use it in GitHub Desktop.
Save madprops/6d5dc03aaed936dc3e20d03b87e90d74 to your computer and use it in GitHub Desktop.
Add this to a dolphin actions .desktop file
#!/usr/bin/env bash
input="$1"
output="${input%.*}.jpg"
counter=1
while [ -e "$output" ]; do
output="${input%.*}($counter).jpg"
counter=$((counter + 1))
done
convert -quality 80 "$input" "$output"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment