2023-02-12 07:52:40 +07:00
|
|
|
local colorscheme = "gruvbox-baby"
|
2023-03-05 10:49:03 +07:00
|
|
|
local lst_style =
|
|
|
|
{ "sonokai", "sonokai_atlantis", "sonokai_andromeda", "sonokai_shusia", "sonokai_maia", "sonokai_espresso" }
|
|
|
|
local lst_material = { "material", "material_deepocean", "material_palenight", "material_lighter", "material_darker" }
|
|
|
|
local lst_onedark =
|
|
|
|
{ "onedark", "onedark_darker", "onedark_cool", "onedark_deep,onedark_warm", "onedark_warmer", "onedark_light" }
|
2023-03-04 11:53:44 +07:00
|
|
|
local data_exists, custom_ui = pcall(require, "custom.ui")
|
|
|
|
if data_exists then
|
|
|
|
if type(custom_ui) == "table" then
|
|
|
|
local color = custom_ui.colorscheme
|
|
|
|
if color ~= nil then
|
|
|
|
colorscheme = color
|
|
|
|
else
|
|
|
|
colorscheme = "gruvbox-baby"
|
|
|
|
end
|
2023-03-04 12:30:04 +07:00
|
|
|
local transparent_mode = custom_ui.transparent_mode
|
|
|
|
if transparent_mode ~= nil then
|
|
|
|
if transparent_mode == 1 then
|
|
|
|
vim.g.gruvbox_baby_transparent_mode = 1
|
2023-03-04 15:33:41 +07:00
|
|
|
vim.g.sonokai_transparent_background = 2
|
2023-03-04 12:30:04 +07:00
|
|
|
end
|
|
|
|
end
|
2023-03-04 11:53:44 +07:00
|
|
|
end
|
|
|
|
end
|
2023-03-05 10:49:03 +07:00
|
|
|
|
|
|
|
for _, v in pairs(lst_style) do
|
|
|
|
if v == colorscheme then
|
|
|
|
colorscheme = "sonokai"
|
|
|
|
break
|
|
|
|
end
|
|
|
|
end
|
|
|
|
for _, v in pairs(lst_material) do
|
|
|
|
if v == colorscheme then
|
|
|
|
colorscheme = "material"
|
|
|
|
break
|
|
|
|
end
|
|
|
|
end
|
|
|
|
for _, v in pairs(lst_onedark) do
|
|
|
|
if v == colorscheme then
|
|
|
|
colorscheme = "onedark"
|
|
|
|
break
|
|
|
|
end
|
|
|
|
end
|
2023-01-15 00:17:41 +07:00
|
|
|
local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
|
|
|
|
if not status_ok then
|
2023-03-04 11:53:44 +07:00
|
|
|
local ok, _ = pcall(vim.cmd, "colorscheme " .. "gruvbox-baby")
|
|
|
|
if not ok then
|
|
|
|
return
|
|
|
|
end
|
2023-01-15 00:17:41 +07:00
|
|
|
end
|