parent
02aab980f2
commit
0346264199
|
@ -123,6 +123,7 @@ recent2palette () {
|
||||||
DATE=$(date +"%Y%m%d-%H%M%S")
|
DATE=$(date +"%Y%m%d-%H%M%S")
|
||||||
mkdir -p "$CNF_DIR/palettes/my"
|
mkdir -p "$CNF_DIR/palettes/my"
|
||||||
grep ^# $RECENT |tac > "$CNF_DIR/palettes/my/My_palette_$DATE.clr"
|
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() {
|
newpalette() {
|
||||||
DATE=$(date +"%Y%m%d-%H%M%S")
|
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)
|
read WALLPATH<<< $(grep file "$HOME/.config/nitrogen/bg-saved.cfg" | cut -d'=' -f2)
|
||||||
WALLPAPER=${WALLPATH##*/}
|
WALLPAPER=${WALLPATH##*/}
|
||||||
if [ ! -f "$WALLPALDIR/$WALLPAPER.clr" ]; then
|
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
|
fi
|
||||||
#mapfile -t wallcolors < "$WALLPALDIR/$WALLPAPER.clr"
|
#mapfile -t wallcolors < "$WALLPALDIR/$WALLPAPER.clr"
|
||||||
out+=("^sep(<i><small>$WALLCOLORS</small></i>)")
|
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)
|
read WALLPATH<<< $(grep file "$HOME/.config/nitrogen/bg-saved.cfg" | cut -d'=' -f2)
|
||||||
WALLPAPER=${WALLPATH##*/}
|
WALLPAPER=${WALLPATH##*/}
|
||||||
if [ ! -f "$WALLPALDIR/$WALLPAPER.clr" ]; then
|
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
|
fi
|
||||||
#mapfile -t wallcolors < "$WALLPALDIR/$WALLPAPER.clr"
|
#mapfile -t wallcolors < "$WALLPALDIR/$WALLPAPER.clr"
|
||||||
out2+=("^tag(wallcolors)")
|
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'")
|
out2+=("<tt><small>$color</small> <span bgcolor='$color'><sub> </sub> <sup> </sup></span></tt> ,$ME getcolorcode '$color'")
|
||||||
done < "$WALLPALDIR/$WALLPAPER.clr"
|
done < "$WALLPALDIR/$WALLPAPER.clr"
|
||||||
out2+=("^sep()")
|
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
|
fi
|
||||||
|
|
||||||
out1+=("$IMAGICKCOLORS,mbxcolors imagick")
|
out1+=("$IMAGICKCOLORS,mbxcolors imagick")
|
||||||
|
|
Loading…
Reference in New Issue