aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lua/plugins/dashboard.lua59
1 files changed, 34 insertions, 25 deletions
diff --git a/lua/plugins/dashboard.lua b/lua/plugins/dashboard.lua
index e25d536..f02242c 100644
--- a/lua/plugins/dashboard.lua
+++ b/lua/plugins/dashboard.lua
@@ -1,4 +1,11 @@
-local db = require("dashboard")
+local db = require('dashboard')
+local messages = require('plugins.messages')
+
+function GetRandomMessage()
+ -- Get a random index from the messages array
+ local randomIndex = math.random(1, #messages)
+ return messages[randomIndex]
+end
--vim.api.nvim_create_autocmd("VimEnter", {
-- callback = function()
@@ -10,9 +17,9 @@ local db = require("dashboard")
--})
db.setup({
- theme = "hyper",
+ theme = 'hyper',
config = {
- mru = { limit = 10, label = "" },
+ mru = { limit = 10, label = '' },
project = { limit = 10 },
header = {
[[ ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗]],
@@ -24,45 +31,47 @@ db.setup({
},
disable_move = false,
shortcut = {
- { desc = " Plugins", group = "Number", action = "PackerStatus", key = "p" },
+ { desc = ' Plugins', group = 'Number', action = 'PackerStatus', key = 'p' },
--{ desc = " Plugins", group = "@property", action = "PackerStatus", key = "p" },
{
- desc = " Files",
- group = "Number",
+ desc = ' Files',
+ group = 'Number',
--group = "Label",
- action = "Telescope find_files",
- key = "f",
+ action = 'Telescope find_files',
+ key = 'f',
},
{
- desc = " Text",
- group = "Number",
+ desc = ' Text',
+ group = 'Number',
--group = "Label",
- action = "enew",
- key = "t",
+ action = 'enew',
+ key = 't',
},
{
- desc = " Grep",
- group = "Number",
+ desc = ' Grep',
+ group = 'Number',
--group = "Label",
- action = "Telescope live_grep",
- key = "g",
+ action = 'Telescope live_grep',
+ key = 'g',
},
{
- desc = " Scheme",
- group = "Number",
+ desc = ' Scheme',
+ group = 'Number',
--group = "Label",
- action = "Telescope colorscheme",
- key = "s",
+ action = 'Telescope colorscheme',
+ key = 's',
},
{
- desc = " Config",
- group = "Number",
+ desc = ' Config',
+ group = 'Number',
--group = "Label",
- action = ":edit ~/.config/nvim/init.lua",
- key = "c",
+ action = ':edit ~/.config/nvim/init.lua',
+ key = 'c',
},
},
- footer = { "", "Hello World!" },
+ footer = function()
+ return { '', GetRandomMessage() }
+ end,
},
hide = {
statusline = false,