Feat(colorscheme): automate light/dark theme

Automates selecting between Catppuccin Mocha and Catppuccin Latte depending on the darkmode state.
This commit is contained in:
2024-10-07 13:32:34 -04:00
parent 45a58cdac6
commit 2c5e7661d6
2 changed files with 18 additions and 2 deletions
+17 -1
View File
@@ -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
+1 -1
View File
@@ -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,