diff --git a/bitmap/colorblocks/scripts/pywal.sh b/bitmap/colorblocks/scripts/pywal.sh index 346593a..4419197 100755 --- a/bitmap/colorblocks/scripts/pywal.sh +++ b/bitmap/colorblocks/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/colorblocks/colors.ini" RFILE="$HOME/.config/polybar/colorblocks/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -42,12 +43,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$color0"` diff --git a/bitmap/cuts/scripts/pywal.sh b/bitmap/cuts/scripts/pywal.sh index 4cc8ff4..f154233 100755 --- a/bitmap/cuts/scripts/pywal.sh +++ b/bitmap/cuts/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/cuts/colors.ini" RFILE="$HOME/.config/polybar/cuts/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -36,12 +37,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BGC=`printf "%s\n" "$background"` BG=${BGC:1} diff --git a/bitmap/docky/scripts/pywal.sh b/bitmap/docky/scripts/pywal.sh index 513fb5a..36b7962 100755 --- a/bitmap/docky/scripts/pywal.sh +++ b/bitmap/docky/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/docky/colors.ini" RFILE="$HOME/.config/polybar/docky/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -53,12 +54,17 @@ get_fg_color(){ } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$foreground"` diff --git a/bitmap/grayblocks/scripts/pywal.sh b/bitmap/grayblocks/scripts/pywal.sh index 9061520..a915c67 100755 --- a/bitmap/grayblocks/scripts/pywal.sh +++ b/bitmap/grayblocks/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/grayblocks/colors.ini" RFILE="$HOME/.config/polybar/grayblocks/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -36,12 +37,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$background"` diff --git a/bitmap/hack/scripts/pywal.sh b/bitmap/hack/scripts/pywal.sh index 35328fb..09cd463 100755 --- a/bitmap/hack/scripts/pywal.sh +++ b/bitmap/hack/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/hack/colors.ini" RFILE="$HOME/.config/polybar/hack/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -33,12 +34,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$foreground"` diff --git a/bitmap/material/scripts/pywal.sh b/bitmap/material/scripts/pywal.sh index 23bfbcb..4602458 100755 --- a/bitmap/material/scripts/pywal.sh +++ b/bitmap/material/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/material/colors.ini" RFILE="$HOME/.config/polybar/material/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -53,12 +54,17 @@ get_fg_color(){ } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$foreground"` diff --git a/bitmap/shades/scripts/pywal.sh b/bitmap/shades/scripts/pywal.sh index e34fab1..4726fe9 100755 --- a/bitmap/shades/scripts/pywal.sh +++ b/bitmap/shades/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/shades/colors.ini" RFILE="$HOME/.config/polybar/shades/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -43,12 +44,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$foreground"` diff --git a/bitmap/shapes/scripts/pywal.sh b/bitmap/shapes/scripts/pywal.sh index dc0086c..db0a15a 100755 --- a/bitmap/shapes/scripts/pywal.sh +++ b/bitmap/shapes/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/shapes/colors.ini" RFILE="$HOME/.config/polybar/shapes/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -42,12 +43,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$foreground"` diff --git a/simple/colorblocks/scripts/pywal.sh b/simple/colorblocks/scripts/pywal.sh index 346593a..4419197 100755 --- a/simple/colorblocks/scripts/pywal.sh +++ b/simple/colorblocks/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/colorblocks/colors.ini" RFILE="$HOME/.config/polybar/colorblocks/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -42,12 +43,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$color0"` diff --git a/simple/cuts/scripts/pywal.sh b/simple/cuts/scripts/pywal.sh index 4cc8ff4..f154233 100755 --- a/simple/cuts/scripts/pywal.sh +++ b/simple/cuts/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/cuts/colors.ini" RFILE="$HOME/.config/polybar/cuts/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -36,12 +37,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BGC=`printf "%s\n" "$background"` BG=${BGC:1} diff --git a/simple/docky/scripts/pywal.sh b/simple/docky/scripts/pywal.sh index 513fb5a..36b7962 100755 --- a/simple/docky/scripts/pywal.sh +++ b/simple/docky/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/docky/colors.ini" RFILE="$HOME/.config/polybar/docky/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -53,12 +54,17 @@ get_fg_color(){ } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$foreground"` diff --git a/simple/grayblocks/scripts/pywal.sh b/simple/grayblocks/scripts/pywal.sh index 9061520..a915c67 100755 --- a/simple/grayblocks/scripts/pywal.sh +++ b/simple/grayblocks/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/grayblocks/colors.ini" RFILE="$HOME/.config/polybar/grayblocks/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -36,12 +37,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$background"` diff --git a/simple/hack/scripts/pywal.sh b/simple/hack/scripts/pywal.sh index 35328fb..09cd463 100755 --- a/simple/hack/scripts/pywal.sh +++ b/simple/hack/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/hack/colors.ini" RFILE="$HOME/.config/polybar/hack/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -33,12 +34,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$foreground"` diff --git a/simple/material/scripts/pywal.sh b/simple/material/scripts/pywal.sh index 23bfbcb..4602458 100755 --- a/simple/material/scripts/pywal.sh +++ b/simple/material/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/material/colors.ini" RFILE="$HOME/.config/polybar/material/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -53,12 +54,17 @@ get_fg_color(){ } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$foreground"` diff --git a/simple/pwidgets/scripts/pywal.sh b/simple/pwidgets/scripts/pywal.sh index c945eb5..7fba92a 100755 --- a/simple/pwidgets/scripts/pywal.sh +++ b/simple/pwidgets/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/pwidgets/colors.ini" RFILE="$HOME/.config/polybar/pwidgets/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -31,12 +32,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$foreground"` diff --git a/simple/shades/scripts/pywal.sh b/simple/shades/scripts/pywal.sh index e34fab1..4726fe9 100755 --- a/simple/shades/scripts/pywal.sh +++ b/simple/shades/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/shades/colors.ini" RFILE="$HOME/.config/polybar/shades/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -43,12 +44,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$foreground"` diff --git a/simple/shapes/scripts/pywal.sh b/simple/shapes/scripts/pywal.sh index dc0086c..db0a15a 100755 --- a/simple/shapes/scripts/pywal.sh +++ b/simple/shapes/scripts/pywal.sh @@ -3,6 +3,7 @@ # Color files PFILE="$HOME/.config/polybar/shapes/colors.ini" RFILE="$HOME/.config/polybar/shapes/scripts/rofi/colors.rasi" +WFILE="$HOME/.cache/wal/colors.sh" # Get colors pywal_get() { @@ -42,12 +43,17 @@ change_color() { } # Main -if [[ -f "/usr/bin/wal" ]]; then +if [[ -x "`which wal`" ]]; then if [[ "$1" ]]; then pywal_get "$1" # Source the pywal color file - . "$HOME/.cache/wal/colors.sh" + if [[ -e "$WFILE" ]]; then + . "$WFILE" + else + echo 'Color file does not exist, exiting...' + exit 1 + fi BG=`printf "%s\n" "$background"` FG=`printf "%s\n" "$foreground"`