wallpaper fix

This commit is contained in:
Daniel Napora 2024-08-13 22:44:32 +02:00
parent 89f905268f
commit 03003d8056
9 changed files with 17 additions and 17 deletions

View File

@ -181,7 +181,7 @@ fi
WALLPALDIR="$HOME/.cache/colorizer/palettes" WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR" 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 | tail -1 | cut -d'=' -f2)
NAME=${WALLPATH////_} NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then if [[ "${NAME}" =~ ^_home_.* ]]; then
@ -214,7 +214,7 @@ out+=("<big></big> $FONTS,colorizer-fonts -s")
out+=("^sep()") out+=("^sep()")
out+=("$OBTHEME,colorizer-ob -s") out+=("$OBTHEME,colorizer-ob -s")
#out+=("TINT2,^pipe(colorizer-tint2)") out+=("TINT2,colorizer-tint2 -s")
out+=("$MENUPANELS,colorizer-menus -s") out+=("$MENUPANELS,colorizer-menus -s")
out+=("$COLORIZER_CONKY,colorizer-conky -s") out+=("$COLORIZER_CONKY,colorizer-conky -s")
out+=("^sep()") out+=("^sep()")

View File

@ -25,7 +25,7 @@ CFGFILE=~/.config/cava/config
# get wallpaper color palette # get wallpaper color palette
WALLPALDIR="$HOME/.cache/colorizer/palettes" WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR" 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 | tail -1 | cut -d'=' -f2)
NAME=${WALLPATH////_} NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then if [[ "${NAME}" =~ ^_home_.* ]]; then
@ -181,7 +181,7 @@ if [[ "$1" == "-s" ]]; then
MENU_PADDING_TOP=$((jgtools_padding + 150)) MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER #WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2) read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | tail -1 | cut -d'=' -f2)
THUMBDIR="$HOME/.cache/colorizer/thumbs" THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR} mkdir -p ${THUMBDIR}
NAME=${WALLPATH////_} NAME=${WALLPATH////_}

View File

@ -53,7 +53,7 @@ fi
### Wallpaper colors ### Wallpaper colors
WALLPALDIR="$HOME/.cache/colorizer/palettes" WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR" 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 | tail -1 | cut -d'=' -f2)
NAME=${WALLPATH////_} NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME} n=${#HOME}
@ -498,7 +498,7 @@ if [[ "$1" == "-s" ]]; then
MENU_PADDING_TOP=$((jgtools_padding + 150)) MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER #WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2) read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | tail -1 | cut -d'=' -f2)
THUMBDIR="$HOME/.cache/colorizer/thumbs" THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR} mkdir -p ${THUMBDIR}
NAME=${WALLPATH////_} NAME=${WALLPATH////_}

View File

@ -25,7 +25,7 @@ USERSCHEMES="$HOME/.config/colorizer/menus/userschemes.csv"
### Wallpaper colors ### Wallpaper colors
WALLPALDIR="$HOME/.cache/colorizer/palettes" WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR" 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 | tail -1 | cut -d'=' -f2)
NAME=${WALLPATH////_} NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME} n=${#HOME}
@ -595,7 +595,7 @@ if [[ "$1" == "-s" ]]; then
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding)) JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150)) MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER #WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2) read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | tail -1 | cut -d'=' -f2)
THUMBDIR="$HOME/.cache/colorizer/thumbs" THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR} mkdir -p ${THUMBDIR}
NAME=${WALLPATH////_} NAME=${WALLPATH////_}

View File

@ -26,7 +26,7 @@ USERTHEMES="$HOME/.config/colorizer/openbox/userthemes.csv"
### Wallpaper colors ### Wallpaper colors
WALLPALDIR="$HOME/.cache/colorizer/palettes" WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR" 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 | tail -1 | cut -d'=' -f2)
NAME=${WALLPATH////_} NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME} n=${#HOME}
@ -690,7 +690,7 @@ JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 150)) MENU_PADDING_TOP=$((jgtools_padding + 150))
# WALLPAPER IMAGE # WALLPAPER IMAGE
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2) read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | tail -1 | cut -d'=' -f2)
THUMBDIR="$HOME/.cache/colorizer/thumbs" THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR} mkdir -p ${THUMBDIR}
NAME=${WALLPATH////_} NAME=${WALLPATH////_}

View File

@ -33,7 +33,7 @@ THEMERC=~/.config/pyradio/themes/mbcolors.pyradio-theme
# get wallpaper color palette # get wallpaper color palette
WALLPALDIR="$HOME/.cache/colorizer/palettes" WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR" 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 | tail -1 | cut -d'=' -f2)
NAME=${WALLPATH////_} NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then if [[ "${NAME}" =~ ^_home_.* ]]; then
@ -210,7 +210,7 @@ if [[ "$1" == "-s" ]]; then
MENU_PADDING_TOP=$((jgtools_padding + 150)) MENU_PADDING_TOP=$((jgtools_padding + 150))
#WALLPAPER #WALLPAPER
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2) read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | tail -1 | cut -d'=' -f2)
THUMBDIR="$HOME/.cache/colorizer/thumbs" THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR} mkdir -p ${THUMBDIR}
NAME=${WALLPATH////_} NAME=${WALLPATH////_}

View File

@ -603,7 +603,7 @@ single () {
### Wallpaper colors ### Wallpaper colors
WALLPALDIR="$HOME/.cache/colorizer/palettes" WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR" 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 | tail -1 | cut -d'=' -f2)
NAME=${WALLPATH////_} NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME} n=${#HOME}

View File

@ -61,7 +61,7 @@ main () {
#read WALLPAPER<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2) #read WALLPAPER<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2)
WALLPALDIR="$HOME/.cache/colorizer/palettes" WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR" 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 | tail -1 | cut -d'=' -f2)
NAME=${WALLPATH////_} NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then if [[ "${NAME}" =~ ^_home_.* ]]; then

View File

@ -20,7 +20,7 @@
WALLPALDIR="$HOME/.cache/colorizer/palettes" WALLPALDIR="$HOME/.cache/colorizer/palettes"
mkdir -p "$WALLPALDIR" 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 | tail -1 | cut -d'=' -f2)
NAME=${WALLPATH////_} NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then if [[ "${NAME}" =~ ^_home_.* ]]; then
@ -31,7 +31,7 @@ fi
if [ ! -f "$WALLPALDIR/$NAME.clr" ]; then 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" magick ${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
mapfile -t w < "$WALLPALDIR/$NAME.clr" mapfile -t w < "$WALLPALDIR/$NAME.clr"
@ -382,7 +382,7 @@ genthumb () {
mkdir -p ${THUMBDIR} mkdir -p ${THUMBDIR}
THUMB="${THUMBDIR}/${NAME}.png" THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]; then if [[ ! -f "$THUMB" ]]; then
convert ${1} -resize 270x150^ -gravity center -extent 270x150 ${THUMB} magick ${1} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi fi
} }
pin () { pin () {