diff --git a/local/bin/nitrogen b/local/bin/nitrogen index 1d8aa31..651538d 100755 --- a/local/bin/nitrogen +++ b/local/bin/nitrogen @@ -41,9 +41,15 @@ n=${#HOME} ((n++)) NAME=${NAME:${n}} fi +ext="${WALLPATH##*.}" +#notify-send.sh "Extension" "$ext" if [ ! -f "$WALLPALDIR/${NAME}.clr" ]; then - convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr" + if [ "$ext" == "avif" ];then + convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,3) substr($3,6,2) substr($3,10,2)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr" + else + convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print substr($3,1,7)}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$NAME.clr" + fi fi # GENERATE THUMBNAIL @@ -60,10 +66,10 @@ convert ${WALLPATH} -resize 52x52^ -gravity center -extent 52x52 -bordercolor wh killall -SIGUSR1 tint2 # auto generate themes -if command -v w2theme &> /dev/null -then -source ~/.config/colorizer/colorizer.conf - if [[ "$wall2themes" == "yes" ]];then - w2theme colorize - fi -fi +#if command -v w2theme &> /dev/null +#then +#source ~/.config/colorizer/colorizer.conf +# if [[ "$wall2themes" == "yes" ]];then +# w2theme colorize +# fi +#fi