Neovim configs for 2023. Hopefully they last.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

34 lines
747 B

require('gruvbox').setup {
}
local day = 9
local night = 18
local hour = os.date("*t").hour
local themes = { "gruvbox", "gruvbox" }
local theme = 1
if day <= hour and hour < night then
theme = 1
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.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, {})