Easier way to configure wether or not the previews are scaled down

This commit is contained in:
Kuba Orlik 2022-08-25 17:03:39 +02:00
parent 558d071fdd
commit 5f6991b08f
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
export DISPLAY=:0 export DISPLAY=:0
export SCALE_PREVIEW=true # make the previews really small so you only have a small idea of what the server sees
INPUT="$1" INPUT="$1"
ID=$2 ID=$2

View File

@ -75,8 +75,12 @@ grab_screen_to_public(){
rm -f "$tempfile" rm -f "$tempfile"
scrot "$tempfile" scrot "$tempfile"
vips crop "$tempfile" "$croppedfile" 0 24 2856 1564 vips crop "$tempfile" "$croppedfile" 0 24 2856 1564
if [ "$SCALE_PREVIEW" = "true" ]; then
vips resize "$croppedfile" "$scaledfile" 0.1 vips resize "$croppedfile" "$scaledfile" 0.1
mv -f "$scaledfile" "$filepath" mv -f "$scaledfile" "$filepath"
else
mv -f "$croppedfile" "$filepath"
fi
} }
keycombo(){ keycombo(){