Share your dashboards! #111
Replies: 23 comments 34 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.
-
This took longer to set up than I would like to admit. In my defense, I can hardly be considered a programmer these days, so pretty sure there is a lot of room for improvement here. The ASCII art was generated using Asthestarsfalll's img2art, inspired by @nxtkofi's comment in alpha-nvim. The image is on my dotfiles. Config (warning: 200+ lines)local function buildRgCmd(opts)
local expression = "(" .. table.concat(opts.sign_list, "|") .. "):"
if opts.match_comment_symbols then
expression = [[([^\S\r\n]*(]]
.. table.concat(opts.comment_symbols, "|")
.. [[)[^\S\r\n]*)\s*(]]
.. table.concat(opts.sign_list, "|")
.. [[):\s*]]
end
local rg_command = "rg -g '!{**/node_modules/*,**/.git/*}' -w '"
.. expression
.. "' "
.. table.concat(opts.dirs, " ")
.. " --hidden --follow --sortr modified --no-heading --color never --with-filename --line-number --column"
return rg_command
end
local function getTodos(opts)
if next(opts.sign_list) == nil then
return {}
end
local rg_command = buildRgCmd(opts)
local rg_res = vim.fn.systemlist(rg_command)
local todos = {}
local todo_count = 0
for i, line in pairs(rg_res) do
todo_count = todo_count + 1
local filename, row, col, text = line:match("^(.+):(%d+):(%d+):(.*)$")
local sign_sym = ""
for _, sign_s in ipairs(opts.sign_list) do
local start_pos, end_pos = text:find(sign_s .. ":")
if start_pos then
sign_sym = text:sub(start_pos, end_pos)
text = text:sub(end_pos + 1)
end
end
local todo = {
index = i + 5 ~= 10 and i + 5 or 0,
file = filename:match("^%s*(.-)%s*$"),
line = row,
column = col,
sign = sign_sym,
desc = text:match("^%s*(.-)%s*$"),
}
table.insert(todos, todo)
if todo_count == opts.limit then
break
end
end
return todos
end
return {
"folke/snacks.nvim",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
dashboard = {
width = 100,
pane_gap = 20,
row = nil,
autokeys = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
preset = {
keys = {
{
{ key = "n", hidden = true, action = ":ene | startinsert" },
{ key = "f", hidden = true, action = ":lua Snacks.dashboard.pick('files')" },
{ key = "r", hidden = true, action = ":lua Snacks.dashboard.pick('oldfiles')" },
{ key = "g", hidden = true, action = ":lua Snacks.dashboard.pick('live_grep')" },
{ key = "s", hidden = true, section = "session" },
{ key = "L", hidden = true, action = ":Lazy", enabled = package.loaded.lazy ~= nil },
{ key = "q", hidden = true, action = ":qa", enabled = package.loaded.lazy ~= nil },
},
},
},
formats = {
key = { "" },
file = function(item)
return {
{ item.key, hl = "key" },
{ " " },
{ item.file:sub(2):match("^(.*[/])"), hl = "NonText" },
{ item.file:match("([^/]+)$"), hl = "Normal" },
}
end,
icon = { "" },
},
sections = {
-- hidden
{ section = "keys" },
-- not hidden
{
pane = 1,
section = "terminal",
-- cmd = "chafa ~/Pictures/evilain.gif --align center --stretch --passthrough tmux --polite on --format symbols --symbols vhalf 20x30; sleep .1",
cmd = "img2art ~/.config/nvim/lua/plugins/dashboard_img/hq.png --threshold 50 --scale .34 --quant 16 --with-color",
height = 27,
width = 100,
indent = 20,
},
{
pane = 2,
indent = 21,
{
{ text = "" },
{
text = {
{ "n ", hl = "key" },
{ "New file", hl = "Normal" },
{ "", width = 12 },
{ "g ", hl = "key" },
{ "Grep text", hl = "Normal" },
},
},
{ text = "", padding = 1 },
{
text = {
{ "f ", hl = "key" },
{ "Find file", hl = "Normal" },
{ "", width = 11 },
{ "s ", hl = "key" },
{ "Reload session", hl = "Normal" },
},
},
{ text = "", padding = 1 },
{
text = {
{ "r ", hl = "key" },
{ "Recent files", hl = "Normal" },
{ "", width = 8 },
{ "L ", hl = "key" },
{ "Lazy", hl = "Normal" },
},
},
},
{ text = "", padding = 2 },
{ title = "Projects", padding = 1, indent = 21 },
{ section = "projects", limit = 5, padding = 2, indent = 20 },
{ title = "TODO List", padding = 1, indent = 21 },
{
indent = 21,
function()
local todo_opts = {
limit = 5,
match_comment_symbols = true,
comment_symbols = { "--", "//", "#", "/*" },
dirs = { "~/.config", "~/code" },
sign_list = { "TODO", "ERROR", "FIX", "FIXME", "BUG" },
}
local todos = getTodos(todo_opts)
return vim.tbl_map(function(todo)
return {
autokey = true,
text = {
{ tostring(todo.index) .. " ", hl = "key" },
{ todo.sign .. string.rep(" ", 7 - #todo.sign), hl = "NonText" },
{
(todo.desc:len() > 35) and todo.desc:sub(1, 35) .. "" or todo.desc,
hl = "Normal",
},
},
action = function()
vim.fn.chdir(todo.file:match("^(.*[\\/])[^\\/]+$")) -- :cd into dir
vim.cmd("edit " .. todo.file) -- open file
vim.cmd(todo.line) -- go to line
end,
}
end, todos)
end,
},
},
},
},
bigfile = { enabled = true },
indent = { enabled = true },
input = { enabled = true },
lazygit = { enabled = true },
notifier = { enabled = true },
quickfile = { enabled = true },
scroll = { enabled = true },
statuscolumn = { enabled = true },
words = { enabled = true },
},
config = function(_, opts)
require("snacks").setup(opts)
vim.api.nvim_set_hl(0, "SnacksDashboardKey", { fg = "#5ceef6" })
vim.api.nvim_set_hl(0, "SnacksDashboardTitle", { fg = "#c49aee" })
end,
} |
Beta Was this translation helpful? Give feedback.
-
Shout out to @Praczet and @folke for inspiring me to create dynamic sections based on vim columns. The girl image is available in my dotfiles :) Config:dashboard = {
width = 60,
pane_gap = 16,
sections = {
{
section = 'header',
align = 'center',
enabled = function()
return not (vim.o.columns > 135)
end,
},
{
pane = 1,
{
enabled = function()
return vim.o.columns > 135
end,
section = 'terminal',
cmd = 'chafa ~/.config/nvim/lua/custom/plugins/anime-girl-nobg-crop.png --size 52x32 --format symbols --stretch --align center; sleep .1',
height = 32,
width = 56,
padding = 1,
},
{
section = 'startup',
padding = 1,
enabled = function()
return vim.o.columns > 135
end,
},
},
{
pane = 2,
{ section = 'keys', padding = 2, gap = 1 },
{
icon = ' ',
title = 'Recent Files',
},
{
section = 'recent_files',
opts = { limit = 3 },
indent = 2,
padding = 1,
},
{
icon = ' ',
title = 'Projects',
},
{
section = 'projects',
opts = { limit = 3 },
indent = 2,
padding = 1,
},
{
section = 'startup',
padding = 1,
enabled = function()
return not (vim.o.columns > 135)
end,
},
},
},
}, |
Beta Was this translation helpful? Give feedback.
-
I had a bash script that randomly prints out a quote for my lockscreen, and I adapted it to dashboard as I was looking to replace alpha-nvim-fortune. Slight caveat: The quote changes every time the dashboard is refreshed, which does not correspond exactly to every time nvim is opened (I think this can be changed by updating ttl if I'm not mistaken); I still put "Quote of the Day" for fun though. Script: #!/bin/sh
while [[ $# -gt 0 ]]; do
case $1 in
"-n"|--nvim)
NVIM_QUOTE=1
shift
;;
-*|--*)
echo "Unknown option $1"
exit 1
;;
esac
done
# silly ahh script to display stupid or not so stupid quotes on my lockscreen
QUOTES_DIR="$HOME/dotfiles/assets/quotes/"
# grab a random quote and display it as follows:
# [quote]
# \n
# - [name] (right aligned)
quotefile=$(find $QUOTES_DIR -type f | shuf -n 1)
name=$(yq -r ".name" $quotefile)
quote=$(yq -r ".quote" $quotefile)
context=$(yq -r ".context" $quotefile)
[[ $context == "null" ]] && context="" || context=", $context"
if [[ NVIM_QUOTE -eq 1 ]]; then
printf "\"%s\"\n\n%60s" "$(echo $quote | fmt -w 60)" "- $name$context"
else
printf "\"%s\"\n\n%80s" "$(echo $quote | fmt -w 80)" "- $name$context"
fi Config: Currently just used the dashboard = {
sections = {
{ section = "header" },
{ section = "keys", gap = 1, padding = 1 },
{ pane = 2, icon = " ", title = "Recent Files", section = "recent_files", indent = 2, padding = 1 },
{ pane = 2, icon = " ", title = "Projects", section = "projects", indent = 2, padding = 1 },
{
pane = 2,
icon = " ",
title = "Git Status",
section = "terminal",
enabled = function()
return Snacks.git.get_root() ~= nil
end,
cmd = "git status --short --branch --renames",
height = 5,
padding = 1,
ttl = 5 * 60,
indent = 3,
},
{
pane = 2,
icon = "",
title = "Quote of the Day",
section = "terminal",
cmd = "/home/revise/dotfiles/scripts/lockscreen-quotes.sh -n",
height = 8,
padding = 1,
},
{ section = "startup" },
},
}, |
Beta Was this translation helpful? Give feedback.
-
![]() Config opts = {
dashboard = {
enabled = true,
width = math.min(math.max(vim.o.columns - 10, 40), 60),
preset = {
keys = function()
local enabled = vim.o.lines >= 21
return {
{ icon = ' ', key = 'n', desc = 'New File', action = ':ene | startinsert' },
{ icon = ' ', key = 'r', desc = 'Recent Files', action = ':Telescope oldfiles' },
{
icon = ' ',
key = 'l',
desc = 'Load Session',
action = ':Session load',
enabled = require('sessions').exists(),
},
{ icon = ' ', key = 'f', desc = 'Find File', action = ':Telescope find_files' },
{ icon = ' ', key = 'g', desc = 'Find Text', action = ':Telescope live_grep' },
{ icon = ' ', key = 'h', desc = 'Find Help Tag', action = ':Telescope help_tags', enabled = enabled },
{
icon = ' ',
key = 's',
desc = 'Settings',
action = '<Cmd>cd ' .. vim.fn.stdpath('config') .. '<CR><Cmd>NvimTreeOpen<CR>',
enabled = enabled,
},
{ icon = ' ', key = 'p', desc = 'Check Plugins', action = ':Lazy', enabled = enabled },
{ icon = ' ', key = 'c', desc = 'Check Health', action = ':checkhealth', enabled = enabled },
{ icon = ' ', key = 'q', desc = 'Quit', action = ':qa' },
}
end,
header = table.concat({
[[ █ █ ]],
[[ █ ██ ]],
[[ ████ ]],
[[ ██ ███ ]],
[[ █ █ ]],
[[ ]],
[[ n e o v i m ]],
}, '\n'),
},
sections = {
{ section = 'header' },
{ section = 'keys', gap = 1, padding = 1 },
-- Prints some information about Neovim, the plugins and the date.
function()
local version = require('tigion.core.util').info.nvim_version()
local plugin_stats = require('tigion.core.util').info.plugin_stats()
local date = os.date('%d.%m.%Y')
local updates = plugin_stats.updates > 0 and ' ' .. plugin_stats.updates .. '' or ''
return {
align = 'center',
text = {
{ ' ', hl = 'footer' },
{ version, hl = 'NonText' },
{ ' ', hl = 'footer' },
{ tostring(plugin_stats.count), hl = 'NonText' },
{ updates, hl = 'special' },
{ ' ', hl = 'footer' },
{ plugin_stats.startuptime .. ' ms', hl = 'NonText' },
{ ' ', hl = 'footer' },
{ date, hl = 'NonText' },
},
padding = 1,
}
end,
-- Greets the user depending on the time of day.
function()
-- Source: https://github.com/echasnovski/mini.nvim/blob/main/lua/mini/starter.lua
-- [02:00, 10:00)(8h) - morning, [10:00, 18:00)(8h) - day, [18:00, 02:00)(8h) - evening
local hour = tonumber(vim.fn.strftime('%H'))
local part_id = math.floor((hour + 6) / 8) + 1
local day_part = ({ 'evening', 'morning', 'afternoon', 'evening' })[part_id]
local username = vim.loop.os_getenv('USER_ALIAS_NAME') or vim.loop.os_get_passwd()['username'] or 'user'
return {
align = 'center',
text = { ('“Good %s, %s”'):format(day_part, username), hl = 'NonText' },
}
end,
},
},
},
config = function(_, opts)
local snacks = require('snacks')
-- Change dashboard content depending on the height of the screen.
if vim.o.lines < 37 then opts.dashboard.sections[2].gap = 0 end
if vim.o.lines < 28 then opts.dashboard.preset.header = 'N E O V I M' end
snacks.setup(opts)
-- Dashboard autocommands
-- FIX: This is a workaround to show updates in the dashboard at startup.
-- The dashboard is loaded before lazy.nvim has the information
-- about updates. So it is updated again after 500 ms.
vim.defer_fn(function()
snacks.dashboard.update()
-- vim.notify('Dashboard updated', vim.log.levels.DEBUG, { title = 'Snacks Setup' })
end, 500)
-- Updates an existing dashboard every time when lazy.nvim checks or updates plugins.
vim.api.nvim_create_autocmd('User', {
pattern = { 'LazyCheck', 'LazyUpdate' },
callback = function()
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
if vim.api.nvim_get_option_value('filetype', { buf = bufnr }) == 'snacks_dashboard' then
snacks.dashboard.update()
end
end
end,
})
end, (Snacks config in my dotfiles) |
Beta Was this translation helpful? Give feedback.
-
Here is mine: ![]() |
Beta Was this translation helpful? Give feedback.
-
Config
return {
enabled = true,
preset = {
---@type snacks.dashboard.Item[]|fun(items:snacks.dashboard.Item[]):snacks.dashboard.Item[]?
keys = {
{ icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" },
{ icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" },
{
icon = " ",
key = "g",
desc = "Find Text",
action = ":lua Snacks.dashboard.pick('live_grep')",
},
{
icon = " ",
key = "r",
desc = "Recent Files",
action = ":lua Snacks.dashboard.pick('oldfiles')",
},
{
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 = "l", desc = "Lazy", action = ":Lazy", enabled = package.loaded.lazy },
{ icon = " ", key = "q", desc = "Quit", action = ":qa" },
},
header = [[
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣤⢤⠶⠶⠶⢦⣤⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣀⡤⠴⠶⢤⣄⡀⠀⠀⠀⢀⣤⠶⠛⠋⣁⣀⣤⣤⣤⣤⣤⣤⣤⣀⣈⠉⠛⠳⢤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⣠⠞⢁⣠⣤⣤⣤⣀⠙⠲⣤⠖⠋⣀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡈⠓⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⢰⠃⢠⣿⣿⣿⣿⣿⣿⣷⡦⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠙⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⡏⠀⣿⣿⣿⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⣿⣿⣿⣿⠿⢿⣿⣿⣿⣿⣿⣿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠙⣄⠀⠀⠀⠀⠀⠀⠀⠀
⡇⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢱⣶⡎⢿⣿⣿⣿⣿⢣⣾⣆⢻⣿⣿⣿⣿⣿⣿⣿⣿⣆⠈⢦⡀⠀⠀⠀⠀⠀⠀
⣷⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣿⡇⢸⣿⣿⣿⡏⢸⣿⡟⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠈⢧⠀⠀⠀⠀⠀⠀
⢹⡆⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠉⠀⢸⣿⣿⣿⡇⠀⠉⠁⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠘⡇⠀⠀⠀⠀⠀
⠀⢿⡄⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⢸⣿⣿⣿⣇⠀⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠹⣆⠀⠀⠀⠀
⠀⠀⠙⣆⠈⢋⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⣾⣿⣿⣿⣿⡀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠈⢦⠀⠀⠀
⠀⠀⠀⢸⡇⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣾⡟⠉⠉⠉⠙⣷⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠈⢧⡀⠀
⠀⠀⠀⠘⡇⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠰⣿⡷⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠸⡇⠀
⠀⠀⠀⠀⣧⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⣿⠀
⠀⠀⠀⠀⢻⡆⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⢠⡿⠀
⠀⠀⠀⠀⠈⣿⡀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠻⣿⣿⣿⠿⠋⢀⡞⠁⠀
⠀⠀⠀⠀⠀⣸⠇⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠗⠀⠀⢤⣤⠶⠋⠀⠀⠀
⠀⠀⢀⡴⠋⠀⣴⣾⣦⡘⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⣰⣷⣦⣄⠉⠳⣄⠀⠀⠀
⠀⡴⠋⠀⠐⠋⢹⣿⣿⣿⣦⡙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⣠⣾⣿⣿⡏⠉⠓⠄⠈⢧⡀⠀
⣼⠁⣰⡇⠀⣀⣼⣿⣿⣿⣿⣿⣦⣌⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⣉⣴⣿⣿⣿⣿⣿⣷⣄⡀⢀⣆⠀⢧⠀
⣿⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣍⡙⠛⠛⠿⠿⣿⡿⠿⠟⠛⠛⣉⣤⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠆⢸⡆
⠻⣄⠈⠻⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠟⠓⠀⣠⣤⣄⠀⠐⠚⠿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠟⠋⢀⡼⠁
⠀⠈⠛⠶⣤⣤⣀⣀⣉⣉⣉⣉⣉⣀⣀⣀⣠⣤⣤⠴⠖⠋⠁⠀⠈⠙⠲⠶⣤⣤⣄⣀⣀⣀⣉⣉⣉⣉⣉⣁⣀⣤⣤⠴⠞⠋⠀⠀
]],
},
formats = {
terminal = { align = "center" },
version = { "%s", align = "center" },
},
sections = {
{
section = "header",
height = 16,
width = 10,
enabled = function()
return vim.fn.environ()["SSH_CLIENT"] ~= nil
end,
},
{
section = "terminal",
cmd = 'chafa -p off --speed=0.9 --clear --passthrough=tmux --scale max "$HOME/.config/nvim/dashboard/gif/kirby-dancing2.gif"',
indent = 12,
ttl = 0,
enabled = function()
return vim.fn.executable("chafa") == 1 and vim.fn.environ()["SSH_CLIENT"] == nil
end,
height = 20,
padding = 1,
},
{ section = "keys", gap = 1, padding = 1 },
{ section = "startup" },
function()
local in_git = Snacks.git.get_root() ~= nil
local cmds = {
{
title = "Git Graph",
icon = " ",
cmd = [[echo -e "$(git-graph --style round --color always --wrap 50 0 8 -f 'oneline')"]],
indent = 1,
height = 35,
},
}
return vim.tbl_map(function(cmd)
return vim.tbl_extend("force", {
pane = 2,
section = "terminal",
enabled = function()
return in_git and vim.o.columns > 130
end,
padding = 1,
-- ttl = 5 * 60,
}, cmd)
end, cmds)
end,
},
}
Thanks folke! |
Beta Was this translation helpful? Give feedback.
-
Config
|
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.
-
Have you created any neat dashboards, you can share a screenshot with the config here.
Beta Was this translation helpful? Give feedback.
All reactions