master 0.9.5
Daniel Napora 2022-05-24 02:06:37 +02:00
parent 02aab980f2
commit 0346264199
1 changed files with 4 additions and 3 deletions

View File

@ -123,6 +123,7 @@ recent2palette () {
DATE=$(date +"%Y%m%d-%H%M%S")
mkdir -p "$CNF_DIR/palettes/my"
grep ^# $RECENT |tac > "$CNF_DIR/palettes/my/My_palette_$DATE.clr"
grep ^# $RECENT |pastel sort-by brightness|pastel format hex > "$CNF_DIR/palettes/my/My_palette_$DATE.clr"
}
newpalette() {
DATE=$(date +"%Y%m%d-%H%M%S")
@ -328,7 +329,7 @@ case "$expose" in
read WALLPATH<<< $(grep file "$HOME/.config/nitrogen/bg-saved.cfg" | cut -d'=' -f2)
WALLPAPER=${WALLPATH##*/}
if [ ! -f "$WALLPALDIR/$WALLPAPER.clr" ]; then
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print $3}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$WALLPAPER.clr"
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/$WALLPAPER.clr"
fi
#mapfile -t wallcolors < "$WALLPALDIR/$WALLPAPER.clr"
out+=("^sep(<i><small>$WALLCOLORS</small></i>)")
@ -375,7 +376,7 @@ mkdir -p "$WALLPALDIR"
read WALLPATH<<< $(grep file "$HOME/.config/nitrogen/bg-saved.cfg" | cut -d'=' -f2)
WALLPAPER=${WALLPATH##*/}
if [ ! -f "$WALLPALDIR/$WALLPAPER.clr" ]; then
convert ${WALLPATH} -resize 25% -colors 16 -unique-colors txt:- |grep -v '^#'| awk '{print $3}' |pastel sort-by brightness |pastel format hex > "$WALLPALDIR/$WALLPAPER.clr"
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/$WALLPAPER.clr"
fi
#mapfile -t wallcolors < "$WALLPALDIR/$WALLPAPER.clr"
out2+=("^tag(wallcolors)")
@ -386,7 +387,7 @@ while read -r color name;do
out2+=("<tt><small>$color</small> <span bgcolor='$color'><sub> </sub> <sup> </sup></span></tt> ,$ME getcolorcode '$color'")
done < "$WALLPALDIR/$WALLPAPER.clr"
out2+=("^sep()")
out2+=("$RANDWALL,nitrogen --random ${RANDWALLDIR} --set-scaled --save;$ME")
out2+=("$RANDWALL,nitrogen --random ${RANDWALLDIR} --set-scaled --save;$ME setvar expose=wallpaper;$ME")
fi
out1+=("$IMAGICKCOLORS,mbxcolors imagick")