2023-12-21 16:21:14 +01:00
|
|
|
local runtime = require("my.tempest")
|
2023-01-10 02:38:06 +01:00
|
|
|
|
2023-09-22 18:37:24 +02:00
|
|
|
local header_string = [[
|
2023-09-04 04:58:39 +02:00
|
|
|
███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ██████╗
|
|
|
|
████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ██╗╚════██╗
|
|
|
|
██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ╚═╝ █████╔╝
|
|
|
|
██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ██╗ ╚═══██╗
|
|
|
|
██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ╚═╝██████╔╝
|
|
|
|
╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ╚═════╝
|
|
|
|
]]
|
|
|
|
|
2023-12-21 16:21:14 +01:00
|
|
|
local header = runtime.helpers.split(header_string, "\n")
|
2023-09-22 18:37:24 +02:00
|
|
|
|
2023-01-10 02:38:06 +01:00
|
|
|
local M = {
|
2023-08-30 12:08:50 +02:00
|
|
|
"goolord/alpha-nvim",
|
2024-02-25 10:46:56 +01:00
|
|
|
dependencies = { "web-devicons" },
|
2023-08-30 12:08:50 +02:00
|
|
|
config = function()
|
|
|
|
local theme = require("alpha.themes.dashboard")
|
|
|
|
theme.opts.width = 70
|
|
|
|
theme.opts.position = "center"
|
|
|
|
theme.section.buttons.val = {}
|
|
|
|
|
|
|
|
-- See [the header generator](https://patorjk.com/software/taag/#p=display&v=0&f=ANSI%20Shadow&t=NEOVim%20%3A3)
|
|
|
|
theme.section.header.opts.hl = "AlphaHeader"
|
2023-09-04 04:58:39 +02:00
|
|
|
theme.section.header.val = header
|
2023-12-21 16:21:14 +01:00
|
|
|
local version = vim.version()
|
2023-08-30 12:08:50 +02:00
|
|
|
local footer = function()
|
2023-12-21 16:21:14 +01:00
|
|
|
local versionString = "🚀 "
|
|
|
|
.. version.major
|
2023-08-30 12:08:50 +02:00
|
|
|
.. "."
|
2023-12-21 16:21:14 +01:00
|
|
|
.. version.minor
|
2023-08-30 12:08:50 +02:00
|
|
|
.. "."
|
2023-12-21 16:21:14 +01:00
|
|
|
.. version.patch
|
2023-08-30 12:08:50 +02:00
|
|
|
local lazy_ok, lazy = pcall(require, "lazy")
|
|
|
|
if lazy_ok then
|
|
|
|
local total_plugins = lazy.stats().count .. " Plugins"
|
|
|
|
local startuptime = (
|
|
|
|
math.floor(lazy.stats().startuptime * 100 + 0.5) / 100
|
|
|
|
)
|
2023-12-21 16:21:14 +01:00
|
|
|
return versionString
|
|
|
|
.. " — 🧰 "
|
2023-08-30 12:08:50 +02:00
|
|
|
.. total_plugins
|
2023-12-21 16:21:14 +01:00
|
|
|
.. " — 🕐 "
|
2023-08-30 12:08:50 +02:00
|
|
|
.. startuptime
|
|
|
|
.. "ms"
|
|
|
|
else
|
|
|
|
return version
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd("User", {
|
|
|
|
pattern = "LazyVimStarted",
|
|
|
|
callback = function()
|
|
|
|
theme.section.footer.val = footer()
|
|
|
|
vim.cmd("AlphaRedraw")
|
|
|
|
end,
|
|
|
|
desc = "Footer for Alpha",
|
|
|
|
})
|
|
|
|
|
|
|
|
theme.section.footer.opts.hl = "AlphaFooter"
|
|
|
|
theme.section.header.opts.hl = "AlphaHeader"
|
|
|
|
theme.section.buttons.opts.hl = "AlphaButton"
|
|
|
|
|
|
|
|
require("alpha").setup(theme.config)
|
|
|
|
end,
|
|
|
|
lazy = false,
|
2023-12-21 16:21:14 +01:00
|
|
|
cond = runtime.blacklist({ "vscode", "firenvim" }),
|
2023-01-10 02:38:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return M
|