diff options
Diffstat (limited to 'config/polybar/hack/scripts/pywal.sh')
| -rwxr-xr-x | config/polybar/hack/scripts/pywal.sh | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/config/polybar/hack/scripts/pywal.sh b/config/polybar/hack/scripts/pywal.sh deleted file mode 100755 index 09cd463..0000000 --- a/config/polybar/hack/scripts/pywal.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env bash - -# 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() { - wal -i "$1" -q -t -} - -# Change colors -change_color() { - # polybar - sed -i -e "s/background = #.*/background = $BG/g" $PFILE - sed -i -e "s/foreground = #.*/foreground = $FG/g" $PFILE - sed -i -e "s/primary = #.*/primary = $AC/g" $PFILE - - # rofi - cat > $RFILE <<- EOF - /* colors */ - - * { - al: #00000000; - bg: ${BG}FF; - ac: ${AC}FF; - se: ${AC}26; - fg: ${FG}FF; - } - EOF - - polybar-msg cmd restart -} - -# Main -if [[ -x "`which wal`" ]]; then - if [[ "$1" ]]; then - pywal_get "$1" - - # Source the pywal color file - 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"` - AC=`printf "%s\n" "$color1"` - - change_color - else - echo -e "[!] Please enter the path to wallpaper. \n" - echo "Usage : ./pywal.sh path/to/image" - fi -else - echo "[!] 'pywal' is not installed." -fi |
