Share your dashboards! #111
Replies: 37 comments 77 replies
-
Well, you've already seen mine in the related PR, but here goes Related config dashboard = {
sections = {
{
section = "terminal",
cmd = "figlet -f ~/.config/LazyVimDev/ansi_shadow.flf -ct 'LAZYVIM' | lolcat -F 0.3 -t -p 100 -f",
height = 6,
padding = 1,
random = 10,
},
{ icon = " ", title = "Keymaps", section = "keys", indent = 2, padding = 1 },
{ icon = " ", title = "Recent Files", section = "recent_files", indent = 2, padding = 1 },
{ icon = " ", title = "Projects", section = "projects", indent = 2, padding = 1 },
{ section = "startup" },
},
}, If I had more screen real-estate, I would definitely try the vertical panes as well 😄 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
and all it took was: sections = {
{
section = "terminal",
cmd = "lolcat --seed=24 ~/.config/nvim/static/neovim.cat",
indent = -5,
height = 8,
width = 69,
padding = 1,
},
{
section = "keys",
indent = 1,
padding = 1,
},
{ section = "startup" },
}, |
Beta Was this translation helpful? Give feedback.
-
🍿 My great setup using SnacksDashboard |
Beta Was this translation helpful? Give feedback.
-
Configuration... dashboard = {
width = 72,
sections = {
{
section = 'terminal',
align = 'center',
cmd = 'cat ' .. vim.fn.stdpath('config') .. '/lua/plugins/ui/header.cat',
height = 11,
width = 72,
padding = 1,
},
{
align = 'center',
padding = 1,
text = {
{ ' Update ', hl = 'Label' },
{ ' Sessions ', hl = '@property' },
{ ' Last Session ', hl = 'Number' },
{ ' Files ', hl = 'DiagnosticInfo' },
{ ' Recent ', hl = '@string' },
},
},
{ section = 'startup', padding = 1 },
{ icon = ' ', title = 'Projects', section = 'projects', indent = 2, padding = 1 },
{ icon = ' ', title = 'Recent Files', section = 'recent_files', indent = 2, padding = 1 },
{ text = '', action = ':Lazy update', key = 'u' },
{ text = '', action = ':PersistenceLoadSession', key = 's' },
{ text = '', action = ':PersistenceLoadLast', key = 'l' },
{ text = '', action = ':Telescope find_files', key = 'f' },
{ text = '', action = ':Telescope oldfiles', key = 'r' },
},
}, Just like my previous |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Github centric dashboardThis is what I'm using right now. {
sections = {
{ section = "header" },
{
pane = 2,
section = "terminal",
cmd = "colorscript -e square",
height = 5,
padding = 1,
},
{ section = "keys", gap = 1, padding = 1 },
function()
local in_git = Snacks.git.get_root() ~= nil
local cmds = {
{
title = "Notifications",
cmd = "gh notify -s -a -n5",
icon = " ",
height = 5,
enabled = true,
},
{
title = "Open Issues",
cmd = "gh issue list -L 3",
icon = " ",
height = 7,
},
{
icon = " ",
title = "Open PRs",
cmd = "gh pr list -L 3",
height = 7,
},
{
icon = " ",
title = "Git Status",
cmd = "hub --no-pager diff --stat -B -M -C",
height = 10,
},
}
return vim.tbl_map(function(cmd)
return vim.tbl_extend("force", {
pane = 2,
section = "terminal",
enabled = in_git,
padding = 1,
ttl = 5 * 60,
indent = 3,
}, cmd)
end, cmds)
end,
{ section = "startup" },
},
} |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Why not showing what the weather is like? :p with {
...
sections = {
...
{ section = "terminal", cmd = "curl -s 'wttr.in/?0'"},
}
} |
Beta Was this translation helpful? Give feedback.
-
Config
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
just a cat with a gun ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠋⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠈⠉⠉⠙⠛⠛⠻⢿⣿⡿⠟⠁⠀⣀⣴⣿⣿⣿⣿⣿⠟ |
Beta Was this translation helpful? Give feedback.
-
There are a lot of hacks to make this work, specifically the footer. Only renders correctly for 2560x1440p. Convert from Bekaboo's design and it's not actually copyrighted. Configdashboard = {
enabled = true,
width = 18,
sections = {
-- stylua: ignore start
{ hidden = true, icon = " ", key = "t", desc = "Find [T]ext", action = ":lua Snacks.dashboard.pick('live_grep')" },
{ hidden = true, icon = " ", key = "r", desc = "[R]ecent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" },
{ hidden = true, icon = " ", key = "l", desc = "[L]azy", action = ":Lazy" },
-- stylua: ignore end
-- Header
{ text = " ", padding = 12 },
{
padding = 2,
text = {
{ "Neovim :: M Λ C R O ", hl = "Normal" },
{ "- Editing made simple", hl = "NonText" },
},
action = ":lua Snacks.dashboard.pick('files')",
key = "f",
},
-- Keys
{
padding = 1,
text = {
{ " Find [F]ile", width = 19, hl = "NonText" },
{ " Find [T]ext", hl = "NonText" },
},
action = ":lua Snacks.dashboard.pick('files')",
key = "f",
},
{
padding = 1,
text = {
{ " ", width = 3 },
{ " [N]ew File", width = 19, hl = "NonText" },
{ " [R]ecent File", hl = "NonText" },
},
action = ":ene | startinsert",
key = "n",
},
{
padding = 2,
text = {
{ " ", width = 9 },
{ " [C]onfig", hl = "NonText" },
{ " ", width = 8 },
{ " [L]azy", hl = "NonText" },
{ " ", width = 14 },
},
action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})",
key = "c",
},
{
padding = 2,
text = {
{ " ", width = 5 },
{ " [Q]uit", hl = "NonText" },
},
action = ":quitall",
key = "q",
},
-- Startup
{ section = "startup", padding = 1 },
{ section = "terminal", cmd = "printf ' '", height = 15 },
-- Keys
{
text = {
[[
Copyright (c) 2024 - M Λ C R O developers
]],
hl = "NonText",
},
},
},
formats = { key = { "" } },
},
Notice the |
Beta Was this translation helpful? Give feedback.
-
Click to see the details!Here is the hidden content that appears when you click "Details." return {
"folke/snacks.nvim",
priority = 1000,
lazy = false,
opts = {
bigfile = { enabled = true },
dashboard = {
preset = {
header = [[
/$$$$$$ /$$$$$$$$ /$$ /$$ /$$$$$$
/$$__ $$| $$_____/| $$ /$$/ /$$__ $$
| $$ \ $$| $$ | $$ /$$/ | $$ \__/
| $$$$$$$$| $$$$$ | $$$$$/ | $$
| $$__ $$| $$__/ | $$ $$ | $$
| $$ | $$| $$ | $$\ $$ | $$ $$
| $$ | $$| $$$$$$$$| $$ \ $$| $$$$$$/
|__/ |__/|________/|__/ \__/ \______/
]],
},
enable = true,
formats = {
key = function(item)
return { { "[", hl = "special" }, { item.key, hl = "key" }, { "]", hl = "special" } }
end,
},
sections = {
{ section = "header", indent = 60 },
{
{ section = "keys", gap = 1, padding = 1 },
{ section = "startup", indent = 60, padding = 5 },
},
{
pane = 2,
section = "terminal",
cmd = "",
height = 5,
padding = 6,
indent = 10,
},
{
pane = 2,
{
icon = " ",
title = "Recent Files",
padding = 1,
},
{
section = "recent_files",
opts = { limit = 3 },
indent = 2,
padding = 1,
},
{
icon = " ",
title = "Projects",
padding = 1,
},
{
section = "projects",
opts = { limit = 3 },
indent = 2,
padding = 1,
},
},
},
},
indent = { enabled = true },
input = { enabled = true },
rename = { enabled = true },
notifier = {
enabled = true,
style = "fancy",
},
notify = { enabled = true },
dim = { enabled = true },
quickfile = { enabled = true },
scroll = { enabled = true },
statuscolumn = { enabled = true },
words = { enabled = true },
},
keys = {
{
"<leader>nn",
function()
Snacks.notifier.show_history()
end,
desc = "Notification History",
},
{
"<leader>gB",
function()
Snacks.gitbrowse()
end,
desc = "Git Browse",
mode = { "n", "v" },
},
{
"<leader>gb",
function()
Snacks.git.blame_line()
end,
desc = "Git Blame Line",
},
{
"<leader>gf",
function()
Snacks.lazygit.log_file()
end,
desc = "Lazygit Current File History",
},
{
"<leader>gg",
function()
Snacks.lazygit()
end,
desc = "Lazygit",
},
{
"<leader>gl",
function()
Snacks.lazygit.log()
end,
desc = "Lazygit Log (cwd)",
},
{
"<leader>rf",
function()
Snacks.rename.rename_file()
end,
desc = "Rename File",
},
},
}
</details> |
Beta Was this translation helpful? Give feedback.
-
Dead simple TODO task list by using terminal sections and grep:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Some gorgeous and also very useful dashboards here!! I'm sure I'll be lifting a bunch. For now:
|
Beta Was this translation helpful? Give feedback.
-
![]() The constellation is via starfetch sections = {
{
section = "startup",
padding = 1,
enabled = function()
return not (vim.o.columns > 135)
end
},
{
pane = 2,
indent = 4,
{
section = "keys",
gap = 0,
padding = 1
},
{
icon = " ",
title = "Recent Files"
},
{
section = "recent_files",
opts = {
limit = 3
},
indent = 4,
padding = 1
},
{
icon = " ",
title = "Projects"
},
{
section = "projects",
opts = {
limit = 10
},
indent = 2,
padding = 1
}
},
{
pane = 1,
align = "center",
section = "terminal",
cmd = "starfetch",
height = 12,
padding = 1
},
{
title = "Maintenance Actions",
padding = 1,
{
icon = " ",
key = "c",
desc = "Config",
action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})"
},
{
icon = " ",
key = "l",
desc = "Lazy",
action = ":Lazy"
},
{
icon = " ",
key = "x",
desc = "Lazy Extras",
action = ":LazyExtras"
},
{
icon = " ",
key = "m",
desc = "Mason",
action = ":Mason"
}
}
} |
Beta Was this translation helpful? Give feedback.
-
I experimented with a lot of images and random Pokémon generators etc, but I just liked simplicity more. Finding out about highlights was a plus in the meantime. Config opts = {
dashboard = {
preset = {
-- header = [[
-- ██████ █████ ███
-- ░░██████ ░░███ ░░░
-- ░███░███ ░███ ██████ ██████ █████ █████ ████ █████████████
-- ░███░░███░███ ███░░███ ███░░███░░███ ░░███ ░░███ ░░███░░███░░███
-- ░███ ░░██████ ░███████ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███
-- ░███ ░░█████ ░███░░░ ░███ ░███ ░░███ ███ ░███ ░███ ░███ ░███
-- █████ ░░█████░░██████ ░░██████ ░░█████ █████ █████░███ █████
-- ░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░ ░░░░░]],
header = [[
████ ██████ █████ ██
███████████ █████
█████████ ███████████████████ ███ ███████████
█████████ ███ █████████████ █████ ██████████████
█████████ ██████████ █████████ █████ █████ ████ █████
███████████ ███ ███ █████████ █████ █████ ████ █████
██████ █████████████████████ ████ █████ █████ ████ ██████]],
keys = {
{ icon = " ", desc = "New File", key = "n", action = ":ene | startinsert" },
{
section = "recent_files",
icon = " ",
title = { "Recent Files", hl = "SnacksDashboardDesc" },
key = "r",
indent = 2,
limit = 5,
action = ":lua Snacks.dashboard.pick('oldfiles')",
},
{
section = "projects",
icon = " ",
title = { "Projects", hl = "SnacksDashboardDesc" },
key = "p",
indent = 2,
limit = 5,
action = ":lua Snacks.dashboard.pick('projects')",
},
{
section = "terminal",
icon = " ",
title = { "GitHub Notifications", hl = "SnacksDashboardDesc" },
key = "G",
height = 3,
indent = 2,
cmd = "gh notify -sn 3; sleep 0.01",
action = function() vim.ui.open "https://github.com/notifications" end,
},
{
icon = " ",
key = "c",
desc = "Config",
action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})",
},
{ icon = " ", key = "s", desc = "Restore Session", section = "session" },
{
icon = " ",
key = "u",
desc = "Check Updates",
action = ":Lazy check",
enabled = package.loaded.lazy ~= nil,
},
{ icon = " ", key = "q", desc = "Quit", padding = { 2, 0 }, action = ":qa" },
},
},
sections = {
{ section = "header" },
{
text = { "👋 Welcome, Valentin!", hl = "TabLineSel" },
align = "center",
padding = { 1, 0 },
},
{ section = "keys" },
{ section = "startup" },
},
},
} EDIT: I added the GitHub notifications, added the Projects picker on EDIT 2: Moved all keybindings to the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
After a long long time of tinkering I've finally settled on a dashboard that feels true to me. Although the code is a mess it does a lot of cool things, most notably dynamic rescaling and random ASCII art on every system startup (unfortunately I haven't found a way for it to change on every nvim startup, it seems that the cmd that gets executed in the terminal section gets stored to cache for faster loading, which is reasonable but it would be nice if there was a way to bypass that behaviour for stuff like this). You can either copy it below or find it here, just bear in mind you might need to change the directory path, and fiddle with the scaling numbers based on your screen size, font size, etc, and you need the ASCII image converter downloaded. Config
|
Beta Was this translation helpful? Give feedback.
-
I had to do some tinkering with tigion's solution (here) to make custom status work.
|
briefed folder structure |
---|
├──📄 init.lua └──📂 lua ├──📂 NECO │ └──📂 util │ ├──📄 init.lua │ └──📂 ui │ └── 📄 init.lua └──📂 zzzz ├──📄 snacks.lua └──📂 snacks └──📄 dashboard.lua |
📄 lua/zzzz/snacks.nvim
---@class snacks.Config
return {
"folke/snacks.nvim",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
dashboard = require("zzzz.snacks.dashboard"),
terminal = require("zzzz.snacks.terminal"),
notifier = {
enabled = true,
timeout = 5000,
},
indent = {
priority = 1,
enabled = true,
},
},
keys = {
{ "<leader>nod", function() require("snacks").notifier.hide() end, desc = "Dissmisses notifications" },
},
config = function(_, opts)
require("NECO.util").dashboard_update(opts)
end,
}
📄 lua/zzzz/snacks/dashboard.nvim
local util = require "NECO.util"
local ui = require "NECO.util.ui"
local keys = {
{ icon = " ", key = "n", desc = "touch", action = ":enew" },
{ icon = " ", key = "r", desc = "old mistakes", action = ":Telescope oldfiles" },
{ icon = " ", key = "t", desc = "to(never)dos", action = ":Todo" },
{ icon = " ", key = "l", desc = "lazy", action = ":Lazy" },
{ icon = " ", key = "m", desc = "mason", action = ":Mason" },
{ icon = " ", key = "q", desc = "nvm let me out", action = ":qa" },
}
local function status_section()
local version = util.nvim_version()
local stats = util.plugin_stats()
local date = os.date("%d.%m.%Y")
return {
align = "center",
text = {
{ ' ', hl = 'special' },
{ version, hl = 'NonText' },
{ ' ', hl = 'footer' },
{ string.format("%d (%s ms)", stats.count or 0, stats.startuptime or "?"), hl = 'NonText' },
{ ' ', hl = 'footer' },
{ date, hl = 'NonText' },
},
}
end
local dashboard_config = {
enabled = true,
width = 30,
preset = {
header = ui.logos.ghost,
keys = keys,
},
formats = {
header = { "%s", align = "left" }
},
sections = {
{ section = "header" },
{ section = "keys", padding = 2 },
{
align = 'center',
padding = 2,
text = { '⌜ ᓚᘏᗢ des ⌟\na cat is fine too...', hl = "NonText" }
},
status_section
},
}
return dashboard_config
📄 lua/NECO/util/init.lua
local M = {}
--- Get the current Neovim version as string.
---@return string version (e.g., "v0.11.0")
function M.nvim_version()
local v = vim.version()
return string.format("v%d.%d.%d", v.major, v.minor, v.patch)
end
--- Get plugin loading stats.
---@return table stats Plugin stats: count, loaded, startup time, and update count.
function M.plugin_stats()
local stats = require("lazy").stats()
local updates = require("lazy.manage.checker").updated
return {
count = stats.count,
loaded = stats.loaded,
startuptime = (math.floor(stats.startuptime * 100 + 0.5) / 100),
updates = #updates,
}
end
--- Initialize dashboard and attach update hooks for plugin stats display.
---@param opts snacks.Config Configuration options for Snacks dashboard.
function M.dashboard_update(opts)
require("snacks").setup(opts)
vim.api.nvim_create_autocmd("User", {
pattern = { "LazyCheck", "LazyUpdate" },
callback = function(event)
if event.buf == "snacks_dashboard" then
require("snacks").dashboard.update()
end
end,
})
end
return M
📄 lua/NECO/util/ui/init.lua
ghost logo |
---|
local M = {}
--- ASCII art logos
M.logos = {
ghost = [[
(( ))
( 0 0) "ghost offers fragile
///> 🌸- flower do you take?"
v v (y/n)]],
-- ...
}
return M |
Beta Was this translation helpful? Give feedback.
-
Config: |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Always Centred HeaderFull widthReduced widthDescriptionPictures speak for themself, I took inspiration from all of the amazing dashboard that are shared here. The colorscheme is I couldn't find one here with a centred header when on two columns that behave well when resizing the windows, the trick of using The config for Lua Configdashboard = {
pane_gap = 0,
preset = {
header = [[
████ ██████ █████ ██ with NixVim
███████████ █████
█████████ ███████████████████ ███ ███████████
█████████ ███ █████████████ █████ ██████████████
█████████ ██████████ █████████ █████ █████ ████ █████
███████████ ███ ███ █████████ █████ █████ ████ █████
██████ █████████████████████ ████ █████ █████ ████ ██████
]],
},
formats = {
key = function(item)
return { { "[", hl = "special" }, { item.key, hl = "key" }, { "] ", hl = "special" } }
end,
},
sections = {
{
section = "header",
enabled = function()
local width = vim.o.columns
return width < 120
end,
},
{
{
text = [[
████ ██████ █
███████████
█████████ ███████████
█████████ ███ █████
█████████ ██████████ █
███████████ ███ ███ █
██████ ███████████████████
]],
hl = "SnacksDashboardHeader",
},
align = "right",
enabled = function()
local width = vim.o.columns
return width >= 120
end,
padding = 0,
},
{
section = "keys",
gap = 1,
padding = 1,
},
{
pane = 2,
text = {
{
[[
████ ██ with NixVim
█████
████████ ███ ███████████
████████ █████ ██████████████
████████ █████ █████ ████ █████
████████ █████ █████ ████ █████
██ ████ █████ █████ ████ ██████
]],
hl = "SnacksDashboardHeader",
},
},
align = "left",
enabled = function()
local width = vim.o.columns
return width >= 120
end,
},
{
pane = 2,
icon = " ",
title = "Recent Files",
section = "recent_files",
cwd = true,
indent = 5,
padding = 1,
},
{
pane = 2,
icon = " ",
title = "Projects",
section = "projects",
indent = 5,
padding = 1,
},
{
pane = 2,
icon = " ",
title = "Git Status",
section = "terminal",
enabled = function()
return require('snacks.git').get_root() ~= nil
end,
cmd = "git status --short --branch --renames",
height = 5,
padding = 1,
ttl = 5 * 60,
indent = 5,
},
},
} Any suggestion is welcome. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
![]() |
Beta Was this translation helpful? Give feedback.
-
Having fun showing some chess boards. Currently a random checkmate from a static list of known checkmates. Puzzles will follow. ![]() |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Have you created any neat dashboards, you can share a screenshot with the config here.
Beta Was this translation helpful? Give feedback.
All reactions