From 5eff551f6fb6814f16e53212c9698d9431dec54c Mon Sep 17 00:00:00 2001 From: Alexander Gottweis Date: Thu, 30 May 2024 23:37:18 +0200 Subject: [PATCH] Add GOGH_NONINTERACTIVE flag for script usage --- README.md | 20 +-- apply-alacritty.py | 24 ++-- apply-colors.sh | 145 ++++++++++++--------- apply-terminator.py | 26 ++-- installs/3024-day.sh | 24 ++-- installs/3024-night.sh | 24 ++-- installs/aci.sh | 24 ++-- installs/aco.sh | 24 ++-- installs/adventure-time.sh | 24 ++-- installs/afterglow.sh | 24 ++-- installs/alien-blood.sh | 24 ++-- installs/apprentice.sh | 24 ++-- installs/argonaut.sh | 24 ++-- installs/arthur.sh | 24 ++-- installs/atom.sh | 24 ++-- installs/aura.sh | 24 ++-- installs/ayu-dark.sh | 24 ++-- installs/ayu-light.sh | 24 ++-- installs/ayu-mirage.sh | 24 ++-- installs/azu.sh | 24 ++-- installs/belafonte-day.sh | 24 ++-- installs/belafonte-night.sh | 24 ++-- installs/bim.sh | 24 ++-- installs/birds-of-paradise.sh | 24 ++-- installs/blazer.sh | 24 ++-- installs/blue-dolphin.sh | 24 ++-- installs/bluloco-light.sh | 24 ++-- installs/bluloco-zsh-light.sh | 24 ++-- installs/borland.sh | 24 ++-- installs/breath-darker.sh | 24 ++-- installs/breath-light.sh | 24 ++-- installs/breath-silverfox.sh | 24 ++-- installs/breath.sh | 24 ++-- installs/breeze.sh | 24 ++-- installs/broadcast.sh | 24 ++-- installs/brogrammer.sh | 24 ++-- installs/butrin.sh | 24 ++-- installs/c64.sh | 24 ++-- installs/cai.sh | 24 ++-- installs/campbell.sh | 24 ++-- installs/catppuccin-frappe.sh | 24 ++-- installs/catppuccin-latte.sh | 24 ++-- installs/catppuccin-macchiato.sh | 24 ++-- installs/catppuccin-mocha.sh | 24 ++-- installs/chalk.sh | 24 ++-- installs/chalkboard.sh | 24 ++-- installs/chameleon.sh | 24 ++-- installs/ciapre.sh | 24 ++-- installs/clone-of-ubuntu.sh | 24 ++-- installs/clrs.sh | 24 ++-- installs/cobalt-2.sh | 24 ++-- installs/cobalt-neon.sh | 24 ++-- installs/colorcli.sh | 24 ++-- installs/crayon-pony-fish.sh | 24 ++-- installs/dark-pastel.sh | 24 ++-- installs/darkside.sh | 24 ++-- installs/dehydration.sh | 24 ++-- installs/desert.sh | 24 ++-- installs/dimmed-monokai.sh | 24 ++-- installs/dissonance.sh | 24 ++-- installs/dracula.sh | 24 ++-- installs/earthsong.sh | 24 ++-- installs/elemental.sh | 24 ++-- installs/elementary.sh | 24 ++-- installs/elic.sh | 24 ++-- installs/elio.sh | 24 ++-- installs/espresso-libre.sh | 24 ++-- installs/espresso.sh | 24 ++-- installs/everblush.sh | 24 ++-- installs/everforest-dark-hard.sh | 24 ++-- installs/everforest-dark-medium.sh | 24 ++-- installs/everforest-dark-soft.sh | 24 ++-- installs/everforest-light-hard.sh | 24 ++-- installs/everforest-light-medium.sh | 24 ++-- installs/everforest-light-soft.sh | 24 ++-- installs/fairy-floss-dark.sh | 24 ++-- installs/fairy-floss.sh | 24 ++-- installs/fishtank.sh | 24 ++-- installs/flat-remix.sh | 24 ++-- installs/flat.sh | 24 ++-- installs/flatland.sh | 24 ++-- installs/foxnightly.sh | 24 ++-- installs/freya.sh | 24 ++-- installs/frontend-delight.sh | 24 ++-- installs/frontend-fun-forrest.sh | 24 ++-- installs/frontend-galaxy.sh | 24 ++-- installs/geohot.sh | 24 ++-- installs/github-dark.sh | 24 ++-- installs/github-light.sh | 24 ++-- installs/gogh.sh | 24 ++-- installs/gooey.sh | 24 ++-- installs/google-dark.sh | 24 ++-- installs/google-light.sh | 24 ++-- installs/gotham.sh | 24 ++-- installs/grape.sh | 24 ++-- installs/grass.sh | 24 ++-- installs/gruvbox-dark.sh | 24 ++-- installs/gruvbox-material.sh | 24 ++-- installs/gruvbox.sh | 24 ++-- installs/hardcore.sh | 24 ++-- installs/harper.sh | 24 ++-- installs/hemisu-dark.sh | 24 ++-- installs/hemisu-light.sh | 24 ++-- installs/highway.sh | 24 ++-- installs/hipster-green.sh | 24 ++-- installs/homebrew-light.sh | 24 ++-- installs/homebrew-ocean.sh | 24 ++-- installs/homebrew.sh | 24 ++-- installs/horizon-bright.sh | 24 ++-- installs/horizon-dark.sh | 24 ++-- installs/hurtado.sh | 24 ++-- installs/hybrid.sh | 24 ++-- installs/ibm-3270-high-contrast.sh | 24 ++-- installs/ibm3270.sh | 24 ++-- installs/ic-green-ppl.sh | 24 ++-- installs/ic-orange-ppl.sh | 24 ++-- installs/iceberg.sh | 24 ++-- installs/idle-toes.sh | 24 ++-- installs/ir-black.sh | 24 ++-- installs/jackie-brown.sh | 24 ++-- installs/japanesque.sh | 24 ++-- installs/jellybeans.sh | 24 ++-- installs/jup.sh | 24 ++-- installs/kanagawa-dragon.sh | 24 ++-- installs/kanagawa.sh | 24 ++-- installs/kibble.sh | 24 ++-- installs/kokuban.sh | 24 ++-- installs/laserwave.sh | 24 ++-- installs/later-this-evening.sh | 24 ++-- installs/lavandula.sh | 24 ++-- installs/liquid-carbon-transparent.sh | 24 ++-- installs/liquid-carbon.sh | 24 ++-- installs/lunaria-dark.sh | 24 ++-- installs/lunaria-eclipse.sh | 24 ++-- installs/lunaria-light.sh | 24 ++-- installs/maia.sh | 24 ++-- installs/man-page.sh | 24 ++-- installs/mar.sh | 24 ++-- installs/material.sh | 24 ++-- installs/mathias.sh | 24 ++-- installs/medallion.sh | 24 ++-- installs/miramare.sh | 24 ++-- installs/misterioso.sh | 24 ++-- installs/modus-operandi-tinted.sh | 24 ++-- installs/modus-operandi.sh | 24 ++-- installs/modus-vivendi-tinted.sh | 24 ++-- installs/modus-vivendi.sh | 24 ++-- installs/molokai.sh | 24 ++-- installs/mona-lisa.sh | 24 ++-- installs/mono-amber.sh | 24 ++-- installs/mono-cyan.sh | 24 ++-- installs/mono-green.sh | 24 ++-- installs/mono-red.sh | 24 ++-- installs/mono-white.sh | 24 ++-- installs/mono-yellow.sh | 24 ++-- installs/monokai-dark.sh | 24 ++-- installs/monokai-pro-ristretto.sh | 24 ++-- installs/monokai-pro.sh | 24 ++-- installs/monokai-soda.sh | 24 ++-- installs/moonfly.sh | 24 ++-- installs/morada.sh | 24 ++-- installs/n0tch2k.sh | 24 ++-- installs/neon-night.sh | 24 ++-- installs/neopolitan.sh | 24 ++-- installs/nep.sh | 24 ++-- installs/neutron.sh | 24 ++-- installs/night-owl.sh | 24 ++-- installs/nightfly.sh | 24 ++-- installs/nightlion-v1.sh | 24 ++-- installs/nightlion-v2.sh | 24 ++-- installs/nighty.sh | 24 ++-- installs/nord-light.sh | 24 ++-- installs/nord.sh | 24 ++-- installs/novel.sh | 24 ++-- installs/obsidian.sh | 24 ++-- installs/ocean-dark.sh | 24 ++-- installs/oceanic-next.sh | 24 ++-- installs/ollie.sh | 24 ++-- installs/omni.sh | 24 ++-- installs/one-dark.sh | 24 ++-- installs/one-half-black.sh | 24 ++-- installs/one-light.sh | 24 ++-- installs/oxocarbon-dark.sh | 24 ++-- installs/palenight.sh | 24 ++-- installs/pali.sh | 24 ++-- installs/panda.sh | 24 ++-- installs/paper.sh | 24 ++-- installs/papercolor-dark.sh | 24 ++-- installs/papercolor-light.sh | 24 ++-- installs/paraiso-dark.sh | 24 ++-- installs/paul-millr.sh | 24 ++-- installs/pencil-dark.sh | 24 ++-- installs/pencil-light.sh | 24 ++-- installs/peppermint.sh | 24 ++-- installs/pixiefloss.sh | 24 ++-- installs/pnevma.sh | 24 ++-- installs/powershell.sh | 24 ++-- installs/predawn.sh | 24 ++-- installs/pro.sh | 24 ++-- installs/purple-people-eater.sh | 24 ++-- installs/quiet.sh | 24 ++-- installs/red-alert.sh | 24 ++-- installs/red-sands.sh | 24 ++-- installs/relaxed.sh | 24 ++-- installs/rippedcasts.sh | 24 ++-- installs/rose-pine-dawn.sh | 24 ++-- installs/rose-pine-moon.sh | 24 ++-- installs/rose-pine.sh | 24 ++-- installs/royal.sh | 24 ++-- installs/sat.sh | 24 ++-- installs/sea-shells.sh | 24 ++-- installs/seafoam-pastel.sh | 24 ++-- installs/selenized-black.sh | 24 ++-- installs/selenized-dark.sh | 24 ++-- installs/selenized-light.sh | 24 ++-- installs/selenized-white.sh | 24 ++-- installs/seoul256-light.sh | 24 ++-- installs/seoul256.sh | 24 ++-- installs/seti.sh | 24 ++-- installs/shaman.sh | 24 ++-- installs/shel.sh | 24 ++-- installs/slate.sh | 24 ++-- installs/smyck.sh | 24 ++-- installs/snazzy.sh | 24 ++-- installs/soft-server.sh | 24 ++-- installs/solarized-darcula.sh | 24 ++-- installs/solarized-dark-higher-contrast.sh | 24 ++-- installs/solarized-dark.sh | 24 ++-- installs/solarized-light.sh | 24 ++-- installs/sonokai.sh | 24 ++-- installs/spacedust.sh | 24 ++-- installs/spacegray-eighties-dull.sh | 24 ++-- installs/spacegray-eighties.sh | 24 ++-- installs/spacegray.sh | 24 ++-- installs/sparky.sh | 24 ++-- installs/spring.sh | 24 ++-- installs/square.sh | 24 ++-- installs/srcery.sh | 24 ++-- installs/summer-pop.sh | 24 ++-- installs/sundried.sh | 24 ++-- installs/sweet-eliverlara.sh | 24 ++-- installs/sweet-terminal.sh | 24 ++-- installs/symphonic.sh | 24 ++-- installs/synthwave-alpha.sh | 24 ++-- installs/synthwave.sh | 24 ++-- installs/teerb.sh | 24 ++-- installs/tender.sh | 24 ++-- installs/terminal-basic.sh | 24 ++-- installs/terminix-dark.sh | 24 ++-- installs/thayer-bright.sh | 24 ++-- installs/tin.sh | 24 ++-- installs/tokyo-night-light.sh | 24 ++-- installs/tokyo-night-storm.sh | 24 ++-- installs/tokyo-night.sh | 24 ++-- installs/tomorrow-night-blue.sh | 24 ++-- installs/tomorrow-night-bright.sh | 24 ++-- installs/tomorrow-night-eighties.sh | 24 ++-- installs/tomorrow-night.sh | 24 ++-- installs/tomorrow.sh | 24 ++-- installs/toy-chest.sh | 24 ++-- installs/treehouse.sh | 24 ++-- installs/twilight.sh | 24 ++-- installs/ura.sh | 24 ++-- installs/urple.sh | 24 ++-- installs/vag.sh | 24 ++-- installs/vaughn.sh | 24 ++-- installs/vibrant-ink.sh | 24 ++-- installs/vs-code-dark.sh | 24 ++-- installs/vs-code-light.sh | 24 ++-- installs/warm-neon.sh | 24 ++-- installs/website.sh | 24 ++-- installs/wez.sh | 24 ++-- installs/wild-cherry.sh | 24 ++-- installs/wombat.sh | 24 ++-- installs/wryan.sh | 24 ++-- installs/wzoreck.sh | 24 ++-- installs/zenburn.sh | 24 ++-- tools/generateShFiles.py | 24 ++-- 278 files changed, 4515 insertions(+), 2276 deletions(-) diff --git a/README.md b/README.md index d505b607..6e3cd1e7 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ cd installs ```bash # Download apply script wget https://github.com/Gogh-Co/Gogh/raw/master/apply-colors.sh -# Download desired themes from Gogh/installs dir like this one: +# Download desired themes from ./installs/ like this: wget https://github.com/Gogh-Co/Gogh/raw/master/installs/selenized-dark.sh # Optional - download Alacritty dependency (may require additional python packages, see requirements.txt for more) @@ -135,15 +135,19 @@ wget https://github.com/Gogh-Co/Gogh/raw/master/apply-alacritty.py # Optional - download Terminator dependency (may require additional python packages, see requirements.txt for more) wget https://github.com/Gogh-Co/Gogh/raw/master/apply-terminator.py -# Note you can also tell the theme file where to find the the apply scripts with the following environmental variables: -# - GOGH_APPLY_SCRIPT=/path/to/file/apply-colors.sh -# - GOGH_ALACRITTY_SCRIPT=/path/to/file/apply-alacritty.py <-- only needed if applying to Alacritty terminal -# - GOGH_TERMINATOR_SCRIPT=/path/to/file/apply-terminator.py <-- only needed if applying to Terminator terminal +# You can also specify where to find the apply scripts with the following environmental variables +GOGH_APPLY_SCRIPT=/path/to/apply-colors.sh +GOGH_ALACRITTY_SCRIPT=/path/to/apply-alacritty.py # only needed if applying to Alacritty terminal +GOGH_TERMINATOR_SCRIPT=/path/to/apply-terminator.py # only needed if applying to Terminator terminal + +# Control Gogh behavior with the following environmental variables +TERMINAL=gnome-terminal # Select for which terminal to install the theme + # (see apply-colors.sh for all supported terminals) +GOGH_NONINTERACTIVE= # Make output silent and answer all prompts with default value + # (errors will still be printed) -# Select for which terminal to install the theme (see apply-colors.sh for all supported terminals) -export TERMINAL=gnome-terminal # Apply downloaded theme (apply script must be in the same folder) -bash ./selenized-dark.sh +TERMINAL=gnome-terminal bash ./selenized-dark.sh # OR specify apply script path GOGH_APPLY_SCRIPT=/path/to/file/apply-colors.sh bash ./selenized-dark.sh ``` diff --git a/apply-alacritty.py b/apply-alacritty.py index 1527a011..82039f3b 100755 --- a/apply-alacritty.py +++ b/apply-alacritty.py @@ -8,6 +8,10 @@ from ruamel.yaml import YAML # use ruamel.yaml to preserve comments in config +def printerr(*args, **kwargs): + print(*args, file=sys.stderr, **kwargs) + + def get_conf_path(): # Determine system # When we are in some Java world do extra checks @@ -58,7 +62,7 @@ def get_conf_path(): if home is not None and os.path.exists(home + '/.alacritty.toml'): return home + "/.alacritty.toml" - print("Could not find alacritty config file\nPlease make sure you have a file in one of the paths specified on\nhttps://github.com/alacritty/alacritty#configuration") + printerr("Could not find alacritty config file\nPlease make sure you have a file in one of the paths specified on\nhttps://github.com/alacritty/alacritty#configuration") sys.exit(1) # end @@ -74,6 +78,7 @@ def get_conf_path(): with open(conf_path, 'rb') as stream: data_loaded = tomli.load(stream) else: + printerr(f'Config parsing no available for config file {conf_path}') raise NotImplementedError(f'Config parsing not available for config file {conf_path}') # parse new colors @@ -86,17 +91,18 @@ def get_conf_path(): data_loaded['colors']['normal'].update(js['colors']['normal']) data_loaded['colors']['bright'].update(js['colors']['bright']) except KeyError: - print("Could not find existing 'colors' settings in your alacritty.yml file\nplease make sure to uncomment\n'colors', as well as 'primary', 'normal' and 'bright'") - print("Check the example config at\nhttps://github.com/alacritty/alacritty/releases/download/v0.12.2/alacritty.yml for more information") - print("Note that alacritty following release 0.13.0 uses toml configuration.") + printerr("Could not find existing 'colors' settings in your alacritty.yml file\nplease make sure to uncomment\n'colors', as well as 'primary', 'normal' and 'bright'") + printerr("Check the example config at\nhttps://github.com/alacritty/alacritty/releases/download/v0.12.2/alacritty.yml for more information") + printerr("Note that alacritty following release 0.13.0 uses toml configuration.") sys.exit(1) # make sure the user is okay with having their config changed -answer = input("This script will update your alacritty config at: \n" + - conf_path + "\nIt is recommended to make a copy of this file before proceeding.\nAre you sure you want to continue? (Y/N)\n") -if answer.lower() not in ['y', 'yes']: - print("Aborted") - sys.exit(1) +if not "GOGH_NONINTERACTIVE" in os.environ: + answer = input("This script will update your alacritty config at: \n" + + conf_path + "\nIt is recommended to make a copy of this file before proceeding.\nAre you sure you want to continue? (Y/N)\n") + if answer.lower() not in ['y', 'yes']: + print("Aborted") + sys.exit(1) # Write alacritty config if conf_path.endswith('yml'): diff --git a/apply-colors.sh b/apply-colors.sh index fe8a1746..a8910f4a 100755 --- a/apply-colors.sh +++ b/apply-colors.sh @@ -46,6 +46,28 @@ PARENT_PATH="$(dirname "${SCRIPT_PATH}")" # will not get inherited. Hence traps defined in gogh.sh and print-themes.sh will still trigger trap 'GLOBAL_VAR_CLEANUP; trap - EXIT' EXIT HUP INT QUIT PIPE TERM +print() { + format="${1:?missing value for print}" + shift + if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + printf "${format}" "${@}" + fi +} + +prints() { + print '%s\n' "${@}" +} + +printerr() { + format="${1:?missing value for printerr}" + shift + printf "${format}" "${@}" 1>&2 +} + +printserr() { + printerr '%s\n' "${@}" +} + # | # | Second test for TERMINAL in case user ran # | theme script directly instead of gogh.sh @@ -82,9 +104,9 @@ fi case "${TERMINAL}" in pantheon-terminal|io.elementary.t* ) if [[ -z "${GS}" ]]; then - printf '\n%s\n' "Error gsettings not found" - printf '%s\n' "sudo apt install dconf?" - printf '%s\n\n' "or export GS=/path/to/gsettings" + printerr '\n%s\n' "Error gsettings not found" + printerr '%s\n' "sudo apt install dconf?" + printerr '%s\n\n' "or export GS=/path/to/gsettings" exit 1 fi ;; @@ -92,8 +114,8 @@ case "${TERMINAL}" in mintty ) CFGFILE="${HOME}/.minttyrc" if [[ ! -f "${CFGFILE}" ]]; then - printf '\n%s\n' "Warning: Couldn't find an existing configuration file, so one will be created for you." - printf '%s\n\n' "Warning: Are you really running Cygwin's mintty?" + print '\n%s\n' "Warning: Couldn't find an existing configuration file, so one will be created for you." + print '%s\n\n' "Warning: Are you really running Cygwin's mintty?" touch "${CFGFILE}" fi ;; @@ -102,17 +124,17 @@ case "${TERMINAL}" in case "${TERMINAL}" in guake|gnome-terminal* ) if [[ -z "${DCONF}" ]] && [[ -z "${GCONF}" ]]; then - printf '\n%s\n' "Error gconftool not found!" - printf '%s\n' "sudo apt install gconftool?" - printf '%s\n\n' "or export GCONF=/path/to/gconftool-2/" + printerr '\n%s\n' "Error gconftool not found!" + printerr '%s\n' "sudo apt install gconftool?" + printerr '%s\n\n' "or export GCONF=/path/to/gconftool-2/" exit 1 fi ;; esac if [[ -z "${DCONF}" ]]; then - printf '\n%s\n' "Error dconf not found" - printf '%s\n' "sudo apt install dconf?" - printf '%s\n\n' "or export DCONF=/path/to/dconf" + printerr '\n%s\n' "Error dconf not found" + printerr '%s\n' "sudo apt install dconf?" + printerr '%s\n\n' "or export DCONF=/path/to/dconf" exit 1 fi ;; @@ -120,7 +142,7 @@ case "${TERMINAL}" in foot ) CFGFILE="${HOME}/.config/foot/foot.ini" if [[ ! -f "${CFGFILE}" ]]; then - printf '\n%s\n' "Error: Couldn't find an existing configuration file." + printerr '\n%s\n' "Error: Couldn't find an existing configuration file." exit 1 fi ;; @@ -131,7 +153,7 @@ case "${TERMINAL}" in fi CFGFILE="${KITTY_CONFIG_DIRECTORY}/kitty.conf" if [[ ! -f "${CFGFILE}" ]]; then - printf '\n%s\n' "Error: Couldn't find an existing configuration file for Kitty." + printerr '\n%s\n' "Error: Couldn't find an existing configuration file for Kitty." exit 1 fi ;; @@ -142,7 +164,7 @@ case "${TERMINAL}" in CFGFILE="${KMSCON_CONFIG_DIRECTORY}/kmscon.conf" fi if [[ ! -f "${CFGFILE}" ]]; then - printf '\n%s\n' "Error: Couldn't find an existing configuration file for KMSCon." + printerr '\n%s\n' "Error: Couldn't find an existing configuration file for KMSCon." exit 1 fi ;; @@ -151,7 +173,7 @@ case "${TERMINAL}" in konsole ) CFGFILE="${HOME}/.config/konsolerc" if [[ ! -f "${CFGFILE}" ]]; then - printf '\n%s\n' "Error: Couldn't find an existing configuration file for Konsole." + printerr '\n%s\n' "Error: Couldn't find an existing configuration file for Konsole." exit 1 fi ;; @@ -390,7 +412,7 @@ if [[ "${COLORTERM:-}" == "truecolor" ]] || [[ "${COLORTERM:-}" == "24bit" ]]; t [[ ${GOGH_DRY_RUN:-0} -eq 1 ]] && export "DEMO_COLOR_$c=\033[38;2;${1};${2};${3}m" [[ "$c" == "08" ]] && color_str+="\n" # new line done - printf '\n%b\n\n\n' "${color_str}" + print '\n%b\n\n\n' "${color_str}" unset color_str } else @@ -401,7 +423,7 @@ else color_str+="$(tput setaf $c)█████$(tput sgr0)" [[ $c == 7 ]] && color_str+="\n" # new line done - printf '\n%b\n\n' "${color_str}" + print '\n%b\n\n' "${color_str}" unset color_str } fi @@ -445,7 +467,7 @@ apply_cygwin() { # | Applying values on mintty (cygwin) # | =========================================== - echo "Patching mintty configuration file (${CFGFILE}) with new colors..." + prints "Patching mintty configuration file (${CFGFILE}) with new colors..." updateMinttyConfig "$CFGFILE" "$COLOR_01" "Black" updateMinttyConfig "$CFGFILE" "$COLOR_02" "Red" @@ -469,7 +491,7 @@ apply_cygwin() { updateMinttyConfig "$CFGFILE" "$FOREGROUND_COLOR" "Foregroundcolor" updateMinttyConfig "$CFGFILE" "$CURSOR_COLOR" "Cursorcolor" - echo "Done - please reopen your Cygwin terminal to see the changes" + prints "Done - please reopen your Cygwin terminal to see the changes" } apply_alacritty() { @@ -516,7 +538,7 @@ apply_alacritty() { elif [[ -e "${SCRIPT_PATH}/apply-alacritty.py" ]]; then python3 "${SCRIPT_PATH}/apply-alacritty.py" "$json_str" else - printf '\n%s\n' "Error: Couldn't find apply-alacritty.py file." + printerr '\n%s\n' "Error: Couldn't find apply-alacritty.py file." exit 1 fi } @@ -544,7 +566,7 @@ apply_terminator() { elif [[ -e "${SCRIPT_PATH}/apply-terminator.py" ]]; then python3 "${SCRIPT_PATH}/apply-terminator.py" "$json_str" else - printf '\n%s\n' "Error: Couldn't find apply-terminator.py." + printerr '\n%s\n' "Error: Couldn't find apply-terminator.py." exit 1 fi @@ -555,7 +577,7 @@ apply_foot() { # | Applying values on foot # | =========================================== - echo "Patching foot configuration file (${CFGFILE}) with new colors..." + prints "Patching foot configuration file (${CFGFILE}) with new colors..." updateFootConfig "$CFGFILE" "$COLOR_01" "regular0" updateFootConfig "$CFGFILE" "$COLOR_02" "regular1" @@ -578,8 +600,7 @@ apply_foot() { updateFootConfig "$CFGFILE" "$BACKGROUND_COLOR" "background" updateFootConfig "$CFGFILE" "$FOREGROUND_COLOR" "foreground" - echo "Done - please reopen your foot terminal to see the changes" - + prints "Done - please reopen your foot terminal to see the changes" } apply_kitty() { @@ -587,7 +608,7 @@ apply_kitty() { # | Applying values on Kitty # | =========================================== - echo "Patching kitty configuration file ($CFGFILE) with include of color theme file..." + prints "Patching kitty configuration file ($CFGFILE) with include of color theme file..." COLOR_FILE="colors.conf" @@ -599,7 +620,7 @@ apply_kitty() { CFGFILE="${KITTY_CONFIG_DIRECTORY}/$COLOR_FILE" - echo "Updating color theme file ($CFGFILE) with theme..." + pirnts "Updating color theme file ($CFGFILE) with theme..." rm -f "$CFGFILE" @@ -631,15 +652,15 @@ apply_kitty() { echo "cursor $CURSOR_COLOR" >> "$CFGFILE" - echo "Done - signaling kitty to reload" - killall -u ${USER} -SIGUSR1 kitty || pkill --uid $(id -u) -SIGUSR1 kitty || echo "Reload failed. Please reopen your kitty terminal to see the changes." + prints "Done - signaling kitty to reload" + killall -u ${USER} -SIGUSR1 kitty || pkill --uid $(id -u) -SIGUSR1 kitty || prints "Reload failed. Please reopen your kitty terminal to see the changes." } apply_kmscon() { # | # | Applying values on kmscon | =========================================== - echo "Patching kmscon configuration file (${CFGFILE}) with new colors..." + prints "Patching kmscon configuration file (${CFGFILE}) with new colors..." updateKmsconConfig "$CFGFILE" "$COLOR_01" "palette-black" updateKmsconConfig "$CFGFILE" "$COLOR_02" "palette-red" @@ -662,7 +683,7 @@ apply_kmscon() { updateKmsconConfig "$CFGFILE" "$BACKGROUND_COLOR" "palette-background" updateKmsconConfig "$CFGFILE" "$FOREGROUND_COLOR" "palette-foreground" - echo "Done - please restart your kmscon vt to see changes" + prints "Done - please restart your kmscon vt to see changes" } apply_konsole() { @@ -683,7 +704,7 @@ apply_konsole() { KPROFILE="${KDIR}/${PROFILE_NAME}.profile" if [[ -f "${KPROFILE}" ]]; then - echo "Profile ${PROFILE_NAME} already exists in Konsole confiuration (${KONSOLE_DIR}); Skipping ..." + prints "Profile ${PROFILE_NAME} already exists in Konsole confiuration (${KONSOLE_DIR}); Skipping ..." exit 0 fi @@ -693,7 +714,7 @@ apply_konsole() { KCOLORSCHEME="${KDIR}/${PROFILE_NAME}.colorscheme" if [[ -f "${KCOLORSCHEME}" ]]; then - echo "Color Scheme ${PROFILE_NAME} already exists in Konsole confiuration (${KONSOLE_DIR}); Skipping ..." + prints "Color Scheme ${PROFILE_NAME} already exists in Konsole confiuration (${KONSOLE_DIR}); Skipping ..." exit 0 fi @@ -769,7 +790,7 @@ apply_gtk() { profile_hashes=($(${CONFTOOL} "${PROFILE_LIST_KEY}" | tr "[]'," " ")) for profile in "${profile_hashes[@]}"; do if [[ "$(${CONFTOOL} "${BASE_DIR}${profile}/${VISIBLE_NAME}" | tr -d "'")" == "${PROFILE_NAME}" ]]; then - printf '%s\n' "Profile already exists" "Skipping..." + print '%s\n' "Profile already exists" "Skipping..." exit 0 fi done @@ -788,34 +809,33 @@ apply_gtk() { if [[ -z "$(${DCONF} list ${BASE_DIR%:})" ]]; then # Provide a user friendly error text if no saved profile exists, otherwise it will display "Error gconftool not found!" # it could happen on a newly installed system. (happened on CentOS 7) - printf '%s\n' \ - "Error, no saved profiles found!" \ + printserr "Error, no saved profiles found!" \ "Possible fix, new a profile (Terminal > Edit > Preferences > Profiles > New, then Close) and try again." \ "You can safely delete the created profile after the installation." exit 1 fi - BACKGROUND_COLOR=$(gnome_color "$BACKGROUND_COLOR") - FOREGROUND_COLOR=$(gnome_color "$FOREGROUND_COLOR") - CURSOR_COLOR=$(gnome_color "$CURSOR_COLOR") + BACKGROUND_COLOR=$(gnome_color "$BACKGROUND_COLOR") + FOREGROUND_COLOR=$(gnome_color "$FOREGROUND_COLOR") + CURSOR_COLOR=$(gnome_color "$CURSOR_COLOR") HIGHLIGHT_BG_COLOR=$(gnome_color "$HIGHLIGHT_BG_COLOR") HIGHLIGHT_FG_COLOR=$(gnome_color "$HIGHLIGHT_FG_COLOR") - COLOR_01=$(gnome_color "$COLOR_01") - COLOR_02=$(gnome_color "$COLOR_02") - COLOR_03=$(gnome_color "$COLOR_03") - COLOR_04=$(gnome_color "$COLOR_04") - COLOR_05=$(gnome_color "$COLOR_05") - COLOR_06=$(gnome_color "$COLOR_06") - COLOR_07=$(gnome_color "$COLOR_07") - COLOR_08=$(gnome_color "$COLOR_08") - COLOR_09=$(gnome_color "$COLOR_09") - COLOR_10=$(gnome_color "$COLOR_10") - COLOR_11=$(gnome_color "$COLOR_11") - COLOR_12=$(gnome_color "$COLOR_12") - COLOR_13=$(gnome_color "$COLOR_13") - COLOR_14=$(gnome_color "$COLOR_14") - COLOR_15=$(gnome_color "$COLOR_15") - COLOR_16=$(gnome_color "$COLOR_16") + COLOR_01=$(gnome_color "$COLOR_01") + COLOR_02=$(gnome_color "$COLOR_02") + COLOR_03=$(gnome_color "$COLOR_03") + COLOR_04=$(gnome_color "$COLOR_04") + COLOR_05=$(gnome_color "$COLOR_05") + COLOR_06=$(gnome_color "$COLOR_06") + COLOR_07=$(gnome_color "$COLOR_07") + COLOR_08=$(gnome_color "$COLOR_08") + COLOR_09=$(gnome_color "$COLOR_09") + COLOR_10=$(gnome_color "$COLOR_10") + COLOR_11=$(gnome_color "$COLOR_11") + COLOR_12=$(gnome_color "$COLOR_12") + COLOR_13=$(gnome_color "$COLOR_13") + COLOR_14=$(gnome_color "$COLOR_14") + COLOR_15=$(gnome_color "$COLOR_15") + COLOR_16=$(gnome_color "$COLOR_16") # copy existing settings from default profile $DCONF dump "${DEFAULT_KEY}/" | $DCONF load "${PROFILE_KEY}/" @@ -875,7 +895,11 @@ appy_tilixschemes() { if ((LOOP == OPTLENGTH)); then cp -f ${scratchdir}/* "$HOME/.config/tilix/schemes/" rm -rf "${scratchdir}" - read -r -p "All done - apply new theme? [y/N] " -n 1 TILIX_RES + if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + read -r -p "All done - apply new theme? [y/N] " -n 1 TILIX_RES + else + TILIX_RES="N" + fi if [[ ${TILIX_RES::1} =~ ^(y|Y)$ ]]; then PROFILE_KEY="${BASE_DIR}${DEFAULT_SLUG}" PROFILE_NAME="$(${DCONF} read ${PROFILE_KEY}/visible-name | tr -d \')" @@ -900,7 +924,7 @@ apply_xfce4-terminal() { if [[ -r "${XDG_CONFIG_DIRS%%:*}/Terminal/terminalrc" ]]; then cp "${XDG_CONFIG_DIRS%%:*}/Terminal/terminalrc" ${CONFFILE} else - echo "ERROR: config file not present or not writable!" + printserr "ERROR: config file not present or not writable!" exit 1 fi fi @@ -934,7 +958,11 @@ apply_xfce4-terminal() { # any of the themes in there. The color settings need to # be written there directly. if ((LOOP == OPTLENGTH)); then - read -r -p "All done - apply new theme? [y/N] " -n 1 XFCE4_APPLY_CURR_THEME + if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + read -r -p "All done - apply new theme? [y/N] " -n 1 XFCE4_APPLY_CURR_THEME + else + XFCE4_APPLY_CURR_THEME="N" + fi if [[ ${XFCE4_APPLY_CURR_THEME::1} =~ ^(y|Y)$ ]]; then if grep -q "^ColorPalette=" "${CONFFILE}"; then sed -i -r -e "s/^ColorPalette=.*/${L_COLORPALETTE}/" "${CONFFILE}" @@ -1122,8 +1150,7 @@ case "${TERMINAL}" in ;; * ) - printf '%s\n' \ - "Unsupported terminal!" \ + printserr "Unsupported terminal!" \ "" \ "Supported terminals:" \ " alacritty" \ diff --git a/apply-terminator.py b/apply-terminator.py index fbe1ff9a..c934b457 100755 --- a/apply-terminator.py +++ b/apply-terminator.py @@ -8,11 +8,20 @@ from configobj import ConfigObj + +def printerr(*args, **kwargs): + print(*args, file=sys.stderr, **kwargs) + + +def printout(*args, **kwargs): + if not "GOGH_NONINTERACTIVE" in os.environ: + print(*args, **kwargs) + + def main(gogh_conf_theme): terminator_conf_file_path = get_terminator_conf_path() profile_options = choose_profile() update_terminator_conf(terminator_conf_file_path, gogh_conf_theme, profile_options) - def get_terminator_conf_path(): @@ -39,15 +48,16 @@ def update_terminator_conf(terminator_conf_file_path,gogh_conf_theme,profile_opt config['profiles'][profile_options["profile"]]['background_color'] = js['colors']['primary']['background'] config['profiles'][profile_options["profile"]]['palette'] = js['colors']['pallete'] config.write() - print('') - print('We’ve saved your profile! Close and open your terminal to see the changes!') + printout('') + printout('We’ve saved your profile! Close and open your terminal to see the changes!') def choose_profile(): profile_answer = '' copy_default_config_answer = '' - profile_answer = strip_accents(input("Enter profile to update/create [default]: ")).strip() + if not "GOGH_NONINTERACTIVE" in os.environ: + profile_answer = strip_accents(input("Enter profile to update/create [default]: ")).strip() if profile_answer.lower() in ['', 'default']: profile_answer = 'default' else: @@ -60,7 +70,7 @@ def choose_profile(): copy_default_config_answer = 'no' break else: - print("Ops... Type 'Y' or 'N'.") + printout("Ops... Type 'Y' or 'N'.") return {"profile": profile_answer, "copy_default_config": copy_default_config_answer} @@ -68,11 +78,11 @@ def backup_conf(terminator_conf_file_path): now_str = datetime.datetime.now().strftime("%Y%m%d_%H%M%S") backup_path = f'{terminator_conf_file_path}.{now_str}' shutil.copyfile(terminator_conf_file_path, backup_path) - print('') - print('Backup created at '+ backup_path) + printout('') + printout('Backup created at '+ backup_path) def strip_accents(s): return ''.join(c for c in unicodedata.normalize('NFD', s) if unicodedata.category(c) != 'Mn') -main(sys.argv[1]) \ No newline at end of file +main(sys.argv[1]) diff --git a/installs/3024-day.sh b/installs/3024-day.sh index c399d8f5..11469df7 100755 --- a/installs/3024-day.sh +++ b/installs/3024-day.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#4A4543" # Foreground (Text) export CURSOR_COLOR="#4A4543" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/3024-night.sh b/installs/3024-night.sh index 1fe42b0d..a236abdb 100755 --- a/installs/3024-night.sh +++ b/installs/3024-night.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#A5A2A2" # Foreground (Text) export CURSOR_COLOR="#A5A2A2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/aci.sh b/installs/aci.sh index 9e585938..dff864e7 100755 --- a/installs/aci.sh +++ b/installs/aci.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#B4E1FD" # Foreground (Text) export CURSOR_COLOR="#B4E1FD" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/aco.sh b/installs/aco.sh index 1b6d87a6..52aa8f38 100755 --- a/installs/aco.sh +++ b/installs/aco.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#B4E1FD" # Foreground (Text) export CURSOR_COLOR="#B4E1FD" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/adventure-time.sh b/installs/adventure-time.sh index 622ded80..0bad40b6 100755 --- a/installs/adventure-time.sh +++ b/installs/adventure-time.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F8DCC0" # Foreground (Text) export CURSOR_COLOR="#F8DCC0" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/afterglow.sh b/installs/afterglow.sh index 729b0ddc..ec810d8b 100755 --- a/installs/afterglow.sh +++ b/installs/afterglow.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D0D0D0" # Foreground (Text) export CURSOR_COLOR="#D0D0D0" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/alien-blood.sh b/installs/alien-blood.sh index 15af2759..ac99cad5 100755 --- a/installs/alien-blood.sh +++ b/installs/alien-blood.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#637D75" # Foreground (Text) export CURSOR_COLOR="#637D75" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/apprentice.sh b/installs/apprentice.sh index 92a99f8f..b67e62fc 100755 --- a/installs/apprentice.sh +++ b/installs/apprentice.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BCBCBC" # Foreground (Text) export CURSOR_COLOR="#BCBCBC" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/argonaut.sh b/installs/argonaut.sh index af0b3a37..4c938b85 100755 --- a/installs/argonaut.sh +++ b/installs/argonaut.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFAF4" # Foreground (Text) export CURSOR_COLOR="#FFFAF4" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/arthur.sh b/installs/arthur.sh index 9bcecdee..64dd7e5e 100755 --- a/installs/arthur.sh +++ b/installs/arthur.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DDEEDD" # Foreground (Text) export CURSOR_COLOR="#DDEEDD" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/atom.sh b/installs/atom.sh index a6779a79..c06530b5 100755 --- a/installs/atom.sh +++ b/installs/atom.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C5C8C6" # Foreground (Text) export CURSOR_COLOR="#C5C8C6" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/aura.sh b/installs/aura.sh index 32e9db60..c3e5561d 100755 --- a/installs/aura.sh +++ b/installs/aura.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#EDECEE" # Foreground (Text) export CURSOR_COLOR="#EDECEE" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/ayu-dark.sh b/installs/ayu-dark.sh index 16e58395..1bac07b8 100755 --- a/installs/ayu-dark.sh +++ b/installs/ayu-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#B3B1AD" # Foreground (Text) export CURSOR_COLOR="#E6B450" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/ayu-light.sh b/installs/ayu-light.sh index e4c67488..99d3ef6c 100755 --- a/installs/ayu-light.sh +++ b/installs/ayu-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#575F66" # Foreground (Text) export CURSOR_COLOR="#FF9940" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/ayu-mirage.sh b/installs/ayu-mirage.sh index c51cf0da..e917afb0 100755 --- a/installs/ayu-mirage.sh +++ b/installs/ayu-mirage.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#CBCCC6" # Foreground (Text) export CURSOR_COLOR="#FFCC66" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/azu.sh b/installs/azu.sh index 12b430cb..bffa8568 100755 --- a/installs/azu.sh +++ b/installs/azu.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D9E6F2" # Foreground (Text) export CURSOR_COLOR="#D9E6F2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/belafonte-day.sh b/installs/belafonte-day.sh index ed914dc9..d1276aae 100755 --- a/installs/belafonte-day.sh +++ b/installs/belafonte-day.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#45373C" # Foreground (Text) export CURSOR_COLOR="#45373C" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/belafonte-night.sh b/installs/belafonte-night.sh index 183bc7ce..7bbb81cd 100755 --- a/installs/belafonte-night.sh +++ b/installs/belafonte-night.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#968C83" # Foreground (Text) export CURSOR_COLOR="#968C83" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/bim.sh b/installs/bim.sh index 60170ab7..0cb15966 100755 --- a/installs/bim.sh +++ b/installs/bim.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#A9BED8" # Foreground (Text) export CURSOR_COLOR="#A9BED8" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/birds-of-paradise.sh b/installs/birds-of-paradise.sh index 31539610..121ec138 100755 --- a/installs/birds-of-paradise.sh +++ b/installs/birds-of-paradise.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#E0DBB7" # Foreground (Text) export CURSOR_COLOR="#E0DBB7" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/blazer.sh b/installs/blazer.sh index dbec5569..40148057 100755 --- a/installs/blazer.sh +++ b/installs/blazer.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D9E6F2" # Foreground (Text) export CURSOR_COLOR="#D9E6F2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/blue-dolphin.sh b/installs/blue-dolphin.sh index c49a43e6..ebf3f018 100755 --- a/installs/blue-dolphin.sh +++ b/installs/blue-dolphin.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C5F2FF" # Foreground (Text) export CURSOR_COLOR="#FFCC00" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/bluloco-light.sh b/installs/bluloco-light.sh index 9bcdc09e..e82dab13 100755 --- a/installs/bluloco-light.sh +++ b/installs/bluloco-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#383A42" # Foreground (Text) export CURSOR_COLOR="#383A42" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/bluloco-zsh-light.sh b/installs/bluloco-zsh-light.sh index 781708c3..f09ec14b 100755 --- a/installs/bluloco-zsh-light.sh +++ b/installs/bluloco-zsh-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#383A42" # Foreground (Text) export CURSOR_COLOR="#383A42" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/borland.sh b/installs/borland.sh index d3ebc5c9..30b5c0cb 100755 --- a/installs/borland.sh +++ b/installs/borland.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFF4E" # Foreground (Text) export CURSOR_COLOR="#FFFF4E" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/breath-darker.sh b/installs/breath-darker.sh index afcc6cc5..656e5c20 100755 --- a/installs/breath-darker.sh +++ b/installs/breath-darker.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#17A88B" # Foreground (Text) export CURSOR_COLOR="#17A88B" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/breath-light.sh b/installs/breath-light.sh index b5853577..d5d9069d 100755 --- a/installs/breath-light.sh +++ b/installs/breath-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#292F34" # Foreground (Text) export CURSOR_COLOR="#292F34" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/breath-silverfox.sh b/installs/breath-silverfox.sh index 4d6cc9b4..68aa7d67 100755 --- a/installs/breath-silverfox.sh +++ b/installs/breath-silverfox.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BBBBBB" # Foreground (Text) export CURSOR_COLOR="#BBBBBB" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/breath.sh b/installs/breath.sh index 01de12f7..ee119668 100755 --- a/installs/breath.sh +++ b/installs/breath.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#17A88B" # Foreground (Text) export CURSOR_COLOR="#17A88B" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/breeze.sh b/installs/breeze.sh index 6e3f18a3..aadf4ba5 100755 --- a/installs/breeze.sh +++ b/installs/breeze.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FCFCFC" # Foreground (Text) export CURSOR_COLOR="#FCFCFC" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/broadcast.sh b/installs/broadcast.sh index c751b3ed..c182db0b 100755 --- a/installs/broadcast.sh +++ b/installs/broadcast.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#E6E1DC" # Foreground (Text) export CURSOR_COLOR="#E6E1DC" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/brogrammer.sh b/installs/brogrammer.sh index 4df29c2c..6fbf61cd 100755 --- a/installs/brogrammer.sh +++ b/installs/brogrammer.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D6DBE5" # Foreground (Text) export CURSOR_COLOR="#D6DBE5" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/butrin.sh b/installs/butrin.sh index 7d7daaa1..18178606 100755 --- a/installs/butrin.sh +++ b/installs/butrin.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F2F2F2" # Foreground (Text) export CURSOR_COLOR="#E39D93" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/c64.sh b/installs/c64.sh index 546c3d11..964facfb 100755 --- a/installs/c64.sh +++ b/installs/c64.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#7869C4" # Foreground (Text) export CURSOR_COLOR="#7869C4" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/cai.sh b/installs/cai.sh index 49eb8cb5..6b537aff 100755 --- a/installs/cai.sh +++ b/installs/cai.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D9E6F2" # Foreground (Text) export CURSOR_COLOR="#D9E6F2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/campbell.sh b/installs/campbell.sh index c0dfe915..37195f84 100755 --- a/installs/campbell.sh +++ b/installs/campbell.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#CCCCCC" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/catppuccin-frappe.sh b/installs/catppuccin-frappe.sh index f030efe7..d72138f7 100755 --- a/installs/catppuccin-frappe.sh +++ b/installs/catppuccin-frappe.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C6D0F5" # Foreground (Text) export CURSOR_COLOR="#C6D0F5" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/catppuccin-latte.sh b/installs/catppuccin-latte.sh index a3ba307c..d1fb2458 100755 --- a/installs/catppuccin-latte.sh +++ b/installs/catppuccin-latte.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#4C4F69" # Foreground (Text) export CURSOR_COLOR="#4C4F69" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/catppuccin-macchiato.sh b/installs/catppuccin-macchiato.sh index 003a699b..dc85d1c6 100755 --- a/installs/catppuccin-macchiato.sh +++ b/installs/catppuccin-macchiato.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#CAD3F5" # Foreground (Text) export CURSOR_COLOR="#CAD3F5" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/catppuccin-mocha.sh b/installs/catppuccin-mocha.sh index d8ecd755..c55341a4 100755 --- a/installs/catppuccin-mocha.sh +++ b/installs/catppuccin-mocha.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#CDD6F4" # Foreground (Text) export CURSOR_COLOR="#CDD6F4" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/chalk.sh b/installs/chalk.sh index 1b213ca8..667fecea 100755 --- a/installs/chalk.sh +++ b/installs/chalk.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D4D4D4" # Foreground (Text) export CURSOR_COLOR="#D4D4D4" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/chalkboard.sh b/installs/chalkboard.sh index a5cca7d2..8d6105db 100755 --- a/installs/chalkboard.sh +++ b/installs/chalkboard.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D9E6F2" # Foreground (Text) export CURSOR_COLOR="#D9E6F2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/chameleon.sh b/installs/chameleon.sh index 4e6eb820..3f94e0b0 100755 --- a/installs/chameleon.sh +++ b/installs/chameleon.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DEDEDE" # Foreground (Text) export CURSOR_COLOR="#DEDEDE" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/ciapre.sh b/installs/ciapre.sh index 6f985d88..d8e16053 100755 --- a/installs/ciapre.sh +++ b/installs/ciapre.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#AEA47A" # Foreground (Text) export CURSOR_COLOR="#AEA47A" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/clone-of-ubuntu.sh b/installs/clone-of-ubuntu.sh index 302d6b83..664fcf2a 100755 --- a/installs/clone-of-ubuntu.sh +++ b/installs/clone-of-ubuntu.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/clrs.sh b/installs/clrs.sh index e871b710..ecf58494 100755 --- a/installs/clrs.sh +++ b/installs/clrs.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#262626" # Foreground (Text) export CURSOR_COLOR="#262626" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/cobalt-2.sh b/installs/cobalt-2.sh index fa8799ee..b9628879 100755 --- a/installs/cobalt-2.sh +++ b/installs/cobalt-2.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/cobalt-neon.sh b/installs/cobalt-neon.sh index 7b61158f..01005b37 100755 --- a/installs/cobalt-neon.sh +++ b/installs/cobalt-neon.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#8FF586" # Foreground (Text) export CURSOR_COLOR="#8FF586" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/colorcli.sh b/installs/colorcli.sh index aa0cc4dd..fb16a62d 100755 --- a/installs/colorcli.sh +++ b/installs/colorcli.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#005F87" # Foreground (Text) export CURSOR_COLOR="#005F87" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/crayon-pony-fish.sh b/installs/crayon-pony-fish.sh index e1de4a16..3668c5dc 100755 --- a/installs/crayon-pony-fish.sh +++ b/installs/crayon-pony-fish.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#68525A" # Foreground (Text) export CURSOR_COLOR="#68525A" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/dark-pastel.sh b/installs/dark-pastel.sh index 8cd48504..ca43e2ee 100755 --- a/installs/dark-pastel.sh +++ b/installs/dark-pastel.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/darkside.sh b/installs/darkside.sh index 0d801496..f5356319 100755 --- a/installs/darkside.sh +++ b/installs/darkside.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BABABA" # Foreground (Text) export CURSOR_COLOR="#BABABA" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/dehydration.sh b/installs/dehydration.sh index 54ecb8d3..5bb6785d 100755 --- a/installs/dehydration.sh +++ b/installs/dehydration.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#CCCCCC" # Foreground (Text) export CURSOR_COLOR="#CCCCCC" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/desert.sh b/installs/desert.sh index bbb140da..e7047ec6 100755 --- a/installs/desert.sh +++ b/installs/desert.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/dimmed-monokai.sh b/installs/dimmed-monokai.sh index a60339ce..886fbb36 100755 --- a/installs/dimmed-monokai.sh +++ b/installs/dimmed-monokai.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#B9BCBA" # Foreground (Text) export CURSOR_COLOR="#B9BCBA" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/dissonance.sh b/installs/dissonance.sh index 3ab126d4..ee080ab1 100755 --- a/installs/dissonance.sh +++ b/installs/dissonance.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#DC322F" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/dracula.sh b/installs/dracula.sh index f413609c..806788c3 100755 --- a/installs/dracula.sh +++ b/installs/dracula.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#f8f8f2" # Foreground (Text) export CURSOR_COLOR="#f8f8f2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/earthsong.sh b/installs/earthsong.sh index beccfd1a..fe06395b 100755 --- a/installs/earthsong.sh +++ b/installs/earthsong.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#E5C7A9" # Foreground (Text) export CURSOR_COLOR="#E5C7A9" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/elemental.sh b/installs/elemental.sh index d098d26b..cee383b2 100755 --- a/installs/elemental.sh +++ b/installs/elemental.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#807A74" # Foreground (Text) export CURSOR_COLOR="#807A74" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/elementary.sh b/installs/elementary.sh index 1d972469..ebf76757 100755 --- a/installs/elementary.sh +++ b/installs/elementary.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F2F2F2" # Foreground (Text) export CURSOR_COLOR="#F2F2F2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/elic.sh b/installs/elic.sh index 2281d3a8..f7c6e27c 100755 --- a/installs/elic.sh +++ b/installs/elic.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F2F2F2" # Foreground (Text) export CURSOR_COLOR="#F2F2F2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/elio.sh b/installs/elio.sh index f60cd8ab..5fe2166b 100755 --- a/installs/elio.sh +++ b/installs/elio.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F2F2F2" # Foreground (Text) export CURSOR_COLOR="#F2F2F2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/espresso-libre.sh b/installs/espresso-libre.sh index 1374e3b1..cd0b9d1f 100755 --- a/installs/espresso-libre.sh +++ b/installs/espresso-libre.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#B8A898" # Foreground (Text) export CURSOR_COLOR="#B8A898" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/espresso.sh b/installs/espresso.sh index 576fe9df..4447e836 100755 --- a/installs/espresso.sh +++ b/installs/espresso.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/everblush.sh b/installs/everblush.sh index cfa63b6a..74c0fb0c 100755 --- a/installs/everblush.sh +++ b/installs/everblush.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DADADA" # Foreground (Text) export CURSOR_COLOR="#DADADA" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/everforest-dark-hard.sh b/installs/everforest-dark-hard.sh index 8f152fea..ed876c69 100755 --- a/installs/everforest-dark-hard.sh +++ b/installs/everforest-dark-hard.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D3C6AA" # Foreground (Text) export CURSOR_COLOR="#D3C6AA" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/everforest-dark-medium.sh b/installs/everforest-dark-medium.sh index 20fa8436..5b651b60 100755 --- a/installs/everforest-dark-medium.sh +++ b/installs/everforest-dark-medium.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D3C6AA" # Foreground (Text) export CURSOR_COLOR="#D3C6AA" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/everforest-dark-soft.sh b/installs/everforest-dark-soft.sh index 6924e373..22adb88f 100755 --- a/installs/everforest-dark-soft.sh +++ b/installs/everforest-dark-soft.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D3C6AA" # Foreground (Text) export CURSOR_COLOR="#D3C6AA" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/everforest-light-hard.sh b/installs/everforest-light-hard.sh index 95d4df28..5802b792 100755 --- a/installs/everforest-light-hard.sh +++ b/installs/everforest-light-hard.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#5C6A72" # Foreground (Text) export CURSOR_COLOR="#5C6A72" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/everforest-light-medium.sh b/installs/everforest-light-medium.sh index e9fab5d5..9ce4e011 100755 --- a/installs/everforest-light-medium.sh +++ b/installs/everforest-light-medium.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#5C6A72" # Foreground (Text) export CURSOR_COLOR="#5C6A72" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/everforest-light-soft.sh b/installs/everforest-light-soft.sh index 5f613d2b..63542beb 100755 --- a/installs/everforest-light-soft.sh +++ b/installs/everforest-light-soft.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#5C6A72" # Foreground (Text) export CURSOR_COLOR="#5C6A72" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/fairy-floss-dark.sh b/installs/fairy-floss-dark.sh index e67356cf..f923a625 100755 --- a/installs/fairy-floss-dark.sh +++ b/installs/fairy-floss-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C2FFDF" # Foreground (Text) export CURSOR_COLOR="#FFB8D1" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/fairy-floss.sh b/installs/fairy-floss.sh index b4de809a..54c9d198 100755 --- a/installs/fairy-floss.sh +++ b/installs/fairy-floss.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C2FFDF" # Foreground (Text) export CURSOR_COLOR="#FFB8D1" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/fishtank.sh b/installs/fishtank.sh index 7cb5be02..d3a01810 100755 --- a/installs/fishtank.sh +++ b/installs/fishtank.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#ECF0FE" # Foreground (Text) export CURSOR_COLOR="#ECF0FE" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/flat-remix.sh b/installs/flat-remix.sh index 9a48c394..84d14ec3 100755 --- a/installs/flat-remix.sh +++ b/installs/flat-remix.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/flat.sh b/installs/flat.sh index 73884be3..2cca2e1c 100755 --- a/installs/flat.sh +++ b/installs/flat.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#1ABC9C" # Foreground (Text) export CURSOR_COLOR="#1ABC9C" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/flatland.sh b/installs/flatland.sh index c2789e64..7c8485a3 100755 --- a/installs/flatland.sh +++ b/installs/flatland.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#B8DBEF" # Foreground (Text) export CURSOR_COLOR="#B8DBEF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/foxnightly.sh b/installs/foxnightly.sh index ce0e555b..748d0dea 100755 --- a/installs/foxnightly.sh +++ b/installs/foxnightly.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D7D7DB" # Foreground (Text) export CURSOR_COLOR="#D7D7DB" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/freya.sh b/installs/freya.sh index 633afa66..47585d2d 100755 --- a/installs/freya.sh +++ b/installs/freya.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#94A3A5" # Foreground (Text) export CURSOR_COLOR="#839496" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/frontend-delight.sh b/installs/frontend-delight.sh index 099c9597..b2b127d2 100755 --- a/installs/frontend-delight.sh +++ b/installs/frontend-delight.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#ADADAD" # Foreground (Text) export CURSOR_COLOR="#ADADAD" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/frontend-fun-forrest.sh b/installs/frontend-fun-forrest.sh index 6f3aa5c2..54d64748 100755 --- a/installs/frontend-fun-forrest.sh +++ b/installs/frontend-fun-forrest.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DEC165" # Foreground (Text) export CURSOR_COLOR="#DEC165" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/frontend-galaxy.sh b/installs/frontend-galaxy.sh index a6dcd97d..c8e1a404 100755 --- a/installs/frontend-galaxy.sh +++ b/installs/frontend-galaxy.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/geohot.sh b/installs/geohot.sh index 00714225..8121bbd0 100755 --- a/installs/geohot.sh +++ b/installs/geohot.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/github-dark.sh b/installs/github-dark.sh index 078d9bc6..7c4c1198 100755 --- a/installs/github-dark.sh +++ b/installs/github-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#8B949E" # Foreground (Text) export CURSOR_COLOR="#C9D1D9" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/github-light.sh b/installs/github-light.sh index 438b3cbf..cbaa2a98 100755 --- a/installs/github-light.sh +++ b/installs/github-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#1f2328" # Foreground (Text) export CURSOR_COLOR="#1f2328" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/gogh.sh b/installs/gogh.sh index 729b03c6..ae2c4bf0 100755 --- a/installs/gogh.sh +++ b/installs/gogh.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BFC7D5" # Foreground (Text) export CURSOR_COLOR="#BFC7D5" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/gooey.sh b/installs/gooey.sh index e04fc4a8..80c76f5e 100755 --- a/installs/gooey.sh +++ b/installs/gooey.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#EBEEF9" # Foreground (Text) export CURSOR_COLOR="#EBEEF9" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/google-dark.sh b/installs/google-dark.sh index 0efadd12..7f1ef4fe 100755 --- a/installs/google-dark.sh +++ b/installs/google-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#E8EAED" # Foreground (Text) export CURSOR_COLOR="#E8EAED" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/google-light.sh b/installs/google-light.sh index 71857001..3d7d9146 100755 --- a/installs/google-light.sh +++ b/installs/google-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#5F6368" # Foreground (Text) export CURSOR_COLOR="#5F6368" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/gotham.sh b/installs/gotham.sh index 86fedac8..4fee1d16 100755 --- a/installs/gotham.sh +++ b/installs/gotham.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#98D1CE" # Foreground (Text) export CURSOR_COLOR="#98D1CE" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/grape.sh b/installs/grape.sh index 905048e6..66dbca96 100755 --- a/installs/grape.sh +++ b/installs/grape.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#9F9FA1" # Foreground (Text) export CURSOR_COLOR="#9F9FA1" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/grass.sh b/installs/grass.sh index 814216d6..ae0d2645 100755 --- a/installs/grass.sh +++ b/installs/grass.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFF0A5" # Foreground (Text) export CURSOR_COLOR="#FFF0A5" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/gruvbox-dark.sh b/installs/gruvbox-dark.sh index f2e4ca97..211276de 100755 --- a/installs/gruvbox-dark.sh +++ b/installs/gruvbox-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#EBDBB2" # Foreground (Text) export CURSOR_COLOR="#EBDBB2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/gruvbox-material.sh b/installs/gruvbox-material.sh index 77cb55da..2faaa818 100755 --- a/installs/gruvbox-material.sh +++ b/installs/gruvbox-material.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D4BE98" # Foreground (Text) export CURSOR_COLOR="#D4BE98" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/gruvbox.sh b/installs/gruvbox.sh index 2f770e86..bbf37993 100755 --- a/installs/gruvbox.sh +++ b/installs/gruvbox.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#3C3836" # Foreground (Text) export CURSOR_COLOR="#3C3836" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/hardcore.sh b/installs/hardcore.sh index e386a8cd..300f30de 100755 --- a/installs/hardcore.sh +++ b/installs/hardcore.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#A0A0A0" # Foreground (Text) export CURSOR_COLOR="#A0A0A0" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/harper.sh b/installs/harper.sh index 09eda339..c6ccac82 100755 --- a/installs/harper.sh +++ b/installs/harper.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#A8A49D" # Foreground (Text) export CURSOR_COLOR="#A8A49D" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/hemisu-dark.sh b/installs/hemisu-dark.sh index 960c8ae0..528a8a78 100755 --- a/installs/hemisu-dark.sh +++ b/installs/hemisu-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#BAFFAA" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/hemisu-light.sh b/installs/hemisu-light.sh index 70d6dcc4..d9302c7d 100755 --- a/installs/hemisu-light.sh +++ b/installs/hemisu-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#444444" # Foreground (Text) export CURSOR_COLOR="#FF0054" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/highway.sh b/installs/highway.sh index 23a729bc..b96731bf 100755 --- a/installs/highway.sh +++ b/installs/highway.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#EDEDED" # Foreground (Text) export CURSOR_COLOR="#EDEDED" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/hipster-green.sh b/installs/hipster-green.sh index d9c69e11..de563d8f 100755 --- a/installs/hipster-green.sh +++ b/installs/hipster-green.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#84C138" # Foreground (Text) export CURSOR_COLOR="#84C138" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/homebrew-light.sh b/installs/homebrew-light.sh index 6276b25e..bfaf4014 100755 --- a/installs/homebrew-light.sh +++ b/installs/homebrew-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#000000" # Foreground (Text) export CURSOR_COLOR="#000000" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/homebrew-ocean.sh b/installs/homebrew-ocean.sh index ba8f0634..0b9281c1 100755 --- a/installs/homebrew-ocean.sh +++ b/installs/homebrew-ocean.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/homebrew.sh b/installs/homebrew.sh index a306147b..7b877a43 100755 --- a/installs/homebrew.sh +++ b/installs/homebrew.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#00FF00" # Foreground (Text) export CURSOR_COLOR="#00FF00" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/horizon-bright.sh b/installs/horizon-bright.sh index e86b4cb8..ef48bf1b 100755 --- a/installs/horizon-bright.sh +++ b/installs/horizon-bright.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#1C1E26" # Foreground (Text) export CURSOR_COLOR="#1C1E26" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/horizon-dark.sh b/installs/horizon-dark.sh index b9139bb3..b88dc623 100755 --- a/installs/horizon-dark.sh +++ b/installs/horizon-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FDF0ED" # Foreground (Text) export CURSOR_COLOR="#FDF0ED" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/hurtado.sh b/installs/hurtado.sh index dbef1147..9d770b84 100755 --- a/installs/hurtado.sh +++ b/installs/hurtado.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DBDBDB" # Foreground (Text) export CURSOR_COLOR="#DBDBDB" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/hybrid.sh b/installs/hybrid.sh index 3da72b89..287e4406 100755 --- a/installs/hybrid.sh +++ b/installs/hybrid.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#94A3A5" # Foreground (Text) export CURSOR_COLOR="#94A3A5" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/ibm-3270-high-contrast.sh b/installs/ibm-3270-high-contrast.sh index 625dc714..4b97c2e0 100755 --- a/installs/ibm-3270-high-contrast.sh +++ b/installs/ibm-3270-high-contrast.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FDFDFD" # Foreground (Text) export CURSOR_COLOR="#FDFDFD" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/ibm3270.sh b/installs/ibm3270.sh index a5ecc07e..49d3d529 100755 --- a/installs/ibm3270.sh +++ b/installs/ibm3270.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FDFDFD" # Foreground (Text) export CURSOR_COLOR="#FDFDFD" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/ic-green-ppl.sh b/installs/ic-green-ppl.sh index 365db278..c1f85def 100755 --- a/installs/ic-green-ppl.sh +++ b/installs/ic-green-ppl.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D9EFD3" # Foreground (Text) export CURSOR_COLOR="#D9EFD3" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/ic-orange-ppl.sh b/installs/ic-orange-ppl.sh index 1b7869d5..c91a2668 100755 --- a/installs/ic-orange-ppl.sh +++ b/installs/ic-orange-ppl.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFCB83" # Foreground (Text) export CURSOR_COLOR="#FFCB83" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/iceberg.sh b/installs/iceberg.sh index 781b8c41..77673d36 100755 --- a/installs/iceberg.sh +++ b/installs/iceberg.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#c6c8d1" # Foreground (Text) export CURSOR_COLOR="#d2d4de" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/idle-toes.sh b/installs/idle-toes.sh index 8789b6ef..a13f0e05 100755 --- a/installs/idle-toes.sh +++ b/installs/idle-toes.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/ir-black.sh b/installs/ir-black.sh index 828b1b7a..9caf5f87 100755 --- a/installs/ir-black.sh +++ b/installs/ir-black.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#EEEEEE" # Foreground (Text) export CURSOR_COLOR="#FFA560" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/jackie-brown.sh b/installs/jackie-brown.sh index 556f0aee..5a4de4a3 100755 --- a/installs/jackie-brown.sh +++ b/installs/jackie-brown.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFCC2F" # Foreground (Text) export CURSOR_COLOR="#FFCC2F" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/japanesque.sh b/installs/japanesque.sh index 37d87042..69d4f720 100755 --- a/installs/japanesque.sh +++ b/installs/japanesque.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F7F6EC" # Foreground (Text) export CURSOR_COLOR="#F7F6EC" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/jellybeans.sh b/installs/jellybeans.sh index f067a165..9508b35e 100755 --- a/installs/jellybeans.sh +++ b/installs/jellybeans.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DEDEDE" # Foreground (Text) export CURSOR_COLOR="#DEDEDE" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/jup.sh b/installs/jup.sh index fcd2f75c..138a0230 100755 --- a/installs/jup.sh +++ b/installs/jup.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#23476A" # Foreground (Text) export CURSOR_COLOR="#23476A" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/kanagawa-dragon.sh b/installs/kanagawa-dragon.sh index aadd1497..442ef4c9 100755 --- a/installs/kanagawa-dragon.sh +++ b/installs/kanagawa-dragon.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C5C9C5" # Foreground (Text) export CURSOR_COLOR="#C8C093" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/kanagawa.sh b/installs/kanagawa.sh index 676e0dc4..1302857f 100755 --- a/installs/kanagawa.sh +++ b/installs/kanagawa.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DCD7BA" # Foreground (Text) export CURSOR_COLOR="#DCD7BA" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/kibble.sh b/installs/kibble.sh index 677ad8b0..e2f79391 100755 --- a/installs/kibble.sh +++ b/installs/kibble.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F7F7F7" # Foreground (Text) export CURSOR_COLOR="#F7F7F7" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/kokuban.sh b/installs/kokuban.sh index 367ab495..6196e752 100755 --- a/installs/kokuban.sh +++ b/installs/kokuban.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D8E2D7" # Foreground (Text) export CURSOR_COLOR="#D8E2D7" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/laserwave.sh b/installs/laserwave.sh index bce777da..4a88ab5e 100755 --- a/installs/laserwave.sh +++ b/installs/laserwave.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#E0E0E0" # Foreground (Text) export CURSOR_COLOR="#C7C7C7" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/later-this-evening.sh b/installs/later-this-evening.sh index ad1dcb57..55082fe6 100755 --- a/installs/later-this-evening.sh +++ b/installs/later-this-evening.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#959595" # Foreground (Text) export CURSOR_COLOR="#959595" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/lavandula.sh b/installs/lavandula.sh index cb785e41..43bc7ee3 100755 --- a/installs/lavandula.sh +++ b/installs/lavandula.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#736E7D" # Foreground (Text) export CURSOR_COLOR="#736E7D" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/liquid-carbon-transparent.sh b/installs/liquid-carbon-transparent.sh index 9ca9dc82..ad1930d5 100755 --- a/installs/liquid-carbon-transparent.sh +++ b/installs/liquid-carbon-transparent.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#AFC2C2" # Foreground (Text) export CURSOR_COLOR="#AFC2C2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/liquid-carbon.sh b/installs/liquid-carbon.sh index e458eb3c..56740476 100755 --- a/installs/liquid-carbon.sh +++ b/installs/liquid-carbon.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#AFC2C2" # Foreground (Text) export CURSOR_COLOR="#AFC2C2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/lunaria-dark.sh b/installs/lunaria-dark.sh index e48e3273..304775aa 100755 --- a/installs/lunaria-dark.sh +++ b/installs/lunaria-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#CACED8" # Foreground (Text) export CURSOR_COLOR="#CACED8" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/lunaria-eclipse.sh b/installs/lunaria-eclipse.sh index c23461b6..731b42df 100755 --- a/installs/lunaria-eclipse.sh +++ b/installs/lunaria-eclipse.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C9CDD7" # Foreground (Text) export CURSOR_COLOR="#C9CDD7" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/lunaria-light.sh b/installs/lunaria-light.sh index 491262ca..5370e69e 100755 --- a/installs/lunaria-light.sh +++ b/installs/lunaria-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#484646" # Foreground (Text) export CURSOR_COLOR="#484646" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/maia.sh b/installs/maia.sh index cb64665a..f8f31f6e 100755 --- a/installs/maia.sh +++ b/installs/maia.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BDC3C7" # Foreground (Text) export CURSOR_COLOR="#BDC3C7" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/man-page.sh b/installs/man-page.sh index d97618d1..36ab5e19 100755 --- a/installs/man-page.sh +++ b/installs/man-page.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#000000" # Foreground (Text) export CURSOR_COLOR="#000000" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/mar.sh b/installs/mar.sh index 07f6f4c0..76192baa 100755 --- a/installs/mar.sh +++ b/installs/mar.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#23476A" # Foreground (Text) export CURSOR_COLOR="#23476A" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/material.sh b/installs/material.sh index 82fadfb5..ab969ec4 100755 --- a/installs/material.sh +++ b/installs/material.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C3C7D1" # Foreground (Text) export CURSOR_COLOR="#657B83" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/mathias.sh b/installs/mathias.sh index 58d2a4f0..b4688806 100755 --- a/installs/mathias.sh +++ b/installs/mathias.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BBBBBB" # Foreground (Text) export CURSOR_COLOR="#BBBBBB" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/medallion.sh b/installs/medallion.sh index 9555938a..dafb2d7e 100755 --- a/installs/medallion.sh +++ b/installs/medallion.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#CAC296" # Foreground (Text) export CURSOR_COLOR="#CAC296" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/miramare.sh b/installs/miramare.sh index 40036783..db02ba2c 100755 --- a/installs/miramare.sh +++ b/installs/miramare.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#e6d6ac" # Foreground (Text) export CURSOR_COLOR="#e6d6ac" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/misterioso.sh b/installs/misterioso.sh index 6dcfae4e..98799fc4 100755 --- a/installs/misterioso.sh +++ b/installs/misterioso.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#E1E1E0" # Foreground (Text) export CURSOR_COLOR="#E1E1E0" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/modus-operandi-tinted.sh b/installs/modus-operandi-tinted.sh index c6a9c627..96d84d90 100755 --- a/installs/modus-operandi-tinted.sh +++ b/installs/modus-operandi-tinted.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#000000" # Foreground (Text) export CURSOR_COLOR="#000000" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/modus-operandi.sh b/installs/modus-operandi.sh index 15506843..4dbd6c65 100755 --- a/installs/modus-operandi.sh +++ b/installs/modus-operandi.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#000000" # Foreground (Text) export CURSOR_COLOR="#000000" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/modus-vivendi-tinted.sh b/installs/modus-vivendi-tinted.sh index 1b084048..7639e97a 100755 --- a/installs/modus-vivendi-tinted.sh +++ b/installs/modus-vivendi-tinted.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#ffffff" # Foreground (Text) export CURSOR_COLOR="#ffffff" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/modus-vivendi.sh b/installs/modus-vivendi.sh index 85cfb00f..e26e6e0f 100755 --- a/installs/modus-vivendi.sh +++ b/installs/modus-vivendi.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#ffffff" # Foreground (Text) export CURSOR_COLOR="#ffffff" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/molokai.sh b/installs/molokai.sh index 6628ff39..b7dde11f 100755 --- a/installs/molokai.sh +++ b/installs/molokai.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BBBBBB" # Foreground (Text) export CURSOR_COLOR="#BBBBBB" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/mona-lisa.sh b/installs/mona-lisa.sh index 7e04a13a..a79bad3e 100755 --- a/installs/mona-lisa.sh +++ b/installs/mona-lisa.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F7D66A" # Foreground (Text) export CURSOR_COLOR="#F7D66A" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/mono-amber.sh b/installs/mono-amber.sh index 8f17eb89..efe0f710 100755 --- a/installs/mono-amber.sh +++ b/installs/mono-amber.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FF9400" # Foreground (Text) export CURSOR_COLOR="#FF9400" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/mono-cyan.sh b/installs/mono-cyan.sh index 6653d332..51766af9 100755 --- a/installs/mono-cyan.sh +++ b/installs/mono-cyan.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#00CCFF" # Foreground (Text) export CURSOR_COLOR="#00CCFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/mono-green.sh b/installs/mono-green.sh index 4303f89e..1ae323dc 100755 --- a/installs/mono-green.sh +++ b/installs/mono-green.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#0BFF00" # Foreground (Text) export CURSOR_COLOR="#0BFF00" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/mono-red.sh b/installs/mono-red.sh index 25d9954e..44f919a7 100755 --- a/installs/mono-red.sh +++ b/installs/mono-red.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FF3600" # Foreground (Text) export CURSOR_COLOR="#FF3600" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/mono-white.sh b/installs/mono-white.sh index 55d7854a..84303bc9 100755 --- a/installs/mono-white.sh +++ b/installs/mono-white.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FAFAFA" # Foreground (Text) export CURSOR_COLOR="#FAFAFA" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/mono-yellow.sh b/installs/mono-yellow.sh index 1031dafb..630c4867 100755 --- a/installs/mono-yellow.sh +++ b/installs/mono-yellow.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFD300" # Foreground (Text) export CURSOR_COLOR="#FFD300" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/monokai-dark.sh b/installs/monokai-dark.sh index 2aa6b1e3..13919d05 100755 --- a/installs/monokai-dark.sh +++ b/installs/monokai-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F8F8F2" # Foreground (Text) export CURSOR_COLOR="#F8F8F2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/monokai-pro-ristretto.sh b/installs/monokai-pro-ristretto.sh index 40e291ae..2cd79bf5 100755 --- a/installs/monokai-pro-ristretto.sh +++ b/installs/monokai-pro-ristretto.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FBF2F3" # Foreground (Text) export CURSOR_COLOR="#FBF2F3" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/monokai-pro.sh b/installs/monokai-pro.sh index 7bc2617e..e6de0085 100755 --- a/installs/monokai-pro.sh +++ b/installs/monokai-pro.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FDF9F3" # Foreground (Text) export CURSOR_COLOR="#FDF9F3" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/monokai-soda.sh b/installs/monokai-soda.sh index 3f071813..375712b6 100755 --- a/installs/monokai-soda.sh +++ b/installs/monokai-soda.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C4C5B5" # Foreground (Text) export CURSOR_COLOR="#C4C5B5" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/moonfly.sh b/installs/moonfly.sh index 03841ba5..d384f885 100755 --- a/installs/moonfly.sh +++ b/installs/moonfly.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BDBDBD" # Foreground (Text) export CURSOR_COLOR="#9E9E9E" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/morada.sh b/installs/morada.sh index 9a225596..79e0c061 100755 --- a/installs/morada.sh +++ b/installs/morada.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/n0tch2k.sh b/installs/n0tch2k.sh index b72753f6..e9f54b51 100755 --- a/installs/n0tch2k.sh +++ b/installs/n0tch2k.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#A0A0A0" # Foreground (Text) export CURSOR_COLOR="#A0A0A0" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/neon-night.sh b/installs/neon-night.sh index a549ad72..487a6dad 100755 --- a/installs/neon-night.sh +++ b/installs/neon-night.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C7C8FF" # Foreground (Text) export CURSOR_COLOR="#C7C8FF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/neopolitan.sh b/installs/neopolitan.sh index 98932f19..d8cd5b0c 100755 --- a/installs/neopolitan.sh +++ b/installs/neopolitan.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/nep.sh b/installs/nep.sh index 1d1f988a..bc88f0b4 100755 --- a/installs/nep.sh +++ b/installs/nep.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#23476A" # Foreground (Text) export CURSOR_COLOR="#23476A" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/neutron.sh b/installs/neutron.sh index a617b3a9..55b79d76 100755 --- a/installs/neutron.sh +++ b/installs/neutron.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#E6E8EF" # Foreground (Text) export CURSOR_COLOR="#E6E8EF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/night-owl.sh b/installs/night-owl.sh index 4841feb1..2ba890ac 100755 --- a/installs/night-owl.sh +++ b/installs/night-owl.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D6DEEB" # Foreground (Text) export CURSOR_COLOR="#D6DEEB" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/nightfly.sh b/installs/nightfly.sh index af1e75a0..6a21dfda 100755 --- a/installs/nightfly.sh +++ b/installs/nightfly.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BDC1C6" # Foreground (Text) export CURSOR_COLOR="#9CA1AA" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/nightlion-v1.sh b/installs/nightlion-v1.sh index 54aadebd..24b6a524 100755 --- a/installs/nightlion-v1.sh +++ b/installs/nightlion-v1.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BBBBBB" # Foreground (Text) export CURSOR_COLOR="#BBBBBB" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/nightlion-v2.sh b/installs/nightlion-v2.sh index c5a24251..983d8947 100755 --- a/installs/nightlion-v2.sh +++ b/installs/nightlion-v2.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BBBBBB" # Foreground (Text) export CURSOR_COLOR="#BBBBBB" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/nighty.sh b/installs/nighty.sh index 91213617..ef0c9895 100755 --- a/installs/nighty.sh +++ b/installs/nighty.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DFDFDF" # Foreground (Text) export CURSOR_COLOR="#DFDFDF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/nord-light.sh b/installs/nord-light.sh index 73d2d898..11f1e6ff 100755 --- a/installs/nord-light.sh +++ b/installs/nord-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#004F7C" # Foreground (Text) export CURSOR_COLOR="#439ECF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/nord.sh b/installs/nord.sh index 1365955b..489ab1d7 100755 --- a/installs/nord.sh +++ b/installs/nord.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D8DEE9" # Foreground (Text) export CURSOR_COLOR="#D8DEE9" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/novel.sh b/installs/novel.sh index 28e63cf9..55fff75a 100755 --- a/installs/novel.sh +++ b/installs/novel.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#3B2322" # Foreground (Text) export CURSOR_COLOR="#3B2322" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/obsidian.sh b/installs/obsidian.sh index 071af94d..ff727340 100755 --- a/installs/obsidian.sh +++ b/installs/obsidian.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#CDCDCD" # Foreground (Text) export CURSOR_COLOR="#CDCDCD" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/ocean-dark.sh b/installs/ocean-dark.sh index 6d178496..4249a62a 100755 --- a/installs/ocean-dark.sh +++ b/installs/ocean-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#979CAC" # Foreground (Text) export CURSOR_COLOR="#979CAC" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/oceanic-next.sh b/installs/oceanic-next.sh index 56c6037d..683bcd57 100755 --- a/installs/oceanic-next.sh +++ b/installs/oceanic-next.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#B3B8C3" # Foreground (Text) export CURSOR_COLOR="#B3B8C3" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/ollie.sh b/installs/ollie.sh index e8649ea6..148bce87 100755 --- a/installs/ollie.sh +++ b/installs/ollie.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#8A8DAE" # Foreground (Text) export CURSOR_COLOR="#8A8DAE" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/omni.sh b/installs/omni.sh index b54d71c1..6a71cf4e 100755 --- a/installs/omni.sh +++ b/installs/omni.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#ABB2BF" # Foreground (Text) export CURSOR_COLOR="#ABB2BF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/one-dark.sh b/installs/one-dark.sh index 62e2de2c..4d922d1b 100755 --- a/installs/one-dark.sh +++ b/installs/one-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#5C6370" # Foreground (Text) export CURSOR_COLOR="#5C6370" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/one-half-black.sh b/installs/one-half-black.sh index d4fea27e..6ad95ff8 100755 --- a/installs/one-half-black.sh +++ b/installs/one-half-black.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DCDFE4" # Foreground (Text) export CURSOR_COLOR="#DCDFE4" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/one-light.sh b/installs/one-light.sh index 3600f73b..9b1cc7d8 100755 --- a/installs/one-light.sh +++ b/installs/one-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#2A2B32" # Foreground (Text) export CURSOR_COLOR="#2A2B32" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/oxocarbon-dark.sh b/installs/oxocarbon-dark.sh index 65682ef1..83792755 100755 --- a/installs/oxocarbon-dark.sh +++ b/installs/oxocarbon-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#6F6F6F" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/palenight.sh b/installs/palenight.sh index 21366eca..a590369b 100755 --- a/installs/palenight.sh +++ b/installs/palenight.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BFC7D5" # Foreground (Text) export CURSOR_COLOR="#BFC7D5" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/pali.sh b/installs/pali.sh index c095383c..52a05e5c 100755 --- a/installs/pali.sh +++ b/installs/pali.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D9E6F2" # Foreground (Text) export CURSOR_COLOR="#D9E6F2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/panda.sh b/installs/panda.sh index 1dc2ce11..57135c70 100755 --- a/installs/panda.sh +++ b/installs/panda.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F0F0F0" # Foreground (Text) export CURSOR_COLOR="#F0F0F0" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/paper.sh b/installs/paper.sh index 9e7a521c..d4e90a81 100755 --- a/installs/paper.sh +++ b/installs/paper.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#000000" # Foreground (Text) export CURSOR_COLOR="#000000" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/papercolor-dark.sh b/installs/papercolor-dark.sh index 81123eae..bd6e1da1 100755 --- a/installs/papercolor-dark.sh +++ b/installs/papercolor-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D0D0D0" # Foreground (Text) export CURSOR_COLOR="#D0D0D0" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/papercolor-light.sh b/installs/papercolor-light.sh index 8e655f04..b06261c5 100755 --- a/installs/papercolor-light.sh +++ b/installs/papercolor-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#444444" # Foreground (Text) export CURSOR_COLOR="#444444" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/paraiso-dark.sh b/installs/paraiso-dark.sh index 92a7c0d8..9ccf6444 100755 --- a/installs/paraiso-dark.sh +++ b/installs/paraiso-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#A39E9B" # Foreground (Text) export CURSOR_COLOR="#A39E9B" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/paul-millr.sh b/installs/paul-millr.sh index ef58ecbd..24d793df 100755 --- a/installs/paul-millr.sh +++ b/installs/paul-millr.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F2F2F2" # Foreground (Text) export CURSOR_COLOR="#F2F2F2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/pencil-dark.sh b/installs/pencil-dark.sh index 054e62c9..77afd8d5 100755 --- a/installs/pencil-dark.sh +++ b/installs/pencil-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F1F1F1" # Foreground (Text) export CURSOR_COLOR="#F1F1F1" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/pencil-light.sh b/installs/pencil-light.sh index aa45ef14..3bac3b2c 100755 --- a/installs/pencil-light.sh +++ b/installs/pencil-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#424242" # Foreground (Text) export CURSOR_COLOR="#424242" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/peppermint.sh b/installs/peppermint.sh index 4847da0a..fe413c7e 100755 --- a/installs/peppermint.sh +++ b/installs/peppermint.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C7C7C7" # Foreground (Text) export CURSOR_COLOR="#BBBBBB" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/pixiefloss.sh b/installs/pixiefloss.sh index a260e851..c1e2bb73 100755 --- a/installs/pixiefloss.sh +++ b/installs/pixiefloss.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D1CAE8" # Foreground (Text) export CURSOR_COLOR="#D1CAE8" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/pnevma.sh b/installs/pnevma.sh index 25f4afc0..20c573e7 100755 --- a/installs/pnevma.sh +++ b/installs/pnevma.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D0D0D0" # Foreground (Text) export CURSOR_COLOR="#D0D0D0" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/powershell.sh b/installs/powershell.sh index 98703416..f2901c1f 100755 --- a/installs/powershell.sh +++ b/installs/powershell.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F6F6F7" # Foreground (Text) export CURSOR_COLOR="#F6F6F7" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/predawn.sh b/installs/predawn.sh index c32c3ecb..49a3ac52 100755 --- a/installs/predawn.sh +++ b/installs/predawn.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F1F1F1" # Foreground (Text) export CURSOR_COLOR="#F1F1F1" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/pro.sh b/installs/pro.sh index 156aeb2f..27271b47 100755 --- a/installs/pro.sh +++ b/installs/pro.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F2F2F2" # Foreground (Text) export CURSOR_COLOR="#F2F2F2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/purple-people-eater.sh b/installs/purple-people-eater.sh index e5680b11..1db26bf1 100755 --- a/installs/purple-people-eater.sh +++ b/installs/purple-people-eater.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C9D1D9" # Foreground (Text) export CURSOR_COLOR="#C9D1D9" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/quiet.sh b/installs/quiet.sh index e2119891..12a5490d 100755 --- a/installs/quiet.sh +++ b/installs/quiet.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#B9B9B9" # Foreground (Text) export CURSOR_COLOR="#A0A0A0" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/red-alert.sh b/installs/red-alert.sh index ecfd693c..789c6b47 100755 --- a/installs/red-alert.sh +++ b/installs/red-alert.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/red-sands.sh b/installs/red-sands.sh index 7ec8a17e..b080d831 100755 --- a/installs/red-sands.sh +++ b/installs/red-sands.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D7C9A7" # Foreground (Text) export CURSOR_COLOR="#D7C9A7" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/relaxed.sh b/installs/relaxed.sh index a2c48931..3e0f7b69 100755 --- a/installs/relaxed.sh +++ b/installs/relaxed.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D9D9D9" # Foreground (Text) export CURSOR_COLOR="#D9D9D9" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/rippedcasts.sh b/installs/rippedcasts.sh index d369a580..ddaad320 100755 --- a/installs/rippedcasts.sh +++ b/installs/rippedcasts.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/rose-pine-dawn.sh b/installs/rose-pine-dawn.sh index b38e663d..e17af2c8 100755 --- a/installs/rose-pine-dawn.sh +++ b/installs/rose-pine-dawn.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#575279" # Foreground (Text) export CURSOR_COLOR="#575279" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/rose-pine-moon.sh b/installs/rose-pine-moon.sh index e3de67a9..52abaf4d 100755 --- a/installs/rose-pine-moon.sh +++ b/installs/rose-pine-moon.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#E0DEF4" # Foreground (Text) export CURSOR_COLOR="#E0DEF4" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/rose-pine.sh b/installs/rose-pine.sh index df90bba2..64fb5242 100755 --- a/installs/rose-pine.sh +++ b/installs/rose-pine.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#E0DEF4" # Foreground (Text) export CURSOR_COLOR="#E0DEF4" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/royal.sh b/installs/royal.sh index 25625d53..e14f2feb 100755 --- a/installs/royal.sh +++ b/installs/royal.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#514968" # Foreground (Text) export CURSOR_COLOR="#514968" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/sat.sh b/installs/sat.sh index 3aa04914..ec59bc1f 100755 --- a/installs/sat.sh +++ b/installs/sat.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#23476A" # Foreground (Text) export CURSOR_COLOR="#23476A" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/sea-shells.sh b/installs/sea-shells.sh index 767a2bd2..5a6cd218 100755 --- a/installs/sea-shells.sh +++ b/installs/sea-shells.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DEB88D" # Foreground (Text) export CURSOR_COLOR="#DEB88D" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/seafoam-pastel.sh b/installs/seafoam-pastel.sh index 4a3963d2..b63269c7 100755 --- a/installs/seafoam-pastel.sh +++ b/installs/seafoam-pastel.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D4E7D4" # Foreground (Text) export CURSOR_COLOR="#D4E7D4" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/selenized-black.sh b/installs/selenized-black.sh index 5d387618..1522e997 100755 --- a/installs/selenized-black.sh +++ b/installs/selenized-black.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#b9b9b9" # Foreground (Text) export CURSOR_COLOR="#dedede" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/selenized-dark.sh b/installs/selenized-dark.sh index 775d1684..d224bbf7 100755 --- a/installs/selenized-dark.sh +++ b/installs/selenized-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#adbcbc" # Foreground (Text) export CURSOR_COLOR="#cad8d9" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/selenized-light.sh b/installs/selenized-light.sh index 4e72692d..a867ec18 100755 --- a/installs/selenized-light.sh +++ b/installs/selenized-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#53676d" # Foreground (Text) export CURSOR_COLOR="#3a4d53" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/selenized-white.sh b/installs/selenized-white.sh index e9af4eda..746fe80a 100755 --- a/installs/selenized-white.sh +++ b/installs/selenized-white.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#474747" # Foreground (Text) export CURSOR_COLOR="#282828" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/seoul256-light.sh b/installs/seoul256-light.sh index e7b123ed..cb8bfa67 100755 --- a/installs/seoul256-light.sh +++ b/installs/seoul256-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#4e4e4e" # Foreground (Text) export CURSOR_COLOR="#4e4e4e" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/seoul256.sh b/installs/seoul256.sh index e9854300..fe0ab73e 100755 --- a/installs/seoul256.sh +++ b/installs/seoul256.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#d0d0d0" # Foreground (Text) export CURSOR_COLOR="#d0d0d0" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/seti.sh b/installs/seti.sh index e9632508..adb22e62 100755 --- a/installs/seti.sh +++ b/installs/seti.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#CACECD" # Foreground (Text) export CURSOR_COLOR="#CACECD" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/shaman.sh b/installs/shaman.sh index ccd09bab..cb2d7155 100755 --- a/installs/shaman.sh +++ b/installs/shaman.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#405555" # Foreground (Text) export CURSOR_COLOR="#405555" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/shel.sh b/installs/shel.sh index 790769e6..4063da59 100755 --- a/installs/shel.sh +++ b/installs/shel.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#4882CD" # Foreground (Text) export CURSOR_COLOR="#4882CD" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/slate.sh b/installs/slate.sh index 14aee946..21e050d1 100755 --- a/installs/slate.sh +++ b/installs/slate.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#35B1D2" # Foreground (Text) export CURSOR_COLOR="#35B1D2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/smyck.sh b/installs/smyck.sh index 9051d5bb..256ae880 100755 --- a/installs/smyck.sh +++ b/installs/smyck.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F7F7F7" # Foreground (Text) export CURSOR_COLOR="#F7F7F7" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/snazzy.sh b/installs/snazzy.sh index 768754f3..1413cb14 100755 --- a/installs/snazzy.sh +++ b/installs/snazzy.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#EFF0EB" # Foreground (Text) export CURSOR_COLOR="#97979B" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/soft-server.sh b/installs/soft-server.sh index aabdeee8..e28df753 100755 --- a/installs/soft-server.sh +++ b/installs/soft-server.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#99A3A2" # Foreground (Text) export CURSOR_COLOR="#99A3A2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/solarized-darcula.sh b/installs/solarized-darcula.sh index 5095ac5a..a9dd2274 100755 --- a/installs/solarized-darcula.sh +++ b/installs/solarized-darcula.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D2D8D9" # Foreground (Text) export CURSOR_COLOR="#D2D8D9" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/solarized-dark-higher-contrast.sh b/installs/solarized-dark-higher-contrast.sh index 24e8fef4..43b5f927 100755 --- a/installs/solarized-dark-higher-contrast.sh +++ b/installs/solarized-dark-higher-contrast.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#9CC2C3" # Foreground (Text) export CURSOR_COLOR="#9CC2C3" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/solarized-dark.sh b/installs/solarized-dark.sh index db436109..88dba101 100755 --- a/installs/solarized-dark.sh +++ b/installs/solarized-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#839496" # Foreground (Text) export CURSOR_COLOR="#839496" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/solarized-light.sh b/installs/solarized-light.sh index 2fef971c..c9285736 100755 --- a/installs/solarized-light.sh +++ b/installs/solarized-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#657B83" # Foreground (Text) export CURSOR_COLOR="#657B83" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/sonokai.sh b/installs/sonokai.sh index 5b0f62e3..82819db6 100755 --- a/installs/sonokai.sh +++ b/installs/sonokai.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#E2E2E3" # Foreground (Text) export CURSOR_COLOR="#E2E2E3" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/spacedust.sh b/installs/spacedust.sh index e3e08c60..b22ad88b 100755 --- a/installs/spacedust.sh +++ b/installs/spacedust.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#ECF0C1" # Foreground (Text) export CURSOR_COLOR="#ECF0C1" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/spacegray-eighties-dull.sh b/installs/spacegray-eighties-dull.sh index df803380..9a469e9d 100755 --- a/installs/spacegray-eighties-dull.sh +++ b/installs/spacegray-eighties-dull.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C9C6BC" # Foreground (Text) export CURSOR_COLOR="#C9C6BC" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/spacegray-eighties.sh b/installs/spacegray-eighties.sh index 8833e791..1fce92a4 100755 --- a/installs/spacegray-eighties.sh +++ b/installs/spacegray-eighties.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#BDBAAE" # Foreground (Text) export CURSOR_COLOR="#BDBAAE" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/spacegray.sh b/installs/spacegray.sh index d88f0588..ac38c374 100755 --- a/installs/spacegray.sh +++ b/installs/spacegray.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#B3B8C3" # Foreground (Text) export CURSOR_COLOR="#B3B8C3" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/sparky.sh b/installs/sparky.sh index bbf68fc0..0434f772 100755 --- a/installs/sparky.sh +++ b/installs/sparky.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F4F5F0" # Foreground (Text) export CURSOR_COLOR="#F4F5F0" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/spring.sh b/installs/spring.sh index 5c312824..6159b0d5 100755 --- a/installs/spring.sh +++ b/installs/spring.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#ECF0C1" # Foreground (Text) export CURSOR_COLOR="#ECF0C1" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/square.sh b/installs/square.sh index cff41e21..f811c1b0 100755 --- a/installs/square.sh +++ b/installs/square.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#A1A1A1" # Foreground (Text) export CURSOR_COLOR="#A1A1A1" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/srcery.sh b/installs/srcery.sh index df97f0a7..330b5c86 100755 --- a/installs/srcery.sh +++ b/installs/srcery.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FCE8C3" # Foreground (Text) export CURSOR_COLOR="#FBB829" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/summer-pop.sh b/installs/summer-pop.sh index c6836fd4..384b9e69 100755 --- a/installs/summer-pop.sh +++ b/installs/summer-pop.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/sundried.sh b/installs/sundried.sh index 149a59e2..e3d82604 100755 --- a/installs/sundried.sh +++ b/installs/sundried.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C9C9C9" # Foreground (Text) export CURSOR_COLOR="#C9C9C9" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/sweet-eliverlara.sh b/installs/sweet-eliverlara.sh index f4c7e8a2..f25e869f 100755 --- a/installs/sweet-eliverlara.sh +++ b/installs/sweet-eliverlara.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C3C7D1" # Foreground (Text) export CURSOR_COLOR="#C3C7D1" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/sweet-terminal.sh b/installs/sweet-terminal.sh index aa42f547..90e8d650 100755 --- a/installs/sweet-terminal.sh +++ b/installs/sweet-terminal.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/symphonic.sh b/installs/symphonic.sh index 8566b5dd..42b83bba 100755 --- a/installs/symphonic.sh +++ b/installs/symphonic.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/synthwave-alpha.sh b/installs/synthwave-alpha.sh index 27fbf362..3f78673a 100755 --- a/installs/synthwave-alpha.sh +++ b/installs/synthwave-alpha.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F2F2E3" # Foreground (Text) export CURSOR_COLOR="#F2F2E3" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/synthwave.sh b/installs/synthwave.sh index 456d0415..f10a4a7e 100755 --- a/installs/synthwave.sh +++ b/installs/synthwave.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#03EDF9" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/teerb.sh b/installs/teerb.sh index bc0edb5d..9a10320a 100755 --- a/installs/teerb.sh +++ b/installs/teerb.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D0D0D0" # Foreground (Text) export CURSOR_COLOR="#D0D0D0" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/tender.sh b/installs/tender.sh index 54756bfc..d2f74c4a 100755 --- a/installs/tender.sh +++ b/installs/tender.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#EEEEEE" # Foreground (Text) export CURSOR_COLOR="#EEEEEE" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/terminal-basic.sh b/installs/terminal-basic.sh index d0b503ba..b7f39ceb 100755 --- a/installs/terminal-basic.sh +++ b/installs/terminal-basic.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#000000" # Foreground (Text) export CURSOR_COLOR="#7f7f7f" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/terminix-dark.sh b/installs/terminix-dark.sh index 6dbeba7a..61d73550 100755 --- a/installs/terminix-dark.sh +++ b/installs/terminix-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#868A8C" # Foreground (Text) export CURSOR_COLOR="#868A8C" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/thayer-bright.sh b/installs/thayer-bright.sh index de09d250..c6e11c9d 100755 --- a/installs/thayer-bright.sh +++ b/installs/thayer-bright.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#F8F8F8" # Foreground (Text) export CURSOR_COLOR="#F8F8F8" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/tin.sh b/installs/tin.sh index 47717939..884e452d 100755 --- a/installs/tin.sh +++ b/installs/tin.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/tokyo-night-light.sh b/installs/tokyo-night-light.sh index c246a661..707de8b3 100755 --- a/installs/tokyo-night-light.sh +++ b/installs/tokyo-night-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#565A6E" # Foreground (Text) export CURSOR_COLOR="#565A6E" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/tokyo-night-storm.sh b/installs/tokyo-night-storm.sh index a8cbf002..99c050db 100755 --- a/installs/tokyo-night-storm.sh +++ b/installs/tokyo-night-storm.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C0CAF5" # Foreground (Text) export CURSOR_COLOR="#C0CAF5" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/tokyo-night.sh b/installs/tokyo-night.sh index 609fe44a..21af5b2d 100755 --- a/installs/tokyo-night.sh +++ b/installs/tokyo-night.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C0CAF5" # Foreground (Text) export CURSOR_COLOR="#C0CAF5" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/tomorrow-night-blue.sh b/installs/tomorrow-night-blue.sh index 3df19ba6..34896d93 100755 --- a/installs/tomorrow-night-blue.sh +++ b/installs/tomorrow-night-blue.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFEFE" # Foreground (Text) export CURSOR_COLOR="#FFFEFE" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/tomorrow-night-bright.sh b/installs/tomorrow-night-bright.sh index cba466bb..61b72282 100755 --- a/installs/tomorrow-night-bright.sh +++ b/installs/tomorrow-night-bright.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#E9E9E9" # Foreground (Text) export CURSOR_COLOR="#E9E9E9" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/tomorrow-night-eighties.sh b/installs/tomorrow-night-eighties.sh index a36df1c8..e1721cf9 100755 --- a/installs/tomorrow-night-eighties.sh +++ b/installs/tomorrow-night-eighties.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#CCCCCC" # Foreground (Text) export CURSOR_COLOR="#CCCCCC" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/tomorrow-night.sh b/installs/tomorrow-night.sh index 218defbc..e3f2bcf4 100755 --- a/installs/tomorrow-night.sh +++ b/installs/tomorrow-night.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#C5C8C6" # Foreground (Text) export CURSOR_COLOR="#C4C8C5" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/tomorrow.sh b/installs/tomorrow.sh index e55d9580..d0ae6f01 100755 --- a/installs/tomorrow.sh +++ b/installs/tomorrow.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#4D4D4C" # Foreground (Text) export CURSOR_COLOR="#4C4C4C" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/toy-chest.sh b/installs/toy-chest.sh index c2c36431..882caabf 100755 --- a/installs/toy-chest.sh +++ b/installs/toy-chest.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#31D07B" # Foreground (Text) export CURSOR_COLOR="#31D07B" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/treehouse.sh b/installs/treehouse.sh index 2dde84ec..6cc083f4 100755 --- a/installs/treehouse.sh +++ b/installs/treehouse.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#786B53" # Foreground (Text) export CURSOR_COLOR="#786B53" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/twilight.sh b/installs/twilight.sh index 744613c6..a392fda2 100755 --- a/installs/twilight.sh +++ b/installs/twilight.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFD4" # Foreground (Text) export CURSOR_COLOR="#FFFFD4" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/ura.sh b/installs/ura.sh index 09f375f4..1c609685 100755 --- a/installs/ura.sh +++ b/installs/ura.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#23476A" # Foreground (Text) export CURSOR_COLOR="#23476A" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/urple.sh b/installs/urple.sh index 52def470..00670329 100755 --- a/installs/urple.sh +++ b/installs/urple.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#877A9B" # Foreground (Text) export CURSOR_COLOR="#877A9B" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/vag.sh b/installs/vag.sh index 040eab57..9f066132 100755 --- a/installs/vag.sh +++ b/installs/vag.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#D9E6F2" # Foreground (Text) export CURSOR_COLOR="#D9E6F2" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/vaughn.sh b/installs/vaughn.sh index 78a476e0..81b06a94 100755 --- a/installs/vaughn.sh +++ b/installs/vaughn.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DCDCCC" # Foreground (Text) export CURSOR_COLOR="#DCDCCC" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/vibrant-ink.sh b/installs/vibrant-ink.sh index cc0c1214..8446206a 100755 --- a/installs/vibrant-ink.sh +++ b/installs/vibrant-ink.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FFFFFF" # Foreground (Text) export CURSOR_COLOR="#FFFFFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/vs-code-dark.sh b/installs/vs-code-dark.sh index 57fa1d17..bb843213 100755 --- a/installs/vs-code-dark.sh +++ b/installs/vs-code-dark.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#CCCCCC" # Foreground (Text) export CURSOR_COLOR="#CCCCCC" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/vs-code-light.sh b/installs/vs-code-light.sh index 2cfb41e2..0dbe01f4 100755 --- a/installs/vs-code-light.sh +++ b/installs/vs-code-light.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#020202" # Foreground (Text) export CURSOR_COLOR="#020202" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/warm-neon.sh b/installs/warm-neon.sh index 7f424284..7adb64a6 100755 --- a/installs/warm-neon.sh +++ b/installs/warm-neon.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#AFDAB6" # Foreground (Text) export CURSOR_COLOR="#AFDAB6" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/website.sh b/installs/website.sh index e1964e4b..72b20a3d 100755 --- a/installs/website.sh +++ b/installs/website.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#d1b890" # Foreground (Text) export CURSOR_COLOR="#d1b890" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/wez.sh b/installs/wez.sh index 8bfe8b4b..d86bc7cf 100755 --- a/installs/wez.sh +++ b/installs/wez.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#B3B3B3" # Foreground (Text) export CURSOR_COLOR="#B3B3B3" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/wild-cherry.sh b/installs/wild-cherry.sh index b081a230..2d675924 100755 --- a/installs/wild-cherry.sh +++ b/installs/wild-cherry.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DAFAFF" # Foreground (Text) export CURSOR_COLOR="#DAFAFF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/wombat.sh b/installs/wombat.sh index 89a64d35..1913ed9d 100755 --- a/installs/wombat.sh +++ b/installs/wombat.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#DEDACF" # Foreground (Text) export CURSOR_COLOR="#DEDACF" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/wryan.sh b/installs/wryan.sh index 461dec43..7765dc7e 100755 --- a/installs/wryan.sh +++ b/installs/wryan.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#999993" # Foreground (Text) export CURSOR_COLOR="#999993" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/wzoreck.sh b/installs/wzoreck.sh index 28372f5c..6cca7c86 100755 --- a/installs/wzoreck.sh +++ b/installs/wzoreck.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#FCFCFA" # Foreground (Text) export CURSOR_COLOR="#FCFCFA" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/installs/zenburn.sh b/installs/zenburn.sh index 0c63287c..92680fd0 100755 --- a/installs/zenburn.sh +++ b/installs/zenburn.sh @@ -25,19 +25,27 @@ export FOREGROUND_COLOR="#dcdccc" # Foreground (Text) export CURSOR_COLOR="#dcdccc" # Cursor +apply_theme() { + if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then + bash "${GOGH_APPLY_SCRIPT}" + elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then + bash "${PARENT_PATH}/apply-colors.sh" + elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then + bash "${SCRIPT_PATH}/apply-colors.sh" + else + printf '\n%s\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${SCRIPT_PATH:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PARENT_PATH="$(dirname "${SCRIPT_PATH}")" -if [[ -e "${GOGH_APPLY_SCRIPT}" ]]; then - bash "${GOGH_APPLY_SCRIPT}" -elif [[ -e "${PARENT_PATH}/apply-colors.sh" ]]; then - bash "${PARENT_PATH}/apply-colors.sh" -elif [[ -e "${SCRIPT_PATH}/apply-colors.sh" ]]; then - bash "${SCRIPT_PATH}/apply-colors.sh" +if [ -z "${GOGH_NONINTERACTIVE+yes}" ]; then + apply_theme else - printf '\n%s\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi diff --git a/tools/generateShFiles.py b/tools/generateShFiles.py index 572ff6a8..5576e3ff 100644 --- a/tools/generateShFiles.py +++ b/tools/generateShFiles.py @@ -65,21 +65,29 @@ export CURSOR_COLOR="{cursorColor}" # Cursor +apply_theme() {{ + if [[ -e "${{GOGH_APPLY_SCRIPT}}" ]]; then + bash "${{GOGH_APPLY_SCRIPT}}" + elif [[ -e "${{PARENT_PATH}}/apply-colors.sh" ]]; then + bash "${{PARENT_PATH}}/apply-colors.sh" + elif [[ -e "${{SCRIPT_PATH}}/apply-colors.sh" ]]; then + bash "${{SCRIPT_PATH}}/apply-colors.sh" + else + printf '\\n%s\\n' "Error: Couldn't find apply-colors.sh" 1>&2 + exit 1 + fi +}} + # | =========================================================================== # | Apply Colors # | =========================================================================== SCRIPT_PATH="${{SCRIPT_PATH:-$(cd "$(dirname "${{BASH_SOURCE[0]}}")" && pwd)}}" PARENT_PATH="$(dirname "${{SCRIPT_PATH}}")" -if [[ -e "${{GOGH_APPLY_SCRIPT}}" ]]; then - bash "${{GOGH_APPLY_SCRIPT}}" -elif [[ -e "${{PARENT_PATH}}/apply-colors.sh" ]]; then - bash "${{PARENT_PATH}}/apply-colors.sh" -elif [[ -e "${{SCRIPT_PATH}}/apply-colors.sh" ]]; then - bash "${{SCRIPT_PATH}}/apply-colors.sh" +if [ -z "${{GOGH_NONINTERACTIVE+yes}}" ]; then + apply_theme else - printf '\\n%s\\n' "Error: Couldn't find apply-colors.sh" - exit 1 + apply_theme 1>/dev/null fi """