scheme: allow choosing material scheme

Also actually monochrome monochrome scheme
This commit is contained in:
2 * r + 2 * t
2025-03-07 23:44:21 +11:00
parent 5955977cac
commit 92c7b0654c
4 changed files with 39 additions and 11 deletions
+8 -3
View File
@@ -7,10 +7,15 @@ set -l src (dirname (status filename))
test -f "$argv[1]" && set -l img "$argv[1]" || set -l img $C_STATE/wallpaper/current
set -l img (realpath $img)
contains -- "$argv[2]" light dark && set -l theme $argv[2] || set -l theme dark
test -n "$argv[3]" && set -l scheme $argv[3] || set -l scheme (cat $C_STATE/scheme/dynamic-scheme.txt 2> /dev/null || echo 'vibrant')
# Generate colours
test $theme = light && set -l lightness 50 || set -l lightness 70
$src/autoadjust.py $theme (okolors $img -k 14 -w 0 -l $lightness)
if test $scheme = 'monochrome'
$src/autoadjust.py $theme $scheme (okolors $img -k 14)
else
test $theme = light && set -l lightness 50 || set -l lightness 70
$src/autoadjust.py $theme $scheme (okolors $img -k 14 -w 0 -l $lightness)
end
# Generate layers and accents
$src/genmaterial.py $img $theme | head -c -1 # Trim trailing newline
$src/genmaterial.py $img $theme $scheme | head -c -1 # Trim trailing newline