summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-03-31 17:26:09 +0200
committerlassulus <lassulus@lassul.us>2020-03-31 17:26:09 +0200
commit07592647d1c19ce4997be05b882f63fb6b562f47 (patch)
treee7121c829e5c0332d30cfac18ca699530870fa51 /krebs/5pkgs
parent274424528464d7f09e65df27a255c2a88af8547f (diff)
realwallpaper: get sun image from sdo
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r--krebs/5pkgs/simple/realwallpaper/default.nix14
1 files changed, 8 insertions, 6 deletions
diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix
index a900a849b..00c185391 100644
--- a/krebs/5pkgs/simple/realwallpaper/default.nix
+++ b/krebs/5pkgs/simple/realwallpaper/default.nix
@@ -73,8 +73,6 @@ pkgs.writers.writeDashBin "generate-wallpaper" ''
cd "$working_dir"
# fetch source images in parallel
- fetch_once sun-raw.png \
- 'http://simpleicon.com/wp-content/uploads/sun-64x64.png' &
fetch_once nightmap-raw.jpg \
'https://eoimages.gsfc.nasa.gov/images/imagerecords/144000/144898/BlackMarble_2016_3km.jpg' &
fetch_once daymap-raw.tif \
@@ -109,6 +107,7 @@ pkgs.writers.writeDashBin "generate-wallpaper" ''
# regular fetches
fetch marker.json "$marker_url" &
+ fetch sun-raw.jpg 'https://sdo.gsfc.nasa.gov/assets/img/latest/latest_512_0171.jpg' &
wait
@@ -117,7 +116,7 @@ pkgs.writers.writeDashBin "generate-wallpaper" ''
${pkgs.nomads-cloud}/bin/nomads-cloud clouds-raw.png
fi
- check_type sun-raw.png image
+ check_type sun-raw.jpg image
check_type nightmap-raw.jpg image
check_type daymap-raw.tif image
check_type ice-raw.jpg image
@@ -168,8 +167,11 @@ pkgs.writers.writeDashBin "generate-wallpaper" ''
convert fire-raw.jpg -fuzz 20% -fill '#ef840c' -opaque white -scale "$in_size" fire.png
fi
- if needs_rebuild sun.png sun-raw.png; then
- convert sun-raw.png -fill gold -opaque black PNG64:sun.png
+ # cut out sun with alpha transparency
+ if needs_rebuild sun.png sun-raw.jpg; then
+ convert sun-raw.jpg \
+ \( +clone -colorspace HSB -fill white -draw "circle 256,256 256,54" -separate -delete 0,1 \) \
+ -compose copyopacity -composite -crop 512x472+0+20 -scale "100x100" sun.png
fi
if needs_rebuild krebs.png krebs-raw.svg; then
@@ -179,7 +181,7 @@ pkgs.writers.writeDashBin "generate-wallpaper" ''
# -- Planets --
for planet in mercury venus mars jupiter saturn uranus neptune; do
if needs_rebuild "$planet".png "$planet"-raw.svg; then
- sed -i 's/#000/#FFFF00/g' "$planet"-raw.svg
+ sed -i 's/#000/#FE8019/g' "$planet"-raw.svg
inkscape -z -e "$planet".png -w 40 -h 40 "$planet"-raw.svg
fi
done