-- Various dashboard adjustments

return {
  "nvimdev/dashboard-nvim",
  opts = function(_, opts)
    -- Remove the original "config" button
    table.remove(opts.config.center, 5)

    -- Build a new button
    local button = {
      action = "Telescope find_files cwd=~/.local/share/chezmoi/",
      desc = "Dotfiles",
      icon = "⚙️  ",
      key = "c",
    }

    button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
    button.key_format = "  %s"
    table.insert(opts.config.center, 5, button)
  end,
  keys = {
    { "<leader>qc", "<cmd>Telescope find_files cwd=~/.local/share/chezmoi<CR>", desc = "Find in dotfiles" },
  },
}
