Skip to content

Instantly share code, notes, and snippets.

@oneandoneis2
Created October 24, 2014 10:44
Show Gist options
  • Save oneandoneis2/abd106aa8ce6842e4758 to your computer and use it in GitHub Desktop.
Save oneandoneis2/abd106aa8ce6842e4758 to your computer and use it in GitHub Desktop.
Xplanet script
#! /bin/sh
# Clear wallpaper first
xsetroot -solid black
while [ 1 ]
do
date
# Generate current Earth & Moon images
xplanet -body moon -geometry 300x300 -num_times 1 \
-glare 0 -output moon.png
xplanet -body earth -geometry 400x400 -num_times 1 -longitude 0 -latitude 51 \
-glare 0 -output earth.png
xplanet -body earth -geometry 1280x1024 -num_times 1 -radius 20 \
-glare 0 -origin sun -config ~/.xplanet/config -output earthmoon.png
# Stitch them into one wallpaper
convert -size 2560x1024 xc:#000000 \
-page +0+0 earthmoon.png \
-page +1370+600 earth.png \
-page +1975+120 moon.png \
-layers flatten wallpaper.png
# Set as wallpaper
qiv -x wallpaper.png
echo " Done"
sleep 15m
done
Also requires config files entries:
$ cat .xplanet/config
[earth]
magnify=30
[moon]
draw_orbit=false
magnify=30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment