🐛 Bug(colorscheme): fixes to colorscheme automation
This commit is contained in:
+11
-5
@@ -13,22 +13,28 @@ local hour_angle = require("funcs").get_hour_angle(cur_hour)
|
|||||||
--- catppuccin theme
|
--- catppuccin theme
|
||||||
---@see catppuccin_documentation https://github.com/catppuccin/wezterm
|
---@see catppuccin_documentation https://github.com/catppuccin/wezterm
|
||||||
local function get_colorscheme(appearance)
|
local function get_colorscheme(appearance)
|
||||||
|
local scheme = {}
|
||||||
if WEZTERM.gui then
|
if WEZTERM.gui then
|
||||||
if appearance:find("Dark") then
|
if appearance:find("Dark") then
|
||||||
return "Catppuccin Mocha"
|
scheme.theme = "Catppuccin Mocha"
|
||||||
|
scheme.mode = "dark"
|
||||||
else
|
else
|
||||||
return "Catppuccin Latte"
|
scheme.theme = "Catppuccin Latte"
|
||||||
|
scheme.mode = "light"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return "Catppuccin Mocha"
|
scheme.theme = "Catppuccin Mocha"
|
||||||
|
scheme.mode = "dark"
|
||||||
end
|
end
|
||||||
|
return scheme
|
||||||
end
|
end
|
||||||
|
|
||||||
THEME = get_colorscheme(wezterm.gui.get_appearance())
|
COLORTHEME = get_colorscheme(wezterm.gui.get_appearance()).theme
|
||||||
|
COLORMODE = get_colorscheme(wezterm.gui.get_appearance()).mode
|
||||||
|
|
||||||
local opts = {
|
local opts = {
|
||||||
-- Color Scheme
|
-- Color Scheme
|
||||||
color_scheme = THEME,
|
color_scheme = COLORTHEME,
|
||||||
-- Tab Bar Colors
|
-- Tab Bar Colors
|
||||||
colors = {
|
colors = {
|
||||||
-- Compose Cursor
|
-- Compose Cursor
|
||||||
|
|||||||
+14
-14
@@ -1,26 +1,25 @@
|
|||||||
local wezterm = WEZTERM
|
|
||||||
local config = CONFIG
|
local config = CONFIG
|
||||||
local types = require("types")
|
local types = require("types")
|
||||||
local funcs = require("funcs")
|
local funcs = require("funcs")
|
||||||
local batteries = BATTERIES
|
local batteries = BATTERIES
|
||||||
|
|
||||||
local tabline = wezterm.plugin.require("https://github.com/michaelbrusegard/tabline.wez")
|
local tabline = WEZTERM.plugin.require("https://github.com/michaelbrusegard/tabline.wez")
|
||||||
|
|
||||||
local tab_opts = {
|
local tab_opts = {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = THEME,
|
theme = COLORTHEME,
|
||||||
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,
|
||||||
},
|
},
|
||||||
component_separators = {
|
component_separators = {
|
||||||
left = wezterm.nerdfonts.ple_right_half_circle_thin,
|
left = WEZTERM.nerdfonts.ple_right_half_circle_thin,
|
||||||
right = wezterm.nerdfonts.ple_left_half_circle_thin,
|
right = WEZTERM.nerdfonts.ple_left_half_circle_thin,
|
||||||
},
|
},
|
||||||
tab_separators = {
|
tab_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,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
@@ -33,7 +32,7 @@ local tab_opts = {
|
|||||||
tab_active = {
|
tab_active = {
|
||||||
{
|
{
|
||||||
"zoomed",
|
"zoomed",
|
||||||
icon = wezterm.nerdfonts.oct_zoom_in,
|
icon = WEZTERM.nerdfonts.oct_zoom_in,
|
||||||
padding = { left = 0, right = 0 },
|
padding = { left = 0, right = 0 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -43,7 +42,7 @@ local tab_opts = {
|
|||||||
end,
|
end,
|
||||||
padding = { left = 0, right = 0 },
|
padding = { left = 0, right = 0 },
|
||||||
},
|
},
|
||||||
wezterm.nerdfonts.ple_right_half_circle_thin,
|
WEZTERM.nerdfonts.ple_right_half_circle_thin,
|
||||||
{
|
{
|
||||||
"tab",
|
"tab",
|
||||||
fmt = function(str)
|
fmt = function(str)
|
||||||
@@ -55,13 +54,13 @@ local tab_opts = {
|
|||||||
{ "parent", padding = { left = 0, right = 0 } },
|
{ "parent", padding = { left = 0, right = 0 } },
|
||||||
"/",
|
"/",
|
||||||
{ "cwd", padding = { left = 0, right = 1 } },
|
{ "cwd", padding = { left = 0, right = 1 } },
|
||||||
wezterm.nerdfonts.ple_left_half_circle_thin,
|
WEZTERM.nerdfonts.ple_left_half_circle_thin,
|
||||||
{ "process", padding = { left = 0, right = 0 } },
|
{ "process", padding = { left = 0, right = 0 } },
|
||||||
},
|
},
|
||||||
tab_inactive = {
|
tab_inactive = {
|
||||||
{
|
{
|
||||||
"zoomed",
|
"zoomed",
|
||||||
icon = wezterm.nerdfonts.oct_zoom_in,
|
icon = WEZTERM.nerdfonts.oct_zoom_in,
|
||||||
padding = { left = 0, right = 0 },
|
padding = { left = 0, right = 0 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -125,6 +124,7 @@ local function apply_tabline_config(conf)
|
|||||||
top = 0,
|
top = 0,
|
||||||
bottom = 0,
|
bottom = 0,
|
||||||
}
|
}
|
||||||
|
tabline.get_colors()
|
||||||
local normbg = require("tabline.config").colors.normal_mode.c.bg
|
local normbg = require("tabline.config").colors.normal_mode.c.bg
|
||||||
conf.colors = {
|
conf.colors = {
|
||||||
tab_bar = {
|
tab_bar = {
|
||||||
@@ -132,7 +132,7 @@ local function apply_tabline_config(conf)
|
|||||||
inactive_tab_edge = normbg,
|
inactive_tab_edge = normbg,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
config.status_update_interval = 500
|
conf.status_update_interval = 500
|
||||||
end
|
end
|
||||||
|
|
||||||
apply_tabline_config(config)
|
apply_tabline_config(config)
|
||||||
|
|||||||
Reference in New Issue
Block a user