return function()
	local dashboard = require("alpha.themes.dashboard")
	require("modules.utils").gen_alpha_hl()

	-- Header
	dashboard.section.header.val = require("core.settings").dashboard_image
	dashboard.section.header.opts.hl = "AlphaHeader"

	-- Buttons
	local icons = {
		documents = require("modules.utils.icons").get("documents", true),
		git = require("modules.utils.icons").get("git", true),
		ui = require("modules.utils.icons").get("ui", true),
		misc = require("modules.utils.icons").get("misc", true),
	}

	dashboard.section.buttons.val = {
		dashboard.button("f", icons.documents.Files .. " Find file", "<cmd>Telescope find_files<cr>"),
		dashboard.button("e", icons.ui.NewFile .. " New file", "<cmd>enew<cr>"),
		dashboard.button("p", icons.git.Repo .. " Find project", "<cmd>Telescope projects<cr>"),
		dashboard.button("y", icons.ui.Sort .. " File frecency", "<cmd>Telescope frecency<cr>"),
		dashboard.button("r", icons.ui.History .. " Recent files", "<cmd>Telescope oldfiles<cr>"),
		dashboard.button("t", icons.ui.List .. " Find text", "<cmd>Telescope live_grep<cr>"),
		dashboard.button("u", icons.ui.CloudDownload .. " Update", "<cmd>Lazy sync<cr>"),
		dashboard.button("q", icons.ui.SignOut .. " Quit", "<cmd>qa<cr>"),
	}

	dashboard.section.buttons.opts.hl = "AlphaButtons"

	-- Footer
	local function footer()
		-- Number of plugins
		local stats = require("lazy").stats()
		local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
		local plugins_text = "    v"
			.. vim.version().major
			.. "."
			.. vim.version().minor
			.. "."
			.. vim.version().patch
			.. "     "
			.. stats.count
			.. " plugins in "
			.. ms
			.. "ms"

		-- Quote
		-- local fortune = require("alpha.fortune")
		-- local quote = table.concat(fortune(), "\n")
		local site = "https://blog.charliie.dev/"

		return plugins_text .. "\n" .. "        " .. site
		-- return "https://blog.charliie.dev/"
	end

	dashboard.section.footer.val = footer()
	dashboard.section.footer.opts.hl = "AlphaFooter"

	local head_butt_padding = 1
	local occu_height = #dashboard.section.header.val + 2 * #dashboard.section.buttons.val + head_butt_padding
	local header_padding = math.max(0, math.ceil((vim.fn.winheight(0) - occu_height) * 0.25))
	local foot_butt_padding = 0

	dashboard.config.layout = {
		{ type = "padding", val = header_padding },
		dashboard.section.header,
		{ type = "padding", val = head_butt_padding },
		dashboard.section.buttons,
		{ type = "padding", val = foot_butt_padding },
		dashboard.section.footer,
	}

	dashboard.opts.opts.noautocmd = true
	require("modules.utils").load_plugin("alpha", dashboard.opts)

	vim.api.nvim_create_autocmd("User", {
		pattern = "LazyVimStarted",
		callback = function()
			dashboard.section.footer.val = footer()
			pcall(vim.cmd.AlphaRedraw)
		end,
	})
end
