Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to know how to modify the footer content in the astroNvim #277

Closed
Bruce-CodeMan opened this issue Apr 20, 2024 · 1 comment
Closed

Comments

@Bruce-CodeMan
Copy link

In my mac. I use the astoNvim to start the vim, I want to hide the footer

@BLACKSWORD0
Copy link

You can hide the footer by set

 opts.section.footer.val = ""

I use Astronvim too, here is my config about alpha.nvim. It includes the statement about footer. You can refer to it.

return {
  "goolord/alpha-nvim",
  config = function(_, opts)
    -- header
    local logo = {
      [[  ███        ███ ]],
      [[████       ████]],
      [[██████      █████]],
      [[███████     █████]],
      [[████████    █████]],
      [[█████ ████   █████]],
      [[█████  ████  █████]],
      [[█████   ████ █████]],
      [[█████    ████████]],
      [[█████     ███████]],
      [[█████      ██████]],
      [[████       ████]],
      [[ ███        ███  ]],
      [[                    ]],
      [[  N  E  O  V  I  M  ]],
    }
    opts.section.header.val = logo
    vim.api.nvim_set_hl(0, "AlphaNeovimLogoBlue", { fg = "#92B3F4" }) -- Indigo
    vim.api.nvim_set_hl(0, "AlphaNeovimLogoGreen", { fg = "#B3E1A1" }) -- Deep Purple

    opts.section.header.opts.hl = {
      {
        { "AlphaNeovimLogoBlue", 0, 0 },
        { "AlphaNeovimLogoGreen", 1, 23 },
        { "AlphaNeovimLogoBlue", 24, 36 },
      },
      {
        { "AlphaNeovimLogoBlue", 0, 8 },
        { "AlphaNeovimLogoGreen", 4, 30 },
        { "AlphaNeovimLogoBlue", 27, 50 },
      },
      {
        { "AlphaNeovimLogoBlue", 0, 8 },
        { "AlphaNeovimLogoGreen", 7, 30 },
        { "AlphaNeovimLogoBlue", 29, 50 },
      },
      {
        { "AlphaNeovimLogoBlue", 0, 13 },
        { "AlphaNeovimLogoGreen", 10, 39 },
        { "AlphaNeovimLogoBlue", 31, 50 },
      },
      {
        { "AlphaNeovimLogoBlue", 0, 13 },
        { "AlphaNeovimLogoGreen", 13, 39 },
        { "AlphaNeovimLogoBlue", 33, 50 },
      },
      {
        { "AlphaNeovimLogoBlue", 0, 13 },
        { "AlphaNeovimLogoGreen", 14, 39 },
        { "AlphaNeovimLogoBlue", 35, 50 },
      },
      {
        { "AlphaNeovimLogoBlue", 0, 13 },
        { "AlphaNeovimLogoGreen", 16, 39 },
        { "AlphaNeovimLogoBlue", 35, 50 },
      },
      {
        { "AlphaNeovimLogoBlue", 0, 13 },
        { "AlphaNeovimLogoGreen", 17, 39 },
        { "AlphaNeovimLogoBlue", 35, 50 },
      },
      {
        { "AlphaNeovimLogoBlue", 0, 13 },
        { "AlphaNeovimLogoGreen", 18, 39 },
        { "AlphaNeovimLogoBlue", 35, 50 },
      },
      {
        { "AlphaNeovimLogoBlue", 0, 13 },
        { "AlphaNeovimLogoGreen", 19, 39 },
        { "AlphaNeovimLogoBlue", 37, 50 },
      },
      {
        { "AlphaNeovimLogoBlue", 0, 13 },
        { "AlphaNeovimLogoGreen", 20, 39 },
        { "AlphaNeovimLogoBlue", 39, 50 },
      },
      {
        { "AlphaNeovimLogoBlue", 0, 13 },
        { "AlphaNeovimLogoGreen", 21, 39 },
        { "AlphaNeovimLogoBlue", 39, 50 },
      },
      {
        { "AlphaNeovimLogoBlue", 1, 13 },
        { "AlphaNeovimLogoGreen", 20, 38 },
        { "AlphaNeovimLogoBlue", 37, 50 },
      },
      {},
      { { "AlphaNeovimLogoGreen", 0, 9 }, { "AlphaNeovimLogoBlue", 9, 18 } },
    }
    -- button
    opts.section.buttons.val = {
      opts.button("LDR f o", "📝  Recents  "),
      opts.button("LDR f f", "🔍  Find File  "),
    }
    -- footer
    local alpha = require "alpha"
    local greeting
    local current_hour = tonumber(os.date "%H")
    if current_hour < 5 then
      greeting = "  🌙  Good night!"
    elseif current_hour < 12 then
      greeting = "  🌄  Good morning!"
    elseif current_hour < 17 then
      greeting = "  ☕  Good afternoon!"
    elseif current_hour < 20 then
      greeting = "  🌙  Good evening!"
    else
      greeting = "  🌙  Good night!"
    end
    opts.section.footer.val = greeting
    alpha.setup(opts.config)
  end,
}

Repository owner locked and limited conversation to collaborators Jul 4, 2024
@goolord goolord converted this issue into discussion #287 Jul 4, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants