diff --git a/bin/mbxcolors b/bin/mbxcolors
index 632cef4..3b16dae 100755
--- a/bin/mbxcolors
+++ b/bin/mbxcolors
@@ -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($WALLCOLORS)")
@@ -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+=("$color ,$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")