diff options
| author | Fuwn <[email protected]> | 2025-07-03 18:35:11 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-07-03 18:35:11 -0700 |
| commit | cbbebf46f7e1b41e9650068183be2861dfc80ec7 (patch) | |
| tree | ce6ff79fada18058f28eb0d3bec22fe27136eb11 | |
| parent | modes folder and argument parsing (diff) | |
| download | zed-theme-wal-cbbebf46f7e1b41e9650068183be2861dfc80ec7.tar.xz zed-theme-wal-cbbebf46f7e1b41e9650068183be2861dfc80ec7.zip | |
refactor(generate_theme): Rename and move templates
| -rwxr-xr-x | generate_theme | 10 | ||||
| -rw-r--r-- | templates/default.json.template (renamed from modes/original.json.template) | 0 | ||||
| -rw-r--r-- | templates/readability.json.template (renamed from modes/readability.json.template) | 0 |
3 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 diff --git a/modes/original.json.template b/templates/default.json.template index 2941381..2941381 100644 --- a/modes/original.json.template +++ b/templates/default.json.template diff --git a/modes/readability.json.template b/templates/readability.json.template index 696ad2c..696ad2c 100644 --- a/modes/readability.json.template +++ b/templates/readability.json.template |