Updated pywal scripts

This commit is contained in:
adi1090x
2022-08-25 10:55:00 +05:30
parent c9e3eb652e
commit 4972b1bf39
17 changed files with 136 additions and 34 deletions
+8 -2
View File
@@ -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"`