diff --git a/.gitignore b/.gitignore index 868ce8a..bedd9b4 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,3 @@ /_build .vscode -screenshots/ \ No newline at end of file diff --git a/README.md b/README.md index f007ca9..23a9ab9 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ from the root of the repository. To generate screenshots in a variety of common sizes, build unl0kr and then run ``` -$ sudo ./generate-screenshots _build/unl0kr +$ sudo ./regenerate-screenshots _build/unl0kr ``` where `_build/unl0kr` is the location of the unl0kr binary. Note that you may have to adapt some of the settings inside the script depending on the device you're using to generate the screenshots. diff --git a/generate-screenshots.sh b/regenerate-screenshots.sh similarity index 56% rename from generate-screenshots.sh rename to regenerate-screenshots.sh index b53f06a..8041212 100755 --- a/generate-screenshots.sh +++ b/regenerate-screenshots.sh @@ -7,6 +7,14 @@ fb_format=rgba unl0kr=$1 outdir=screenshots +config=unl0kr-screenshots.conf + +themes=( + breezy-light + breezy-dark + pmos-light + pmos-dark +) resolutions=( # Nokia N900 @@ -26,7 +34,7 @@ resolutions=( 1920x1080 ) -if [[ ! -x $unl0kr ]]; then +if [[ ! -f $unl0kr || ! -x $unl0kr ]]; then echo "Error: Could not find unl0kr executable at $unl0kr" 1>&2 exit 1 fi @@ -34,12 +42,42 @@ fi exec 1>/dev/null exec 2>/dev/null +function write_config() { + cat << EOF > $config +[general] +animations=true + +[keyboard] +autohide=false +layout=de +popovers=true + +[textarea] +obscured=true + +[theme] +default=$1 +EOF +} + +function nuke_config() { + rm -f $config +} + +trap "nuke_config" EXIT + rm -rf "$outdir" mkdir "$outdir" -for res in ${resolutions[@]}; do - for theme in light dark; do - CRYPTTAB_SOURCE=/dev/sda1 $unl0kr -g $res -c unl0kr-screenshots.conf -C unl0kr-screenshots-$theme.conf & +readme="# Unl0kr themes"$'\n' + +for theme in ${themes[@]}; do + write_config $theme + + readme="$readme"$'\n'"## $theme"$'\n\n' + + for res in ${resolutions[@]}; do + CRYPTTAB_SOURCE=/dev/sda1 $unl0kr -g $res -c unl0kr-screenshots.conf & pid=$! sleep 2 @@ -48,5 +86,9 @@ for res in ${resolutions[@]}; do convert -size $fb_res -depth $fb_depth $fb_format:"$outdir/$res" -crop $res+0+0 "$outdir/$theme-$res.png" rm "$outdir/$res" kill -9 $pid + + readme="$readme\"$res\""$'\n' done done + +echo -n "$readme" > "$outdir/README.md" diff --git a/screenshots/README.md b/screenshots/README.md new file mode 100644 index 0000000..a396ddc --- /dev/null +++ b/screenshots/README.md @@ -0,0 +1,49 @@ +# Unl0kr themes + +## breezy-light + +480x800 +800x480 +540x960 +960x540 +768x1024 +1024x768 +1280x800 +1440x720 +1920x1080 + +## breezy-dark + +480x800 +800x480 +540x960 +960x540 +768x1024 +1024x768 +1280x800 +1440x720 +1920x1080 + +## pmos-light + +480x800 +800x480 +540x960 +960x540 +768x1024 +1024x768 +1280x800 +1440x720 +1920x1080 + +## pmos-dark + +480x800 +800x480 +540x960 +960x540 +768x1024 +1024x768 +1280x800 +1440x720 +1920x1080 diff --git a/screenshots/breezy-dark-1024x768.png b/screenshots/breezy-dark-1024x768.png new file mode 100644 index 0000000..aed3712 Binary files /dev/null and b/screenshots/breezy-dark-1024x768.png differ diff --git a/screenshots/breezy-dark-1280x800.png b/screenshots/breezy-dark-1280x800.png new file mode 100644 index 0000000..2bf6131 Binary files /dev/null and b/screenshots/breezy-dark-1280x800.png differ diff --git a/screenshots/breezy-dark-1440x720.png b/screenshots/breezy-dark-1440x720.png new file mode 100644 index 0000000..a8a3000 Binary files /dev/null and b/screenshots/breezy-dark-1440x720.png differ diff --git a/screenshots/breezy-dark-1920x1080.png b/screenshots/breezy-dark-1920x1080.png new file mode 100644 index 0000000..149b562 Binary files /dev/null and b/screenshots/breezy-dark-1920x1080.png differ diff --git a/screenshots/breezy-dark-480x800.png b/screenshots/breezy-dark-480x800.png new file mode 100644 index 0000000..4626403 Binary files /dev/null and b/screenshots/breezy-dark-480x800.png differ diff --git a/screenshots/breezy-dark-540x960.png b/screenshots/breezy-dark-540x960.png new file mode 100644 index 0000000..ed55c7a Binary files /dev/null and b/screenshots/breezy-dark-540x960.png differ diff --git a/screenshots/breezy-dark-768x1024.png b/screenshots/breezy-dark-768x1024.png new file mode 100644 index 0000000..2ea77d1 Binary files /dev/null and b/screenshots/breezy-dark-768x1024.png differ diff --git a/screenshots/breezy-dark-800x480.png b/screenshots/breezy-dark-800x480.png new file mode 100644 index 0000000..98d7bbd Binary files /dev/null and b/screenshots/breezy-dark-800x480.png differ diff --git a/screenshots/breezy-dark-960x540.png b/screenshots/breezy-dark-960x540.png new file mode 100644 index 0000000..57ba935 Binary files /dev/null and b/screenshots/breezy-dark-960x540.png differ diff --git a/screenshots/breezy-light-1024x768.png b/screenshots/breezy-light-1024x768.png new file mode 100644 index 0000000..de421e6 Binary files /dev/null and b/screenshots/breezy-light-1024x768.png differ diff --git a/screenshots/breezy-light-1280x800.png b/screenshots/breezy-light-1280x800.png new file mode 100644 index 0000000..9756121 Binary files /dev/null and b/screenshots/breezy-light-1280x800.png differ diff --git a/screenshots/breezy-light-1440x720.png b/screenshots/breezy-light-1440x720.png new file mode 100644 index 0000000..b6ed051 Binary files /dev/null and b/screenshots/breezy-light-1440x720.png differ diff --git a/screenshots/breezy-light-1920x1080.png b/screenshots/breezy-light-1920x1080.png new file mode 100644 index 0000000..957f0a7 Binary files /dev/null and b/screenshots/breezy-light-1920x1080.png differ diff --git a/screenshots/breezy-light-480x800.png b/screenshots/breezy-light-480x800.png new file mode 100644 index 0000000..149b1d3 Binary files /dev/null and b/screenshots/breezy-light-480x800.png differ diff --git a/screenshots/breezy-light-540x960.png b/screenshots/breezy-light-540x960.png new file mode 100644 index 0000000..d7c681d Binary files /dev/null and b/screenshots/breezy-light-540x960.png differ diff --git a/screenshots/breezy-light-768x1024.png b/screenshots/breezy-light-768x1024.png new file mode 100644 index 0000000..957c6e6 Binary files /dev/null and b/screenshots/breezy-light-768x1024.png differ diff --git a/screenshots/breezy-light-800x480.png b/screenshots/breezy-light-800x480.png new file mode 100644 index 0000000..2e28519 Binary files /dev/null and b/screenshots/breezy-light-800x480.png differ diff --git a/screenshots/breezy-light-960x540.png b/screenshots/breezy-light-960x540.png new file mode 100644 index 0000000..a2f3379 Binary files /dev/null and b/screenshots/breezy-light-960x540.png differ diff --git a/screenshots/pmos-dark-1024x768.png b/screenshots/pmos-dark-1024x768.png new file mode 100644 index 0000000..f738e63 Binary files /dev/null and b/screenshots/pmos-dark-1024x768.png differ diff --git a/screenshots/pmos-dark-1280x800.png b/screenshots/pmos-dark-1280x800.png new file mode 100644 index 0000000..e456380 Binary files /dev/null and b/screenshots/pmos-dark-1280x800.png differ diff --git a/screenshots/pmos-dark-1440x720.png b/screenshots/pmos-dark-1440x720.png new file mode 100644 index 0000000..5355d92 Binary files /dev/null and b/screenshots/pmos-dark-1440x720.png differ diff --git a/screenshots/pmos-dark-1920x1080.png b/screenshots/pmos-dark-1920x1080.png new file mode 100644 index 0000000..450b8eb Binary files /dev/null and b/screenshots/pmos-dark-1920x1080.png differ diff --git a/screenshots/pmos-dark-480x800.png b/screenshots/pmos-dark-480x800.png new file mode 100644 index 0000000..f49acec Binary files /dev/null and b/screenshots/pmos-dark-480x800.png differ diff --git a/screenshots/pmos-dark-540x960.png b/screenshots/pmos-dark-540x960.png new file mode 100644 index 0000000..9a3c158 Binary files /dev/null and b/screenshots/pmos-dark-540x960.png differ diff --git a/screenshots/pmos-dark-768x1024.png b/screenshots/pmos-dark-768x1024.png new file mode 100644 index 0000000..9f86333 Binary files /dev/null and b/screenshots/pmos-dark-768x1024.png differ diff --git a/screenshots/pmos-dark-800x480.png b/screenshots/pmos-dark-800x480.png new file mode 100644 index 0000000..6655966 Binary files /dev/null and b/screenshots/pmos-dark-800x480.png differ diff --git a/screenshots/pmos-dark-960x540.png b/screenshots/pmos-dark-960x540.png new file mode 100644 index 0000000..dcc1dc6 Binary files /dev/null and b/screenshots/pmos-dark-960x540.png differ diff --git a/screenshots/pmos-light-1024x768.png b/screenshots/pmos-light-1024x768.png new file mode 100644 index 0000000..808cf1a Binary files /dev/null and b/screenshots/pmos-light-1024x768.png differ diff --git a/screenshots/pmos-light-1280x800.png b/screenshots/pmos-light-1280x800.png new file mode 100644 index 0000000..3146606 Binary files /dev/null and b/screenshots/pmos-light-1280x800.png differ diff --git a/screenshots/pmos-light-1440x720.png b/screenshots/pmos-light-1440x720.png new file mode 100644 index 0000000..d44a83b Binary files /dev/null and b/screenshots/pmos-light-1440x720.png differ diff --git a/screenshots/pmos-light-1920x1080.png b/screenshots/pmos-light-1920x1080.png new file mode 100644 index 0000000..087a704 Binary files /dev/null and b/screenshots/pmos-light-1920x1080.png differ diff --git a/screenshots/pmos-light-480x800.png b/screenshots/pmos-light-480x800.png new file mode 100644 index 0000000..ed975a6 Binary files /dev/null and b/screenshots/pmos-light-480x800.png differ diff --git a/screenshots/pmos-light-540x960.png b/screenshots/pmos-light-540x960.png new file mode 100644 index 0000000..53a540c Binary files /dev/null and b/screenshots/pmos-light-540x960.png differ diff --git a/screenshots/pmos-light-768x1024.png b/screenshots/pmos-light-768x1024.png new file mode 100644 index 0000000..71a152c Binary files /dev/null and b/screenshots/pmos-light-768x1024.png differ diff --git a/screenshots/pmos-light-800x480.png b/screenshots/pmos-light-800x480.png new file mode 100644 index 0000000..7bcaf5e Binary files /dev/null and b/screenshots/pmos-light-800x480.png differ diff --git a/screenshots/pmos-light-960x540.png b/screenshots/pmos-light-960x540.png new file mode 100644 index 0000000..38ed635 Binary files /dev/null and b/screenshots/pmos-light-960x540.png differ diff --git a/unl0kr-screenshots-dark.conf b/unl0kr-screenshots-dark.conf deleted file mode 100644 index b48de80..0000000 --- a/unl0kr-screenshots-dark.conf +++ /dev/null @@ -1,2 +0,0 @@ -[theme] -default=breezy-dark diff --git a/unl0kr-screenshots-light.conf b/unl0kr-screenshots-light.conf deleted file mode 100644 index bbc7199..0000000 --- a/unl0kr-screenshots-light.conf +++ /dev/null @@ -1,2 +0,0 @@ -[theme] -default=breezy-light diff --git a/unl0kr-screenshots.conf b/unl0kr-screenshots.conf deleted file mode 100644 index 9195605..0000000 --- a/unl0kr-screenshots.conf +++ /dev/null @@ -1,10 +0,0 @@ -[general] -animations=true - -[keyboard] -autohide=false -layout=de -popovers=true - -[textarea] -obscured=true