Easier way to configure wether or not the previews are scaled down
This commit is contained in:
parent
558d071fdd
commit
5f6991b08f
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
vips resize "$croppedfile" "$scaledfile" 0.1
|
if [ "$SCALE_PREVIEW" = "true" ]; then
|
||||||
mv -f "$scaledfile" "$filepath"
|
vips resize "$croppedfile" "$scaledfile" 0.1
|
||||||
|
mv -f "$scaledfile" "$filepath"
|
||||||
|
else
|
||||||
|
mv -f "$croppedfile" "$filepath"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
keycombo(){
|
keycombo(){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user