From 23872d465d764482dc07e1c457c75042f976263c Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 16 Nov 2024 23:36:56 +0100 Subject: [PATCH] add theme autoswitcher --- dot_config/fish/fish_plugins | 1 + dot_config/fish/private_functions/update_theme.fish | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 dot_config/fish/private_functions/update_theme.fish diff --git a/dot_config/fish/fish_plugins b/dot_config/fish/fish_plugins index f5b16b5..1c79101 100644 --- a/dot_config/fish/fish_plugins +++ b/dot_config/fish/fish_plugins @@ -4,3 +4,4 @@ franciscolourenco/done jorgebucaran/autopair.fish PatrickF1/fzf.fish IlanCosman/tide@v6 +catppuccin/fish diff --git a/dot_config/fish/private_functions/update_theme.fish b/dot_config/fish/private_functions/update_theme.fish new file mode 100644 index 0000000..403eff4 --- /dev/null +++ b/dot_config/fish/private_functions/update_theme.fish @@ -0,0 +1,7 @@ +function update_theme --on-variable macOS_Theme + if [ "$macOS_Theme" = "dark" ] + yes | fish_config theme save "Catppuccin Mocha" + else if [ "$macOS_Theme" = "light" ] + yes | fish_config theme save "Catppuccin Latte" + end +end