From a71f3c039bed8a7c49fc390a50befec5db2c4af9 Mon Sep 17 00:00:00 2001 From: vdbe <44153531+vdbe@users.noreply.github.com> Date: Thu, 15 Aug 2024 08:40:36 +0000 Subject: [PATCH] fix: warning `@catppuccin_flavour` (#296) No longer warn when `@catppuccin_flavor` _and_ `@catppuccin_flavour` are not set --- catppuccin.tmux | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/catppuccin.tmux b/catppuccin.tmux index 613560d..261184e 100755 --- a/catppuccin.tmux +++ b/catppuccin.tmux @@ -50,8 +50,12 @@ main() { # NOTE: For backwards compatibility remove before 1.0.0 and set default for # `@catppuccin_flavor` from `""` to `"mocha"` if [ -z "$theme" ]; then - theme="$(get_tmux_option "@catppuccin_flavour" "mocha")" - tmux_echo "catppuccin warning: \\\"@catppuccin_flavour\\\" has been deprecated use \\\"@catppuccin_flavor\\\"" 103 + theme="$(get_tmux_option "@catppuccin_flavour" "")" + if [ -n "$theme" ]; then + tmux_echo "catppuccin warning: \\\"@catppuccin_flavour\\\" has been deprecated use \\\"@catppuccin_flavor\\\"" 103 + else + theme="mocha" + fi fi # NOTE: Pulling in the selected theme by the theme that's being set as local