Skip to content

Instantly share code, notes, and snippets.

@kmosher
Created October 6, 2016 23:20
Show Gist options
  • Save kmosher/c1498b6f73edfd48c243897ea9334f7f to your computer and use it in GitHub Desktop.
Save kmosher/c1498b6f73edfd48c243897ea9334f7f to your computer and use it in GitHub Desktop.
Turn any image into a set of wallpapers to span multiple monitors
#!/bin/bash
display_height=1920
display_width=1200
display_count=3
bg=black
resolution="$(($display_count * $display_width))x$display_height"
convert "$1" -resize $resolution \
-background "$bg" -gravity center -extent $resolution \
-crop "${display_width}x${display_height}" +repage "wallpaper_%d.jpg"%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment