|
|
@ -1,12 +1,11 @@ |
|
|
|
require('catppuccin').setup { |
|
|
|
transparent_background = false, |
|
|
|
require('gruvbox').setup { |
|
|
|
} |
|
|
|
|
|
|
|
local day = 9 |
|
|
|
local night = 18 |
|
|
|
local hour = os.date("*t").hour |
|
|
|
|
|
|
|
local themes = { "catppuccin-macchiato", "catppuccin-mocha" } |
|
|
|
local themes = { "gruvbox", "gruvbox" } |
|
|
|
local theme = 1 |
|
|
|
|
|
|
|
if day <= hour and hour < night then |
|
|
@ -15,14 +14,21 @@ else |
|
|
|
theme = 2 |
|
|
|
end |
|
|
|
vim.cmd.colorscheme(themes[theme]) |
|
|
|
vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) |
|
|
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) |
|
|
|
|
|
|
|
local function toggletheme() |
|
|
|
if theme == 1 then |
|
|
|
theme = 2 |
|
|
|
vim.cmd('set background=dark') |
|
|
|
else |
|
|
|
theme = 1 |
|
|
|
vim.cmd('set background=light') |
|
|
|
end |
|
|
|
vim.cmd.colorscheme(themes[theme]) |
|
|
|
--vim.cmd.colorscheme(themes[theme]) |
|
|
|
|
|
|
|
--vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) |
|
|
|
--vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) |
|
|
|
end |
|
|
|
|
|
|
|
vim.api.nvim_create_user_command("ToggleTheme", toggletheme, {}) |