aboutsummaryrefslogtreecommitdiff
path: root/generate_theme
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-07-03 18:35:11 -0700
committerFuwn <[email protected]>2025-07-03 18:35:11 -0700
commitcbbebf46f7e1b41e9650068183be2861dfc80ec7 (patch)
treece6ff79fada18058f28eb0d3bec22fe27136eb11 /generate_theme
parentmodes folder and argument parsing (diff)
downloadzed-theme-wal-cbbebf46f7e1b41e9650068183be2861dfc80ec7.tar.xz
zed-theme-wal-cbbebf46f7e1b41e9650068183be2861dfc80ec7.zip
refactor(generate_theme): Rename and move templates
Diffstat (limited to 'generate_theme')
-rwxr-xr-xgenerate_theme10
1 files changed, 5 insertions, 5 deletions
diff --git a/generate_theme b/generate_theme
index 67accbb..451655d 100755
--- a/generate_theme
+++ b/generate_theme
@@ -3,7 +3,7 @@
# shellcheck disable=SC2154
# Default mode
-MODE="original"
+MODE="default"
# The directory of this script, so that this script can be called from anywhere
EXTENSION_DIRECTORY="$(dirname "${0}")"
@@ -16,7 +16,7 @@ while [[ $# -gt 0 ]]; do
;;
--list)
echo "Available modes:"
- for template in "${EXTENSION_DIRECTORY}/modes"/*.json.template; do
+ for template in "${EXTENSION_DIRECTORY}/templates"/*.json.template; do
if [[ -f "$template" ]]; then
echo " $(basename "$template" .json.template)"
fi
@@ -27,7 +27,7 @@ while [[ $# -gt 0 ]]; do
echo "Usage: $0 [--mode MODE] [--list]"
echo ""
echo "Options:"
- echo " --mode MODE Select theme mode (default: original)"
+ echo " --mode MODE Select theme mode (default: default)"
echo " --list List available modes"
echo " --help, -h Show this help"
echo ""
@@ -46,7 +46,7 @@ WAL_COLOURS_FILE="${HOME}/.cache/wal/colors.json"
# The file to write the generated theme to, and that Zed will read
THEME_FILE="${EXTENSION_DIRECTORY}/themes/wal-theme.json"
# The template file for the selected mode (contains theme JSON with variable placeholders)
-TEMPLATE_FILE="${EXTENSION_DIRECTORY}/modes/${MODE}.json.template"
+TEMPLATE_FILE="${EXTENSION_DIRECTORY}/templates/${MODE}.json.template"
# If the wal colour scheme file does not exist, exit with an error
if [[ ! -f "${WAL_COLOURS_FILE}" ]]; then
@@ -57,7 +57,7 @@ fi
# Check if mode file exists
if [[ ! -f "${TEMPLATE_FILE}" ]]; then
echo "error: mode '${MODE}' not found. Available modes:"
- for template in "${EXTENSION_DIRECTORY}/modes"/*.json.template; do
+ for template in "${EXTENSION_DIRECTORY}/templates"/*.json.template; do
if [[ -f "$template" ]]; then
echo " $(basename "$template" .json.template)"
fi