diff --git a/lua/plugins/mini_starter.lua b/lua/plugins/mini_starter.lua index 7787852..0789f67 100644 --- a/lua/plugins/mini_starter.lua +++ b/lua/plugins/mini_starter.lua @@ -1,7 +1,28 @@ -MiniDeps.now( - function() - require("mini.starter").setup({ - query_updaters = "abcdefghijklmnopqrstuvwxyz0123456789_.", - }) - end -) +local function default_header() + local hour = tonumber(vim.fn.strftime("%H")) + local part_id = math.floor((hour + 4) / 8) + 1 + local day_part = ({ "evening", "morning", "afternoon", "evening" })[part_id] + local username = vim.loop.os_get_passwd()["username"] or "USERNAME" + + return ("good %s, %s"):format(day_part, username) +end + +MiniDeps.now(function() + require("mini.starter").setup({ + query_updaters = "abcdefghijklmnopqrstuvwxyz0123456789_.", + evaluate_single = true, + header = default_header, + footer = "", + items = { + --stylua: ignore start + -- builtins + { name = "edit new buffer", action = "enew", section = "builtin actions" }, + { name = "quit neovim", action = "qall", section = "builtin actions" }, + -- dependencies + { name = "update dependencies", action = "DepsUpdate", section = "dependencies" }, + { name = "snap dependencies", action = "DepsSnapSave", section = "dependencies" }, + { name = "load dependencies", action = "DepsSnapLoad", section = "dependencies" }, + --stylua: ignore end + }, + }) +end)