summaryrefslogtreecommitdiff
path: root/lua/config/dashboard.lua
blob: c317a71f204423e2af417a9f5018fbc71be956ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
return function()
local db = require("dashboard")

-- Safe fortune function
local function quote()
  local handle = io.popen("fortune -s")      -- run fortune
  local result = handle:read("*a")           -- read all output
  handle:close()
  -- Remove all newlines and carriage returns
  result = result:gsub("\r",""):gsub("\n"," ")
  return result
end

db.setup {
  theme = "hyper",
  config = {
    week_header = {
      enable = false  -- or true if you want date/time header
    },
    header = {
      " ███╗   ██╗███████╗ ██████╗ ██╗   ██╗██╗███╗   ███╗",
      " ████╗  ██║██╔════╝██╔═══██╗██║   ██║██║████╗ ████║",
      " ██╔██╗ ██║█████╗  ██║   ██║██║   ██║██║██╔████╔██║",
      " ██║╚██╗██║██╔══╝  ██║   ██║╚██╗ ██╔╝██║██╔╝██╔╝██║",
      " ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║",
      " ╚═╝  ╚═══╝╚══════╝╚═════╝   ╚═══╝  ╚═╝╚═╝     ╚═╝",
      "                                                  ",
      "   " .. os.date("%A, %B %d, %Y"),  -- your custom date/day line
      "",
      "[TIP: To exit Vim, use a Sledgehammer!]",
      ""   -- optional empty line to separate from center shortcuts
    },
    shortcut = {
      {
        icon = " ",
        desc = "New File",
        key  = "n",
        action = "enew"
      },
      {
        icon = " ",
        desc = "Find File",
        key  = "f",
        action = "Telescope find_files"
      },
      {
        icon = " ",
        desc = "Recent Files",
        key  = "r",
        action = "Telescope oldfiles"
      },
      {
        icon = "󰓢 ",
        desc = "Open Config",
        key  = "c",
        action = "edit ~/.config/nvim/"
      },
      {
        icon = "󰣪 ",
        desc = "SLEDGEHAMMER!",
        action = "qa"
      },
    },
    packages = {
      enable = true  -- set to true if you want plugin count display
    },
    mru = {
      enable = true,  -- set true if you want MRU files
      limit  = 10,
      icon   = " ",
      label  = "Recent",
      cwd_only = false
    },
    project = {
      enable = false,  -- set true if you want project list
      limit  = 8,
      icon   = " ",
      label  = "Projects",
      action = "Telescope find_files cwd="
    },
    footer = { "", quote() },
  },
}
end