17 lines
784 B
Bash
Executable file
17 lines
784 B
Bash
Executable file
#!/bin/sh
|
|
TEMP_IMAGE_PATH="/tmp/ion.png"
|
|
script_dir="$(dirname "$(realpath "$0")")" #DONOTMODIFY
|
|
UPLOAD_SCRIPT_PATH="${script_dir}/plasma_upload.sh" #Only modify if you changed the upload script name or path
|
|
|
|
spectacle -rbn -o $TEMP_IMAGE_PATH
|
|
if [ -f $TEMP_IMAGE_PATH ]; then
|
|
cjpegli -d 0 --chroma_subsampling=444 $TEMP_IMAGE_PATH $TEMP_IMAGE_PATH.jpeg
|
|
#oxipng -s -o max $TEMP_IMAGE_PATH
|
|
#cjpeg -optimize -progressive -quality 100 $TEMP_IMAGE_PATH > $TEMP_IMAGE_PATH.jpeg
|
|
rm $TEMP_IMAGE_PATH -v
|
|
|
|
"${UPLOAD_SCRIPT_PATH}" $TEMP_IMAGE_PATH.jpeg #change this to $TEMP_IMAGE_PATH without jpeg at the end when using oxipng!!!!
|
|
exit
|
|
fi
|
|
kdialog --passivepopup "Cancelled!" 5
|
|
ffplay /usr/share/sounds/ocean/stereo/completion-partial.oga -hide_banner -autoexit -nodisp
|