🎨 Automatic Colorscheme

- Store/restore the colorscheme when changed
- Falls back on $KITTY_THEME and then the default catppuccin-frappe
This commit is contained in:
2024-07-14 00:38:52 -04:00
parent 803b2712bf
commit bf1be126fa
3 changed files with 26 additions and 6 deletions
+13
View File
@@ -9,6 +9,19 @@ vim.api.nvim_create_user_command("Q", function()
vim.cmd.qall()
end, { force = true })
-- ------------------------------ Auto-Commands --------------------------------
-- Autosave Colorscheme
vim.api.nvim_create_autocmd("ColorScheme", {
desc = "Store colorscheme name",
callback = function()
print("colorscheme:", vim.g.colors_name)
vim.fn.writefile(
{ vim.g.colors_name },
vim.fn.stdpath("config") .. "/.colorscheme"
)
end,
})
-- --------------------------------- Keymaps -----------------------------------
local wk = require("which-key")
wk.add({