21bac80e942001bdec00ff81b034c9f0ba71136f
commit 21bac80e942001bdec00ff81b034c9f0ba71136f
Author: Simon Watson <spw01@protonmail.com>
Date: Thu Jul 8 11:53:15 2021 -0400

Saving wal_walker

diff --git a/wal_walker.sh b/wal_walker.sh
new file mode 100755
index 0000000..83afd47
--- /dev/null
+++ b/wal_walker.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+# Walk through all wal built in themes,
+# prompting the user to pluck one into .wal_alias with
+# the following format:
+# alias wal-$theme_name='wal --theme $theme_name'
+
+for theme in $(wal --theme | grep - | grep -v random | sed s/\ -\ //g); do
+ echo
+ echo
+ echo $theme
+ check_theme=$(grep $theme .wal_alias > /dev/null 2>&1; echo $?)
+ if [[ $check_theme -eq 0 ]]; then
+ echo "Skipping $theme, already have an alias"
+ continue
+ fi
+ wal -n -e --theme $theme
+ if [ $? -ne 0 ]; then
+ echo "Wal failed on dark theme for $theme, trying light"
+ wal -n -e --theme $theme -l
+ read -p "Store this theme? " REPLY
+ if [[ $REPLY =~ ^[Yy] ]]; then
+ echo "alias wal-$theme='wal -n -e --theme $theme -l'" >> .wal_alias
+ fi
+ else
+ read -p "Store this theme? " REPLY
+ if [[ $REPLY =~ ^[Yy] ]]; then
+ echo "alias wal-$theme='wal -n -e --theme $theme'" >> .wal_alias
+ fi
+ fi
+
+done
+