shell/dotfiles/home/.config/nvim/lua/plugins/dashboard.lua
2024-05-31 00:15:08 +08:00

188 lines
8.8 KiB
Lua

local function header()
local logos = {
-- generated in https://patorjk.com/software/taag/#p=testall&t=NeoVim
{
'','','',
"888888ba dP dP oo ",
"88 `8b 88 88 ",
"88 88 .d8888b. .d8888b. 88 .8P dP 88d8b.d8b. ",
"88 88 88ooood8 88' `88 88 d8' 88 88'`88'`88 ",
"88 88 88. ... 88. .88 88 .d8P 88 88 88 88 ",
"dP dP `88888P' `88888P' 888888' dP dP dP dP ",
'','','',
},
{
'','','','','',
" _ _ __ ___ ",
"| \\ | | \\ \\ / (_) ",
"| \\| | ___ __\\ \\ / / _ _ __ ___ ",
"| . ` |/ _ \\/ _ \\ \\/ / | | '_ ` _ \\ ",
"| |\\ | __/ (_) \\ / | | | | | | |",
"|_| \\_|\\___|\\___/ \\/ |_|_| |_| |_| ",
'','','','','',
},
{
'','','','','',
" _ _ __ ___ ",
"| \\ | | ___ __\\ \\ / (_)_ __ ___",
" | \\| |/ _ \\/ _ \\ \\ / /| | '_ ` _ \\",
" | |\\ | __/ (_) \\ V / | | | | | | |",
" |_| \\_|\\___|\\___/ \\_/ |_|_| |_| |_|",
'','','','','',
},
{
'','','','','',
" _ __ __ ___ ",
" / | / /__ ____| | / (_)___ ___ ",
" / |/ / _ \\/ __ \\ | / / / __ `__ \\",
" / /| / __/ /_/ / |/ / / / / / / /",
"/_/ |_/\\___/\\____/|___/_/_/ /_/ /_/ ",
'','','','','',
},
{
'','','',
'888b 888 888 888 d8b ',
'8888b 888 888 888 Y8P ',
'88888b 888 888 888 ',
'888Y88b 888 .d88b. .d88b. Y88b d88P 888 88888b.d88b. ',
'888 Y88b888 d8P Y8b d88""88b Y88b d88P 888 888 "888 "88b ',
'888 Y88888 88888888 888 888 Y88o88P 888 888 888 888 ',
'888 Y8888 Y8b. Y88..88P Y888P 888 888 888 888 ',
'888 Y888 "Y8888 "Y88P" Y8P 888 888 888 888 ',
'','','',
},
{
'','','',
"███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗",
"████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║",
"██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║",
"██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║",
"██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║",
"╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝",
'','','',
},
{
'','','',
"███ ██ ███████ ██████ ██ ██ ██ ███ ███ ",
"████ ██ ██ ██ ██ ██ ██ ██ ████ ████ ",
"██ ██ ██ █████ ██ ██ ██ ██ ██ ██ ████ ██ ",
"██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ",
"██ ████ ███████ ██████ ████ ██ ██ ██ ",
'','','',
},
{
'','','',
"_ _______ _______ _________ _______ ",
"( ( /|( ____ \\( ___ )|\\ /|\\__ __/( )",
"| \\ ( || ( \\/| ( ) || ) ( | ) ( | () () |",
"| \\ | || (__ | | | || | | | | | | || || |",
"| (\\ \\) || __) | | | |( ( ) ) | | | |(_)| |",
"| | \\ || ( | | | | \\ \\_/ / | | | | | |",
"| ) \\ || (____/\\| (___) | \\ / ___) (___| ) ( |",
"|/ )_)(_______/(_______) \\_/ \\_______/|/ \\|",
'','','',
},
{
'','','',
"$$\\ $$\\ $$\\ $$\\ $$\\ ",
"$$$\\ $$ | $$ | $$ |\\__| ",
"$$$$\\ $$ | $$$$$$\\ $$$$$$\\ $$ | $$ |$$\\ $$$$$$\\$$$$\\ ",
"$$ $$\\$$ |$$ __$$\\ $$ __$$\\\\$$\\ $$ |$$ |$$ _$$ _$$\\ ",
"$$ \\$$$$ |$$$$$$$$ |$$ / $$ |\\$$\\$$ / $$ |$$ / $$ / $$ |",
"$$ |\\$$$ |$$ ____|$$ | $$ | \\$$$ / $$ |$$ | $$ | $$ |",
"$$ | \\$$ |\\$$$$$$$\\ \\$$$$$$ | \\$ / $$ |$$ | $$ | $$ |",
"\\__| \\__| \\_______| \\______/ \\_/ \\__|\\__| \\__| \\__|",
'','','',
},
{
'','','',
" /$$ /$$ /$$ /$$ /$$ ",
"| $$$ | $$ | $$ | $$|__/ ",
"| $$$$| $$ /$$$$$$ /$$$$$$ | $$ | $$ /$$ /$$$$$$/$$$$",
"| $$ $$ $$ /$$__ $$ /$$__ $$| $$ / $$/| $$| $$_ $$_ $$",
"| $$ $$$$| $$$$$$$$| $$ \\ $$ \\ $$ $$/ | $$| $$ \\ $$ \\ $$",
"| $$\\ $$$| $$_____/| $$ | $$ \\ $$$/ | $$| $$ | $$ | $$",
"| $$ \\ $$| $$$$$$$| $$$$$$/ \\ $/ | $$| $$ | $$ | $$",
"|__/ \\__/ \\_______/ \\______/ \\_/ |__/|__/ |__/ |__/",
'','','',
},
{
'','','',
"__ __ __ __ __ ",
"| \\ | \\ | \\ | \\| \\ ",
"| $$\\ | $$ ______ ______ | $$ | $$ \\$$ ______ ____ ",
"| $$$\\| $$ / \\ / \\| $$ | $$| \\| \\ \\ ",
"| $$$$\\ $$| $$$$$$\\| $$$$$$\\\\$$\\ / $$| $$| $$$$$$\\$$$$\\",
"| $$\\$$ $$| $$ $$| $$ | $$ \\$$\\ $$ | $$| $$ | $$ | $$",
"| $$ \\$$$$| $$$$$$$$| $$__/ $$ \\$$ $$ | $$| $$ | $$ | $$",
"| $$ \\$$$ \\$$ \\ \\$$ $$ \\$$$ | $$| $$ | $$ | $$",
" \\$$ \\$$ \\$$$$$$$ \\$$$$$$ \\$ \\$$ \\$$ \\$$ \\$$",
'','','',
},
{
'','','',
"__ __ __ __ __ ",
"/ \\ / | / | / |/ | ",
"$$ \\ $$ | ______ ______ $$ | $$ |$$/ _____ ____ ",
"$$$ \\$$ | / \\ / \\ $$ | $$ |/ |/ \\/ \\ ",
"$$$$ $$ |/$$$$$$ |/$$$$$$ |$$ \\ /$$/ $$ |$$$$$$ $$$$ |",
"$$ $$ $$ |$$ $$ |$$ | $$ | $$ /$$/ $$ |$$ | $$ | $$ |",
"$$ |$$$$ |$$$$$$$$/ $$ \\__$$ | $$ $$/ $$ |$$ | $$ | $$ |",
"$$ | $$$ |$$ |$$ $$/ $$$/ $$ |$$ | $$ | $$ |",
"$$/ $$/ $$$$$$$/ $$$$$$/ $/ $$/ $$/ $$/ $$/ ",
'','','',
},
}
math.randomseed(os.time())
return logos[math.random(#logos)]
end
require('dashboard').setup({
theme = 'doom',
config = {
header = header(),
center = {
{
icon = '󰙅 ',
icon_hl = 'Title',
desc = 'Open tree',
desc_hl = 'String',
key = 'e',
keymap = 'SPC e',
key_hl = 'Number',
action = ':Neotree float'
},
{
icon = '󰈞 ',
icon_hl = 'Title',
desc = 'Find files',
desc_hl = 'String',
key = 'f',
keymap = 'SPC f f',
key_hl = 'Number',
action = ':Telescope find_files'
},
{
icon = '',
icon_hl = 'Title',
desc = 'Find text',
desc_hl = 'String',
key = 'w',
keymap = 'SPC f w',
key_hl = 'Number',
action = ':Telescope live_grep'
},
{
icon = '',
icon_hl = 'Title',
desc = 'Git Braches',
desc_hl = 'String',
key = 'b',
keymap = 'SPC g b',
key_hl = 'Number',
action = ':Telescope git_branches'
}
}
}
})