diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-29 18:17:13 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-29 18:17:13 +1100 |
| commit | 5118c8da96312627b86c55738c02c6c8ac6809d0 (patch) | |
| tree | ea620f10aa317927879ecbdd1eef9246186f047d /scheme/gen-scheme.fish | |
| parent | install: hypr install uwsm envs (diff) | |
| download | caelestia-cli-5118c8da96312627b86c55738c02c6c8ac6809d0.tar.gz caelestia-cli-5118c8da96312627b86c55738c02c6c8ac6809d0.tar.bz2 caelestia-cli-5118c8da96312627b86c55738c02c6c8ac6809d0.zip | |
scheme: dynamic light theme
Autodetect based on wallpaper
Also resize wallpaper so faster
And async magick blur so wallpaper doesnt block
Diffstat (limited to 'scheme/gen-scheme.fish')
| -rwxr-xr-x | scheme/gen-scheme.fish | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scheme/gen-scheme.fish b/scheme/gen-scheme.fish index d8e8158..b0608e7 100755 --- a/scheme/gen-scheme.fish +++ b/scheme/gen-scheme.fish @@ -7,13 +7,19 @@ function nl-echo end end -. (dirname (status filename))/../util.fish +set -l src (dirname (status filename)) + +. $src/../util.fish set -l colour_names rosewater flamingo pink mauve red maroon peach yellow green teal sky sapphire blue lavender set -l layer_names text subtext1 subtext0 overlay2 overlay1 overlay0 surface2 surface1 surface0 base mantle crust test -f "$argv[1]" && set -l img "$argv[1]" || set -l img $CACHE/wallpaper/current -set -l colours_raw (okolors (realpath $img) -k 15 -w 0 -l 70,90,75,65,40,35,30,25,20,15,10,8,6) +set -l img ($src/resizeimg.py $img) + +$src/islight.py $img && set -l light_vals 40,6,8,10,45,50,55,60,65,70,75,80,85,90 || set -l light_vals 70,90,75,65,40,35,30,25,20,15,10,8,6 + +set -l colours_raw (okolors (realpath $img) -k 15 -w 0 -l $light_vals) set -l colours (string split ' ' $colours_raw[2])[2..] set -l layers (nl-echo $colours_raw | cut -f 1 -d ' ')[3..] |