|
|
@@ -1,12 +1,17 @@ |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
INDIR="$HOME/wp/curr" |
|
|
|
OUTDIR="$HOME/wp/curr" |
|
|
|
OUTDIR="$HOME/wp/curr/out" |
|
|
|
|
|
|
|
mkdir -p "$OUTDIR" |
|
|
|
|
|
|
|
gravity="Center" |
|
|
|
if [ -e "$INDIR/gravity" ]; then |
|
|
|
gravity="$(cat "$INDIR/gravity")" |
|
|
|
fi |
|
|
|
|
|
|
|
sedstr="\([0-9][0-9]*\)x\([0-9][0-9]*\)+\([0-9][0-9]*\)+\([0-9][0-9]*\)" |
|
|
|
monitors="$(xrandr -q | grep '[0-9]*x[0-9]*+[0-9]*+[0-9]*' | sed 's:^\([^ ]*\).* \([0-9]*x[0-9]*+[0-9]*+[0-9]*\).*$:\1@\2:' | tr '\n' '-')" |
|
|
|
monitors="$(xrandr -q | grep '[0-9]*x[0-9]*+[0-9]*+[0-9]*' | sed 's:^\([^ ]*\).* \([0-9]*x[0-9]*+[0-9]*+[0-9]*\).*$:\1@\2:' | tr '\n' '-')$gravity" |
|
|
|
|
|
|
|
function getinfo() { |
|
|
|
xrandr -q | grep "^$1" | grep -o "[0-9][0-9]*x[0-9][0-9]*+[0-9][0-9]*+[0-9][0-9]*" |
|
|
@@ -83,7 +88,7 @@ function main() { |
|
|
|
shift |
|
|
|
done |
|
|
|
|
|
|
|
run convert -respect-parenthesis "$INDIR/panorama.png" -gravity Center -resize "${off}x${maxh}^" -crop "${off}x${maxh}+0+0^" "${splitargs[@]}" "jpg:/dev/null" |
|
|
|
run convert -respect-parenthesis "$INDIR/panorama.png" -gravity "$gravity" -resize "${off}x${maxh}^" -crop "${off}x${maxh}+0+0^" "${splitargs[@]}" "jpg:/dev/null" |
|
|
|
fi |
|
|
|
|
|
|
|
run convert -respect-parenthesis -size "$(screenres)" 'xc:#000000' "${joinargs[@]}" "$all" |