✨ Feat(colorscheme): automate light/dark theme
Automates selecting between Catppuccin Mocha and Catppuccin Latte depending on the darkmode state.
This commit is contained in:
+17
-1
@@ -10,9 +10,25 @@ local cur_hour = wezterm.time.now():format("%H")
|
|||||||
|
|
||||||
local hour_angle = require("funcs").get_hour_angle(cur_hour)
|
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 = {
|
local opts = {
|
||||||
-- Color Scheme
|
-- Color Scheme
|
||||||
color_scheme = "Catppuccin Mocha",
|
color_scheme = THEME,
|
||||||
-- Tab Bar Colors
|
-- Tab Bar Colors
|
||||||
colors = {
|
colors = {
|
||||||
-- Compose Cursor
|
-- Compose Cursor
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ local tabline = wezterm.plugin.require("https://github.com/michaelbrusegard/tabl
|
|||||||
local tab_opts = {
|
local tab_opts = {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = "Catppuccin Mocha",
|
theme = THEME,
|
||||||
section_separators = {
|
section_separators = {
|
||||||
left = wezterm.nerdfonts.ple_right_half_circle_thick,
|
left = wezterm.nerdfonts.ple_right_half_circle_thick,
|
||||||
right = wezterm.nerdfonts.ple_left_half_circle_thick,
|
right = wezterm.nerdfonts.ple_left_half_circle_thick,
|
||||||
|
|||||||
Reference in New Issue
Block a user