Whichkey rework, dashboard, yazi

This commit is contained in:
agryphus 2024-02-20 21:15:43 -05:00
parent d9ac8b2bd1
commit 92bd99d8ea
13 changed files with 197 additions and 39 deletions

View file

@ -0,0 +1,58 @@
local alpha = require("alpha")
local dashboard = require("alpha.themes.dashboard")
math.randomseed(os.time())
local function pick_color()
local colors = {"String", "Identifier", "Keyword", "Number"}
return colors[math.random(#colors)]
end
local function footer()
local total_plugins = #vim.tbl_keys(packer_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 <BAR> startinsert <CR>"),
dashboard.button( "q", "󰩈 Quit NVIM", ":qa<CR>"),
}
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)