#!/bin/sh set -e resolution="$1" # e.g. 800x600x24 (width x height x bits_per_pixel) shift # the following arguments are the program to execute and its arguments bg="build/checkerboard_$(echo "$resolution" | cut -d 'x' -f1-2).xbm" twm_session_dir="$(./utils/mktemp.sh -d)" anim="$(./utils/mktemp.sh -d)" # Create checkerboard background # Use +level-colors 'gray(192),gray(128)' to choose directly the colors. # Since we're creating an .xbm for xsetroot, we'll use black and white # and choose the colors with xsetroot. convert -size "$(echo "$resolution" | cut -d 'x' -f1-2)" \ tile:pattern:checkerboard \ -auto-level \ "$bg" cat > "build/twm_cfg" <