refactor: update dashboard header design to ASCII art logo
This commit is contained in:
+21
-14
@@ -11,16 +11,24 @@ local M = {}
|
|||||||
M.alpha = {
|
M.alpha = {
|
||||||
opts = function()
|
opts = function()
|
||||||
local dashboard = require("alpha.themes.dashboard")
|
local dashboard = require("alpha.themes.dashboard")
|
||||||
local logo = [[
|
local header = {
|
||||||
██████╗ ██████╗ ██████╗ ████████╗██╗███████╗███████╗████████╗ ███╗ ██╗██╗ ██╗██╗███╗ ███╗
|
[[ ███ ███ ]],
|
||||||
██╔══██╗██╔═══██╗██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝╚══██╔══╝ ████╗ ██║██║ ██║██║████╗ ████║
|
[[ ████ ████ ]],
|
||||||
██████╔╝██║ ██║██║ ██║ ██║ ██║█████╗ ███████╗ ██║ ██╔██╗ ██║██║ ██║██║██╔████╔██║
|
[[ ████ █████ ]],
|
||||||
██╔══██╗██║ ██║██║ ██║ ██║ ██║██╔══╝ ╚════██║ ██║ ██║╚██╗██║╚██╗ ██╔╝██║██║╚██╔╝██║
|
[[ █ ████ █████ ]],
|
||||||
██║ ██║╚██████╔╝╚██████╔╝ ██║ ██║███████╗███████║ ██║ ██║ ╚████║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
[[ ██ ████ █████ ]],
|
||||||
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
[[ ███ ████ █████ ]],
|
||||||
]]
|
[[ ████ ████ ████ ]],
|
||||||
|
[[ █████ ████████ ]],
|
||||||
dashboard.section.header.val = vim.split(logo, "\n")
|
[[ █████ ███████ ]],
|
||||||
|
[[ █████ ██████ ]],
|
||||||
|
[[ █████ █████ ]],
|
||||||
|
[[ ████ ████ ]],
|
||||||
|
[[ ███ ███ ]],
|
||||||
|
[[ ]],
|
||||||
|
[[ N E O V I M ]],
|
||||||
|
}
|
||||||
|
dashboard.section.header.val = header
|
||||||
-- stylua: ignore start
|
-- stylua: ignore start
|
||||||
dashboard.section.buttons.val = {
|
dashboard.section.buttons.val = {
|
||||||
---@diagnostic disable: param-type-mismatch
|
---@diagnostic disable: param-type-mismatch
|
||||||
@@ -30,7 +38,7 @@ M.alpha = {
|
|||||||
dashboard.button("g", " " .. " Grep text", LazyVim.pick("live_grep")),
|
dashboard.button("g", " " .. " Grep text", LazyVim.pick("live_grep")),
|
||||||
dashboard.button("z", " " .. " LazyGit", "<cmd>lua require('config.rootiest').toggle_lazygit_float() <cr>"),
|
dashboard.button("z", " " .. " LazyGit", "<cmd>lua require('config.rootiest').toggle_lazygit_float() <cr>"),
|
||||||
dashboard.button("c", " " .. " Config", LazyVim.pick.config_files()),
|
dashboard.button("c", " " .. " Config", LazyVim.pick.config_files()),
|
||||||
dashboard.button("s", " " .. " Restore Session", [[<cmd> lua require("persistence").load() <cr>]]),
|
dashboard.button("s", " " .. " Restore Session", [[<cmd> lua require("persistence").load() <cr>]]),
|
||||||
dashboard.button("S", " " .. " Remote Session", [[<cmd> lua require("config.rootiest").load_remote() <cr>]]),
|
dashboard.button("S", " " .. " Remote Session", [[<cmd> lua require("config.rootiest").load_remote() <cr>]]),
|
||||||
dashboard.button("l", " " .. " Lazy", "<cmd> Lazy <cr>"),
|
dashboard.button("l", " " .. " Lazy", "<cmd> Lazy <cr>"),
|
||||||
dashboard.button("q", " " .. " Quit", "<cmd> qa <cr>"),
|
dashboard.button("q", " " .. " Quit", "<cmd> qa <cr>"),
|
||||||
@@ -40,8 +48,7 @@ M.alpha = {
|
|||||||
button.opts.hl = "AlphaButtons"
|
button.opts.hl = "AlphaButtons"
|
||||||
button.opts.hl_shortcut = "AlphaShortcut"
|
button.opts.hl_shortcut = "AlphaShortcut"
|
||||||
end
|
end
|
||||||
dashboard.section.header.opts.hl = "AlphaHeader"
|
dashboard.section.header.opts.hl = "Conditional"
|
||||||
dashboard.section.buttons.opts.hl = "AlphaButtons"
|
|
||||||
dashboard.section.footer.opts.hl = "AlphaFooter"
|
dashboard.section.footer.opts.hl = "AlphaFooter"
|
||||||
dashboard.opts.layout[1].val = 10
|
dashboard.opts.layout[1].val = 10
|
||||||
return dashboard
|
return dashboard
|
||||||
@@ -89,7 +96,7 @@ M.dashboard_nvim = {
|
|||||||
{ -- Restore Session
|
{ -- Restore Session
|
||||||
action = 'lua require("persistence").load()',
|
action = 'lua require("persistence").load()',
|
||||||
desc = " Restore Session",
|
desc = " Restore Session",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = "s",
|
key = "s",
|
||||||
},
|
},
|
||||||
{ -- Remote Session
|
{ -- Remote Session
|
||||||
|
|||||||
+1
-1
@@ -519,7 +519,7 @@ end
|
|||||||
---@return nil
|
---@return nil
|
||||||
function M.frecency_picker()
|
function M.frecency_picker()
|
||||||
-- Trigger the picker
|
-- Trigger the picker
|
||||||
require("telescope").extensions.frecency.frecency()
|
require("telescope").extensions.frecency.frecency({ workspace = "CWD" })
|
||||||
-- Remove `A` character that is added by the picker
|
-- Remove `A` character that is added by the picker
|
||||||
vim.api.nvim_feedkeys(
|
vim.api.nvim_feedkeys(
|
||||||
vim.api.nvim_replace_termcodes("<BS>", true, true, true),
|
vim.api.nvim_replace_termcodes("<BS>", true, true, true),
|
||||||
|
|||||||
@@ -35,13 +35,13 @@ return { -- Alpha
|
|||||||
if pcall(require, "auto-cursorline") then
|
if pcall(require, "auto-cursorline") then
|
||||||
require("auto-cursorline").disable({ buffer = true })
|
require("auto-cursorline").disable({ buffer = true })
|
||||||
end
|
end
|
||||||
dashboard.section.footer.val = "⚡ Neovim loaded "
|
dashboard.section.footer.val = " Neovim loaded "
|
||||||
.. stats.loaded
|
.. stats.loaded
|
||||||
.. "/"
|
.. "/"
|
||||||
.. stats.count
|
.. stats.count
|
||||||
.. " plugins in "
|
.. " plugins in "
|
||||||
.. ms
|
.. ms
|
||||||
.. "ms"
|
.. "ms "
|
||||||
pcall(vim.cmd.AlphaRedraw)
|
pcall(vim.cmd.AlphaRedraw)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user