feat: add conditional rendering for dashboard sections based on Neovide

This commit is contained in:
2024-11-24 03:19:49 -05:00
parent 4f62a6b91c
commit 2d486398d6
+30 -1
View File
@@ -31,7 +31,9 @@ return {
keys = require('data.dash').dashboard_nvim.choices, keys = require('data.dash').dashboard_nvim.choices,
header = read_file(require('data.dash').logo), header = read_file(require('data.dash').logo),
}, },
sections = { sections = function()
if not require('data.func').is_neovide() then
return {
-- { section = 'header' }, -- { section = 'header' },
{ {
section = 'terminal', section = 'terminal',
@@ -69,7 +71,34 @@ return {
ttl = 1 * 60, -- Time between git updates ttl = 1 * 60, -- Time between git updates
}, },
{ section = 'startup' }, { section = 'startup' },
}
else
return {
{
section = 'header',
indent = 40,
}, },
{ section = 'keys', gap = 1, padding = 1 },
{
pane = 2,
icon = '',
title = 'Recent Files',
section = 'recent_files',
indent = 2,
padding = { 2, 20 },
},
{
pane = 2,
icon = '',
title = 'Projects',
section = 'projects',
indent = 2,
padding = 2,
},
{ section = 'startup' },
}
end
end,
}, },
}, },
}, },