Skip to content
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

Full screen banner/header? #136

Open
ChrisMGeo opened this issue Aug 10, 2022 · 5 comments
Open

Full screen banner/header? #136

ChrisMGeo opened this issue Aug 10, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@ChrisMGeo
Copy link

Sometimes I want to keep larger ASCII art as the header on the home page, but due to how the header is just on top of the options like new file, recent, etc. It doesn't look as good as I'd want it to.
A solution to this would be to render the header on the entire full page and not on top of the options and render the options over it and make this an additional feature to enable in the user/init.lua and not a default.

@goolord
Copy link
Owner

goolord commented Aug 11, 2022

i'm not totally sure what you mean, something like this?

alpha.setup {
    layout = {
        { type = "text", val = someAsciiArt, opts = { position = "center" } },
    }
}

@goolord
Copy link
Owner

goolord commented Aug 11, 2022

ohhh like a background or something. interesting. i'll give it a shot at some point

@LamprosPitsillos
Copy link
Contributor

I was just thinking about this... How would one start on this? I am interested in doing a PR.
But it sounds a bit impossible...
First of all is it possible to put the ascii art behind the MRU/Dashboard lists?
Would be interested in discussing this.

@goolord
Copy link
Owner

goolord commented Feb 10, 2023

probably a new element for writing virtual text is the approach I would take

@goolord
Copy link
Owner

goolord commented Feb 11, 2023

trying to experiment this but i can't get the virtual text to actually draw... maybe someone else will have better luck or I'll get to this some other time

function layout_element.virtual_text(el, conf, state)
    local ns = state.vt_ns
    if ns == nil then
        ns = vim.api.nvim_create_namespace('alpha')
        state.vt_ns = ns
    end
    local opts = vim.tbl_extend("keep", el.opts or {}, {
        virt_text = el.val,
        virt_text_pos = 'overlay',
        virt_text_win_col = 10,
        virt_text_hide = false,
    })
    vim.api.nvim_buf_set_mark(state.buffer, 'a', el.line(state.line), el.col, opts)
    return {}, {}
end

@goolord goolord added the enhancement New feature or request label Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants