diff --git a/config/colors.lua b/config/colors.lua index 0beba62..7ef4277 100644 --- a/config/colors.lua +++ b/config/colors.lua @@ -10,9 +10,25 @@ local cur_hour = wezterm.time.now():format("%H") local hour_angle = require("funcs").get_hour_angle(cur_hour) +--- catppuccin theme +---@see catppuccin_documentation https://github.com/catppuccin/wezterm +local function get_colorscheme(appearance) + if WEZTERM.gui then + if appearance:find("Dark") then + return "Catppuccin Mocha" + else + return "Catppuccin Latte" + end + else + return "Catppuccin Mocha" + end +end + +THEME = get_colorscheme(wezterm.gui.get_appearance()) + local opts = { -- Color Scheme - color_scheme = "Catppuccin Mocha", + color_scheme = THEME, -- Tab Bar Colors colors = { -- Compose Cursor diff --git a/plugins/tabline.lua b/plugins/tabline.lua index 8f84aa6..ada87f9 100644 --- a/plugins/tabline.lua +++ b/plugins/tabline.lua @@ -9,7 +9,7 @@ local tabline = wezterm.plugin.require("https://github.com/michaelbrusegard/tabl local tab_opts = { options = { icons_enabled = true, - theme = "Catppuccin Mocha", + theme = THEME, section_separators = { left = wezterm.nerdfonts.ple_right_half_circle_thick, right = wezterm.nerdfonts.ple_left_half_circle_thick,