From 9af3b97d36dbee3f86a59fdc665a1ead59e293db Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 17 Nov 2024 11:44:09 +0100 Subject: [PATCH] move to iterm script & add function to update nvim theme --- dot_config/fish/private_functions/update_nvim_theme.fish | 5 +++++ dot_config/fish/private_functions/update_theme.fish | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 dot_config/fish/private_functions/update_nvim_theme.fish delete mode 100644 dot_config/fish/private_functions/update_theme.fish diff --git a/dot_config/fish/private_functions/update_nvim_theme.fish b/dot_config/fish/private_functions/update_nvim_theme.fish new file mode 100644 index 0000000..a0e2f6f --- /dev/null +++ b/dot_config/fish/private_functions/update_nvim_theme.fish @@ -0,0 +1,5 @@ +function update_nvim_theme --description 'Update neovim theme with light/dark mode' --argument theme +for addr in /var/folders/7r/l55lwv013hl_g8gc971k7kgw0000gn/T/nvim.gaugendre/**/* +nvim --server $addr --remote-send ":set background=$theme " +end +end diff --git a/dot_config/fish/private_functions/update_theme.fish b/dot_config/fish/private_functions/update_theme.fish deleted file mode 100644 index 403eff4..0000000 --- a/dot_config/fish/private_functions/update_theme.fish +++ /dev/null @@ -1,7 +0,0 @@ -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