Skip to content

Yamakiraa/alphanvim_rows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Made this since couldnt find anywhere help with rows on alphavim here is the core of the code

return{
  'goolord/alpha-nvim',
  event = 'VimEnter',
  dependencies = { 'nvim-tree/nvim-web-devicons' },
  config = function()
   local dashboard = require('alpha.themes.dashboard')
    dashboard.section.header.val = {
'⣖⣶⣶⣶⣶⢶⣶⡖⣶⣶⣶⣶⣶⣶⡖⡔⢆⠦⡒⡔⡆⣶',
'⡗⣿⣿⣿⢷⡣⡟⣾⣿⡿⢿⣟⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿',
'⣿⡸⣿⣏⢷⣟⣵⣿⣾⣿⣿⣿⣿⣾⣻⢿⣿⣿⣿⣿⣿⣿',
'⣞⢏⣵⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣟⡿⣿⣿⣿⣿',
'⡿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡽⣿⣿⣿',
'⡯⣿⣿⣿⣿⡿⠐⡇⡼⣣⢸⠃⠛⢢⣿⣿⣿⣿⣿⢐⣿⣿',
'⡯⣿⣿⣿⣿⣁⣇⣜⣰⣆⣎⣼⣏⣼⡿⣱⣿⣿⣿⢸⣿⣿',
'⡕⣿⣿⣿⣿⣿⣿⡍⢩⢫⣟⢩⣭⢹⣿⣿⣿⣿⣿⢸⣿⣿',
'⣏⣿⣿⣿⣿⣿⡟⣃⣻⣿⣁⣫⣴⣿⣿⣿⣿⣿⣿⢺⣿⣿',
'⣗⣿⣿⣿⣿⣿⢻⡟⡟⣿⡟⣿⠟⣿⣿⣿⣿⣿⣿⣹⣿⣿',
'⡳⢹⣿⣿⣿⣿⠈⣾⡇⡿⣰⠈⣼⢸⣿⣿⣿⣿⣿⢸⣿⣿',
'⣿⢸⣿⣿⣿⣿⣾⣿⣷⣷⣿⣷⣿⣾⣿⣿⣿⣿⣯⣿⣿⣿',
'⢿⣷⡿⣻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣫⣾⣿⣿⣿',
'⣿⣿⣺⢵⣷⣯⣛⣛⢟⡿⠿⠿⡿⣟⣛⡯⡵⣿⡿⡿⢿⣿',
}
--make 2buttons
    local newfile_butt = dashboard.button("e", "New File", ":ene <BAR> startinsert<CR>")
    local quit_butt = dashboard.button("q", "Quit", ":qa<CR>")
--decorate 1st to look like 2 buttons and 2nd to disappear
    newfile_butt.val  = "      [r] recent               [c] Config  " --make first button look like 2
    newfile_butt.opts.shortcut = "" --remove shortcut icon
    quit_butt.val = ""              --remove 2nd button
    quit_butt.opts.shortcut=""      --remove 2nd button icon
    --make row with arr and buttons in
    local row1 = {  
      type = "group", 
      val = { newfile_butt, quit_butt },
      opts = {spacing = 0,},
    }
    --layout dashboard
    dashboard.opts.layout = {
      dashboard.section.header,
      { type = "padding", val = 0 },
      row1,
      dashboard.section.footer,
    }
    require('alpha').setup(dashboard.opts)
  end,
}

this is a bit bigger version where i put a bit more details for example you have one group for all hidden buttons so they go to the bottom and free you one or two lines extra

return{
  'goolord/alpha-nvim',
  event = 'VimEnter',
  dependencies = { 'nvim-tree/nvim-web-devicons' },
  config = function()
   local dashboard = require('alpha.themes.dashboard')
    dashboard.section.header.val = {
'⣖⣶⣶⣶⣶⢶⣶⡖⣶⣶⣶⣶⣶⣶⡖⡔⢆⠦⡒⡔⡆⣶',
'⡗⣿⣿⣿⢷⡣⡟⣾⣿⡿⢿⣟⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿',
'⣿⡸⣿⣏⢷⣟⣵⣿⣾⣿⣿⣿⣿⣾⣻⢿⣿⣿⣿⣿⣿⣿',
'⣞⢏⣵⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣟⡿⣿⣿⣿⣿',
'⡿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡽⣿⣿⣿',
'⡯⣿⣿⣿⣿⡿⠐⡇⡼⣣⢸⠃⠛⢢⣿⣿⣿⣿⣿⢐⣿⣿',
'⡯⣿⣿⣿⣿⣁⣇⣜⣰⣆⣎⣼⣏⣼⡿⣱⣿⣿⣿⢸⣿⣿',
'⡕⣿⣿⣿⣿⣿⣿⡍⢩⢫⣟⢩⣭⢹⣿⣿⣿⣿⣿⢸⣿⣿',
'⣏⣿⣿⣿⣿⣿⡟⣃⣻⣿⣁⣫⣴⣿⣿⣿⣿⣿⣿⢺⣿⣿',
'⣗⣿⣿⣿⣿⣿⢻⡟⡟⣿⡟⣿⠟⣿⣿⣿⣿⣿⣿⣹⣿⣿',
'⡳⢹⣿⣿⣿⣿⠈⣾⡇⡿⣰⠈⣼⢸⣿⣿⣿⣿⣿⢸⣿⣿',
'⣿⢸⣿⣿⣿⣿⣾⣿⣷⣷⣿⣷⣿⣾⣿⣿⣿⣿⣯⣿⣿⣿',
'⢿⣷⡿⣻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣫⣾⣿⣿⣿',
'⣿⣿⣺⢵⣷⣯⣛⣛⢟⡿⠿⠿⡿⣟⣛⡯⡵⣿⡿⡿⢿⣿',
}
    local newfile_butt = dashboard.button("e", "New File", ":ene <BAR> startinsert<CR>")
    local quit_butt = dashboard.button("q", "Quit", ":qa<CR>") 
    local NeoT_butt = dashboard.button("t", "🌳 NeoTree", ":Neotree toggle<CR>")
    local config_butt = dashboard.button("c", "  Config", ":edit $MYVIMRC<CR>") 
    local lazy = dashboard.button("l", "💤 Lazy", ":Lazy<CR>")
    local mason = dashboard.button("m", "Mason", ":Mason<CR>") 
    local write = dashboard.button("w", "write", ":w<CR>")
    newfile_butt.val  = "      [e] newfile               [q] quit  "
    newfile_butt.opts.shortcut = ""
    quit_butt.val = ""
    quit_butt.opts.shortcut=""
    NeoT_butt.val  = "     [t]Neotree     [c]Config        [l]Lazy💤 "
    NeoT_butt.opts.shortcut = ""
    config_butt.val = ""
    config_butt.opts.shortcut=""
    lazy.val = ""
    lazy.opts.shortcut=""
    mason.val  = "      [m] Mason               [w] write "
    mason.opts.shortcut = ""
    write.val = ""
    write.opts.shortcut=""
    local row1 = {
      type = "group",
      val = { newfile_butt },
      opts = {spacing = 0,},
    }
    local row2 = {
      type = "group",
      val = { NeoT_butt,},
      opts = {spacing = 0,},
    }
    local row3 = {
      type = "group",
      val = { mason,},
      opts = {spacing = 0,},
    }
 local empty = {
      type = "group",
      val = { quit_butt,lazy,config_butt,write},
      opts = {spacing = 0,},
    }
    dashboard.opts.layout = {
      dashboard.section.header,
      { type = "padding", val = 0 },
      row1,
      { type = "padding", val = 1 },
      row2,
      { type = "padding", val = 2 },
      row3,
      { type = "padding", val = 1 },
      empty,
      dashboard.section.footer,
    }
    ```
    require('alpha').setup(dashboard.opts)
  end,
}

About

Simple rows for alpha-vim since i couldn't find where or how to do them.Hope that helps other people like me.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages