You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.7 KiB

4 weeks ago
4 weeks ago
  1. return {
  2. 'goolord/alpha-nvim',
  3. dependencies = {
  4. 'echasnovski/mini.icons',
  5. 'MaximilianLloyd/ascii.nvim',
  6. },
  7. config = function ()
  8. local alpha = require("alpha")
  9. local dashboard = require("alpha.themes.dashboard")
  10. local neovim_lean = {
  11. [[ ]],
  12. [[ _/ _/ _/ _/ _/ ]],
  13. [[ _/_/ _/ _/_/ _/_/ _/ _/ _/_/_/ _/_/ ]],
  14. [[ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ ]],
  15. [[ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ ]],
  16. [[ _/ _/ _/_/_/ _/_/ _/ _/ _/ _/ _/ ]],
  17. [[ ]],
  18. }
  19. -- Set the ASCII art
  20. dashboard.section.header.val = require('ascii').get_random('text', 'slogons')
  21. -- Remove other sections (buttons, footer, etc.) to show only the ASCII art
  22. dashboard.section.buttons.val = {}
  23. dashboard.section.footer.val = {}
  24. local function get_center_padding()
  25. local total_lines = vim.fn.winheight(0)
  26. local art_lines = #dashboard.section.header.val
  27. return math.floor((total_lines - art_lines) / 2)
  28. end
  29. -- Center the header
  30. dashboard.opts.layout = {
  31. { type = "padding", val = get_center_padding() }, -- Add some vertical padding
  32. dashboard.section.header,
  33. }
  34. -- Set up alpha with the modified dashboard
  35. alpha.setup(dashboard.opts)
  36. end
  37. }