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.
 
 

28 lines
514 B

require('catppuccin').setup {
transparent_background = false,
}
local day = 9
local night = 18
local hour = os.date("*t").hour
local themes = { "catppuccin-macchiato", "catppuccin-mocha" }
local theme = 1
if day <= hour and hour < night then
theme = 1
else
theme = 2
end
vim.cmd.colorscheme(themes[theme])
local function toggletheme()
if theme == 1 then
theme = 2
else
theme = 1
end
vim.cmd.colorscheme(themes[theme])
end
vim.api.nvim_create_user_command("ToggleTheme", toggletheme, {})