local alpha = require("alpha") local dashboard = require("alpha.themes.dashboard") local function footer() local total_plugins = #require("lazy").plugins() local version = vim.version() local nvim_version_info = " NVIM v" .. version.major .. "." .. version.minor .. "." .. version.patch return nvim_version_info .. " 󰏖 " .. total_plugins .. " plugins" end -- Set header dashboard.section.header.val = { " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣭⣿⣶⣿⣦⣼⣆ ", " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", " ⠈ ⠈⢿⣿⣟⠦⠄⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", " ⣸⣿⣿⢧⠄⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", " ⢠⣿⣿⣿⠈ ⠡⠌⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿ ", " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷⠄ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", "⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", "⠙⠃ ⣼⣿⡟⠌ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿⠐⣿⣿⡇ ⠛⠻⢷⣄", " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ⠁", " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣀⣤⣾⡿⠃ ", "⢀⣀⠀⣠⣀⣠⣾⣿⣿⡿⠛⠋⠉⠉⠉ ⠉⠉⠉⠉⠛⠻⣿⣿⣷⣄⣀⢿⡽⢻⣦", "⠻⠶⠾⠿⠿⠿⠋⠉ N E O V I M ⠉⠻⠿⠿⠿⠿⠿⠋", } -- Set menu dashboard.section.buttons.val = { dashboard.button( "e", " New file" , ":ene startinsert "), dashboard.button( "q", "󰩈 Quit NVIM", ":qa"), } vim.api.nvim_create_autocmd("VimEnter", { once = true, callback = function() math.randomseed(os.time()) local fg_color = tostring(math.random(0, 12)) local hi_setter = "hi AlphaHeader ctermfg=" vim.cmd(hi_setter .. fg_color) end }) dashboard.section.footer.val = footer() dashboard.section.header.opts.hl = "Include" dashboard.section.footer.opts.hl = "String" alpha.setup(dashboard.opts)