diff --git a/lua/custom/plugins/alpha.lua b/lua/custom/plugins/alpha.lua index 60c19d43..90b411b8 100644 --- a/lua/custom/plugins/alpha.lua +++ b/lua/custom/plugins/alpha.lua @@ -1,7 +1,49 @@ return { - 'goolord/alpha-nvim', - dependencies = 'nvim-tree/nvim-web-devicons', - config = function() - require 'alpha'.setup(require 'alpha.themes.dashboard'.config) - end + 'goolord/alpha-nvim', + dependencies = 'nvim-tree/nvim-web-devicons', + config = function() + -- require 'alpha'.setup(require 'alpha.themes.dashboard'.config) + local alpha = require("alpha") + local dashboard = require("alpha.themes.dashboard") + + dashboard.section.header.val = { + " ", + " ", + " ", + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", + } + + -- Set menu + dashboard.section.buttons.val = { + dashboard.button("e", " New file", ":ene startinsert "), + dashboard.button("r", " Recently used files", ":Telescope oldfiles"), + dashboard.button("f", " Find file", ":Telescope find_files"), + dashboard.button("t", " Find text", ":Telescope live_grep "), + dashboard.button("q", " Quit NVIM", ":qa"), + } + + -- Set footer + local handle = assert(io.popen('fortune -s')) + local fortune = handle:read("*all") + handle:close() + dashboard.section.footer.val = fortune + dashboard.section.header.opts.hl = "Title" + dashboard.section.buttons.opts.hl = "Debug" + dashboard.section.footer.opts.hl = "Conceal" + dashboard.config.opts.noautocmd = true + + -- vim.cmd[[autocmd User AlphaReady echo 'ready']] + + alpha.setup(dashboard.opts) + end }