From 583dbf1ab11ec9b3f343ed20d29bcc3799adb023 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Sun, 6 Aug 2023 02:51:02 +0700 Subject: [PATCH] chore(nvim): only allow wezterm dynamic change --- data/nvim/init.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/data/nvim/init.lua b/data/nvim/init.lua index 8f7b8f1..30dec8e 100644 --- a/data/nvim/init.lua +++ b/data/nvim/init.lua @@ -98,8 +98,13 @@ require("lazy").setup({ vim.cmd("colorscheme catppuccin-mocha") end, set_light_mode = function() - vim.api.nvim_set_option("background", "light") - vim.cmd("colorscheme catppuccin-latte") + if vim.env.TERM_PROGRAM == "WezTerm" then + vim.api.nvim_set_option("background", "light") + vim.cmd("colorscheme catppuccin-latte") + else + vim.api.nvim_set_option("background", "dark") + vim.cmd("colorscheme catppuccin-mocha") + end end, }) end,