From c0564122384d85403f5064038282b87a325c1a5e Mon Sep 17 00:00:00 2001 From: vdbe <44153531+vdbe@users.noreply.github.com> Date: Sun, 12 May 2024 07:22:55 +0000 Subject: [PATCH] fixup! Feat: interpolate colors (#208) (#214) macos bash version (3.2.57) does not support the `"${val:1:-1}"` syntax --- catppuccin.tmux | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/catppuccin.tmux b/catppuccin.tmux index f1f6743..351009c 100755 --- a/catppuccin.tmux +++ b/catppuccin.tmux @@ -33,6 +33,7 @@ main() { local theme local color_interpolation=() local color_values=() + local temp theme="$(get_tmux_option "@catppuccin_flavour" "mocha")" # NOTE: Pulling in the selected theme by the theme that's being set as local # variables. @@ -47,8 +48,11 @@ main() { # '$val' stores the value. eval "local $key"="$val" + # TODO: Find a better way to strip the quotes from `$val` + temp="${val%\"}" + temp="${temp#\"}" color_interpolation+=("\#{$key}") - color_values+=("${val:1:-1}") + color_values+=("${temp}") done <"${PLUGIN_DIR}/themes/catppuccin_${theme}.tmuxtheme" # status general