diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-11-10 21:19:21 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-11-10 21:19:21 +0200 |
| commit | 49f169b7fc8ef1f3b17d59d0a58ce4e20bee9875 (patch) | |
| tree | ea52f2169a9335fd60a0266028a14e3418263df7 /lua | |
| parent | 7bb6fc9ac1297d5e46e1360fe81a34bf0e807b76 (diff) | |
| download | dotfiles-49f169b7fc8ef1f3b17d59d0a58ce4e20bee9875.tar.gz dotfiles-49f169b7fc8ef1f3b17d59d0a58ce4e20bee9875.zip | |
Add random messages to footer
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/plugins/dashboard.lua | 59 |
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, |
