Fix fluxbox wallpaper (and change it to be a checkerboard)

This commit is contained in:
Georges Dupéron 2018-07-03 19:59:35 +02:00
parent f1b58e16c2
commit dede351e63

View File

@ -7,17 +7,23 @@ shift # the following arguments are the program to execute and its arg
bg="$(mktemp --suffix='.png')"
fb_cfg="$(mktemp --suffix='fluxbox.cfg')"
fb_sty="$(mktemp --suffix='fluxbox.style')"
# Create solid black background
convert -size 16x16 xc:black "$bg"
convert -size "$(echo "$resolution" | cut -d 'x' -f1-2)" tile:pattern:checkerboard "$bg"
# Create minimalist fluxbox configuration
cat > "$fb_cfg" <<EOF
cat > "$fb_sty" <<EOF
background: fullscreen
background.pixmap: $bg
EOF
cat > "$fb_cfg" <<EOF
session.styleFile: $fb_sty
EOF
xvfb-run -a --server-args="-screen 0 ${resolution}" sh -c 'fluxbox -rc '"$fb_cfg"' 2>/dev/null & sleep 3; "$@"' utils/gui-wrapper.sh-subshell "$@"
# Cleanup
rm "$bg" "$fb_cfg"
rm "$bg" "$fb_cfg"