From 66a0eda9481c9c54e408ed2a82c5165d16e8fb9d Mon Sep 17 00:00:00 2001 From: smgr Date: Sun, 2 Nov 2025 23:09:12 -0800 Subject: [PATCH] add render script for reproducible screenshots --- app-config/firefox/alpine-monobiome-dark.xpi | Bin 472 -> 472 bytes app-config/firefox/alpine-monobiome-light.xpi | Bin 471 -> 471 bytes app-config/firefox/alpine-monobiome.xpi | Bin 560 -> 560 bytes .../firefox/badlands-monobiome-dark.xpi | Bin 484 -> 484 bytes .../firefox/badlands-monobiome-light.xpi | Bin 482 -> 482 bytes app-config/firefox/badlands-monobiome.xpi | Bin 577 -> 577 bytes .../firefox/chaparral-monobiome-dark.xpi | Bin 488 -> 488 bytes .../firefox/chaparral-monobiome-light.xpi | Bin 487 -> 487 bytes app-config/firefox/chaparral-monobiome.xpi | Bin 583 -> 583 bytes .../firefox/grassland-monobiome-dark.xpi | Bin 488 -> 488 bytes .../firefox/grassland-monobiome-light.xpi | Bin 487 -> 487 bytes app-config/firefox/grassland-monobiome.xpi | Bin 582 -> 582 bytes app-config/firefox/savanna-monobiome-dark.xpi | Bin 484 -> 484 bytes .../firefox/savanna-monobiome-light.xpi | Bin 484 -> 484 bytes app-config/firefox/savanna-monobiome.xpi | Bin 578 -> 578 bytes app-config/firefox/tundra-monobiome-dark.xpi | Bin 487 -> 487 bytes app-config/firefox/tundra-monobiome-light.xpi | Bin 484 -> 484 bytes app-config/firefox/tundra-monobiome.xpi | Bin 580 -> 580 bytes generate.sh => scripts/generate.sh | 4 ++ scripts/render.sh | 35 ++++++++++++++++++ scripts/screens.sh | 18 +++++++++ 21 files changed, 57 insertions(+) rename generate.sh => scripts/generate.sh (78%) create mode 100644 scripts/render.sh create mode 100644 scripts/screens.sh diff --git a/app-config/firefox/alpine-monobiome-dark.xpi b/app-config/firefox/alpine-monobiome-dark.xpi index 869164a1038a67a06a6a23256f6e50e7e77b45c8..acdaa5ba30dba4a57764df1529201af955ab1db7 100644 GIT binary patch delta 51 zcmcb?e1n-cz?+#xgnj2 AJ^%m! delta 51 zcmcb?e1n-cz?+#xgnNP&a`yjj^8fPfJQ LgMsu7Mi37Gfff(Y delta 71 zcmX@ea*%~Lz?+#xgnc(bxG00AQq L1_S9Ej36EWWf~6d diff --git a/app-config/firefox/chaparral-monobiome-dark.xpi b/app-config/firefox/chaparral-monobiome-dark.xpi index b78a946ae2e1f3a2185a5bfb969f77c9c8a75836..f04a061fcc47816fe98e054504fda148434f508c 100644 GIT binary patch delta 51 zcmaFC{DPS`z?+#xgnc(bxG00AQq L1_SAvj36EWW$zC2 diff --git a/app-config/firefox/tundra-monobiome-dark.xpi b/app-config/firefox/tundra-monobiome-dark.xpi index 9d7bb97b26469ba14b9029b60b2640cea5c3a5a0..431a7958be181b249560b99100fbb4236b284d4a 100644 GIT binary patch delta 51 zcmaFP{G6FLz?+#xgnt<8 delta 51 zcmX@Ya)gC9z?+#xgn/dev/null + +# get the spawned window geometry +sleep 2 +geom=$(swaymsg -t get_tree | jq -r --arg t "$title" '.. | select(.name? == $t) | .rect | "\(.x),\(.y) \(.width)x\(.height)"') +wgeom=$(swaymsg -t get_tree | jq -r --arg t "$title" '.. | select(.name? == $t) | .window_rect | "\(.x),\(.y) \(.width)x\(.height)"') + +read gx gy _ < <(awk -F'[ ,x]' '{print $1,$2}' <<<"$geom") +read wx wy ww wh < <(awk -F'[ ,x]' '{print $1,$2,$3,$4}' <<<"$wgeom") +inner_geom="$((gx+wx)),$((gy+wy)) ${ww}x${wh}" + +echo title=$title +echo geom=$geom +echo out=$out + +# take a screenshot +mkdir -p "$(dirname "$out")" +grim -g "$inner_geom" "$out" +echo "saved: $out" + diff --git a/scripts/screens.sh b/scripts/screens.sh new file mode 100644 index 0000000..5f23081 --- /dev/null +++ b/scripts/screens.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail + +script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +render_script="$script_dir/render.sh" + +biomes=(alpine badlands chaparral savanna grassland tundra) +modes=(light dark) + +for biome in "${biomes[@]}"; do + for mode in "${modes[@]}"; do + symconf config -m "$mode" -s "default-$biome-monobiome" + sleep 5 + "$render_script" 800 600 nvim \ + +':highlight Cursor blend=100' \ + +':set guicursor=n:block-Cursor' \ + +':silent! setlocal nonumber nocursorline signcolumn=no foldcolumn=no' \ + examples/runner.py