From 03003d8056d27005cc3bb59af7fe9ab427f7a9e5 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Tue, 13 Aug 2024 22:44:32 +0200 Subject: [PATCH] wallpaper fix --- bin/colorizer | 4 ++-- bin/colorizer-cava | 4 ++-- bin/colorizer-conky | 4 ++-- bin/colorizer-menus | 4 ++-- bin/colorizer-ob | 4 ++-- bin/colorizer-pyradio | 4 ++-- bin/conkyctl | 2 +- bin/mbclr | 2 +- bin/w2theme | 6 +++--- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bin/colorizer b/bin/colorizer index 212d67e..b87c809 100755 --- a/bin/colorizer +++ b/bin/colorizer @@ -181,7 +181,7 @@ fi WALLPALDIR="$HOME/.cache/colorizer/palettes" 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////_} if [[ "${NAME}" =~ ^_home_.* ]]; then @@ -214,7 +214,7 @@ out+=(" $FONTS,colorizer-fonts -s") out+=("^sep()") out+=("$OBTHEME,colorizer-ob -s") -#out+=("TINT2,^pipe(colorizer-tint2)") +out+=("TINT2,colorizer-tint2 -s") out+=("$MENUPANELS,colorizer-menus -s") out+=("$COLORIZER_CONKY,colorizer-conky -s") out+=("^sep()") diff --git a/bin/colorizer-cava b/bin/colorizer-cava index f66cfd4..d42ca69 100755 --- a/bin/colorizer-cava +++ b/bin/colorizer-cava @@ -25,7 +25,7 @@ CFGFILE=~/.config/cava/config # get wallpaper color palette WALLPALDIR="$HOME/.cache/colorizer/palettes" 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////_} if [[ "${NAME}" =~ ^_home_.* ]]; then @@ -181,7 +181,7 @@ if [[ "$1" == "-s" ]]; then MENU_PADDING_TOP=$((jgtools_padding + 150)) #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" mkdir -p ${THUMBDIR} NAME=${WALLPATH////_} diff --git a/bin/colorizer-conky b/bin/colorizer-conky index 36407f2..6599a68 100755 --- a/bin/colorizer-conky +++ b/bin/colorizer-conky @@ -53,7 +53,7 @@ fi ### Wallpaper colors WALLPALDIR="$HOME/.cache/colorizer/palettes" 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////_} if [[ "${NAME}" =~ ^_home_.* ]]; then n=${#HOME} @@ -498,7 +498,7 @@ if [[ "$1" == "-s" ]]; then MENU_PADDING_TOP=$((jgtools_padding + 150)) #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" mkdir -p ${THUMBDIR} NAME=${WALLPATH////_} diff --git a/bin/colorizer-menus b/bin/colorizer-menus index ee9db5f..7c744e2 100755 --- a/bin/colorizer-menus +++ b/bin/colorizer-menus @@ -25,7 +25,7 @@ USERSCHEMES="$HOME/.config/colorizer/menus/userschemes.csv" ### Wallpaper colors WALLPALDIR="$HOME/.cache/colorizer/palettes" 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////_} if [[ "${NAME}" =~ ^_home_.* ]]; then n=${#HOME} @@ -595,7 +595,7 @@ if [[ "$1" == "-s" ]]; then JGWIDTH=$((jgtools_padding + 270 + jgtools_padding)) MENU_PADDING_TOP=$((jgtools_padding + 150)) #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" mkdir -p ${THUMBDIR} NAME=${WALLPATH////_} diff --git a/bin/colorizer-ob b/bin/colorizer-ob index e619957..a30e557 100755 --- a/bin/colorizer-ob +++ b/bin/colorizer-ob @@ -26,7 +26,7 @@ USERTHEMES="$HOME/.config/colorizer/openbox/userthemes.csv" ### Wallpaper colors WALLPALDIR="$HOME/.cache/colorizer/palettes" 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////_} if [[ "${NAME}" =~ ^_home_.* ]]; then n=${#HOME} @@ -690,7 +690,7 @@ JGWIDTH=$((jgtools_padding + 270 + jgtools_padding)) MENU_PADDING_TOP=$((jgtools_padding + 150)) # 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" mkdir -p ${THUMBDIR} NAME=${WALLPATH////_} diff --git a/bin/colorizer-pyradio b/bin/colorizer-pyradio index 045ceb8..277e015 100755 --- a/bin/colorizer-pyradio +++ b/bin/colorizer-pyradio @@ -33,7 +33,7 @@ THEMERC=~/.config/pyradio/themes/mbcolors.pyradio-theme # get wallpaper color palette WALLPALDIR="$HOME/.cache/colorizer/palettes" 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////_} if [[ "${NAME}" =~ ^_home_.* ]]; then @@ -210,7 +210,7 @@ if [[ "$1" == "-s" ]]; then MENU_PADDING_TOP=$((jgtools_padding + 150)) #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" mkdir -p ${THUMBDIR} NAME=${WALLPATH////_} diff --git a/bin/conkyctl b/bin/conkyctl index 8a4f4ed..7edca6b 100755 --- a/bin/conkyctl +++ b/bin/conkyctl @@ -603,7 +603,7 @@ single () { ### Wallpaper colors WALLPALDIR="$HOME/.cache/colorizer/palettes" 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////_} if [[ "${NAME}" =~ ^_home_.* ]]; then n=${#HOME} diff --git a/bin/mbclr b/bin/mbclr index 70cddf5..fa6c462 100755 --- a/bin/mbclr +++ b/bin/mbclr @@ -61,7 +61,7 @@ main () { #read WALLPAPER<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | cut -d'=' -f2) WALLPALDIR="$HOME/.cache/colorizer/palettes" 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////_} if [[ "${NAME}" =~ ^_home_.* ]]; then diff --git a/bin/w2theme b/bin/w2theme index 94b1fca..90e26f5 100755 --- a/bin/w2theme +++ b/bin/w2theme @@ -20,7 +20,7 @@ WALLPALDIR="$HOME/.cache/colorizer/palettes" 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////_} if [[ "${NAME}" =~ ^_home_.* ]]; then @@ -31,7 +31,7 @@ fi 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 mapfile -t w < "$WALLPALDIR/$NAME.clr" @@ -382,7 +382,7 @@ genthumb () { mkdir -p ${THUMBDIR} THUMB="${THUMBDIR}/${NAME}.png" if [[ ! -f "$THUMB" ]]; then - convert ${1} -resize 270x150^ -gravity center -extent 270x150 ${THUMB} + magick ${1} -resize 270x150^ -gravity center -extent 270x150 ${THUMB} fi } pin () {