Updated pywal scripts
This commit is contained in:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user