2022-12-22 00:13:52 +01:00
|
|
|
local present, db = pcall(require, "dashboard")
|
|
|
|
if not present then
|
|
|
|
return
|
|
|
|
end
|
2022-07-30 07:17:12 +02:00
|
|
|
|
|
|
|
db.custom_header = function()
|
2022-10-17 17:13:31 +02:00
|
|
|
local cringe = {
|
|
|
|
"Have fun coding!",
|
2022-10-18 10:02:19 +02:00
|
|
|
"neovim got rid of the :smile command.",
|
|
|
|
"Pro tip: You can use :q to exit. Do it. Now!",
|
2022-10-11 07:40:50 +02:00
|
|
|
}
|
2022-10-17 17:13:31 +02:00
|
|
|
local random_cringe = cringe[math.random(#cringe)]
|
2022-10-11 07:40:50 +02:00
|
|
|
return {
|
2022-12-22 00:13:52 +01:00
|
|
|
[[╔══════════════════════════════════════════════════╗]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⡏⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣄⢧⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⢰⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠘⣄⠀⠀⠀⠀⢹⣦⠀⠀⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠘⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⡄⠀⠀⠀⠈⠙⣧⡀⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⠀⠀⠀⠀⢸⡼⣇⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⢿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠖⠀⠀⡸⠀⠀⠀⡟⠈⠃⣿⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⢺⡇⠀⠀⠀⠀⠀⠀⣀⣶⣶⠀⠀⠀⠀⠀⣠⣶⣶⣶⣶⣦⣤⣀⣀⣤⡶⠶⠶⠶⡇⠀⠀⣼⣿⣶⠀⣿⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⠈⣷⠀⠀⠀⣠⣾⣿⣿⣿⣿⢿⠀⠀⠀⠘⢻⠙⠛⠒⠛⠛⢉⣩⠁⠀⠀⢀⡄⠀⡇⠀⢀⣿⡿⠛⠀⣿⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⠀⠘⣆⠀⠈⠉⠁⣉⣉⣃⠞⣠⠀⠀⠀⠀⠀⠀⠀⠈⠙⠛⠉⠁⠀⠀⠀⡾⠀⡀⠁⠀⠈⣿⠁⠀⣸⠇⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⠀⠀⠹⣷⠐⠀⠀⠀⠀⠀⠀⠃⠀⠀⠀⠀⠀⠀⢤⣀⡀⠀⠀⠀⠀⠀⠀⠀⣦⢱⠀⠀⠀⢿⣀⣠⠏⠀⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⠀⠀⠀⠀⠀⣰⡾⠃⠀⠀⠀⠀⠀⣀⣠⡿⠀⠀⣤⣄⡀⠀⠀⠀⠸⣄⠀⠀⠀⢳⡝⢯⡀⠀⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡀⠀⠀⠀⣰⡟⠑⠦⠴⣤⣤⣤⣾⡛⠁⠀⠀⠀⠀⠈⢷⠀⠀⠀⠀⢿⡄⠀⠀⠀⣿⡆⠙⣆⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⣿⠀⠀⢠⣤⣤⣄⢉⣨⣥⣶⠶⢶⣾⠶⠂⠘⠦⢤⣤⣠⡾⠃⠀⠀⠀⣿⠀⠀⠘⣦⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣇⠀⣀⠀⠈⠀⠐⢿⣏⠉⠉⠉⢉⣁⣠⡶⠟⠁⠀⠀⠀⠀⠀⠈⠁⠀⠀⠀⣠⣾⡟⠀⠀⠀⠘⢧⣀⡀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡄⠈⠀⠂⠀⠀⠀⠈⠉⢉⣉⣩⡭⠓⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⡿⠀⠀⠀⠀⠀⠀⠉⠉⠑⠒║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠱⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣨⠟⠀⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣾⣿⣿⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡴⠋⠀⠀⡠⠇⢠⣀⠀⠀⠀⠀⠀⠀⠠⠐⠂⠀⠀⢀⣠⣼⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⠀⠀⠀⣀⣀⡠⠤⠶⠛⠁⠀⠀⠀⠈⠀⠀⠀⠛⢷⣤⣀⣀⠀⠀⠀⠀⢀⣠⣴⣿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[║⣤⠞⠋⠉⠀⡀⠀⠀⣀⡀⠀⠀⠀⠀⠀⠀⣤⣄⠘⣿⣿⣟⠛⠿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣯⣿⣦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀║]],
|
|
|
|
[[╚══════════════════════════════════════════════════╝]],
|
2022-10-17 17:13:31 +02:00
|
|
|
random_cringe,
|
2022-10-11 07:40:50 +02:00
|
|
|
}
|
2022-07-30 07:17:12 +02:00
|
|
|
end
|
|
|
|
|
2022-10-18 10:02:19 +02:00
|
|
|
local padding = 25
|
|
|
|
local function pad(string)
|
|
|
|
local str = string
|
|
|
|
for _ = 1, padding - #string do
|
|
|
|
str = str .. " "
|
|
|
|
end
|
|
|
|
return str
|
|
|
|
end
|
|
|
|
|
2022-10-21 16:55:18 +02:00
|
|
|
db.session_directory = vim.fn.stdpath("cache") .. "/sessions"
|
|
|
|
|
2022-07-30 07:17:12 +02:00
|
|
|
db.custom_center = {
|
2022-10-21 16:55:18 +02:00
|
|
|
{
|
|
|
|
icon = " ",
|
|
|
|
desc = pad("Restore last session"),
|
|
|
|
shortcut = "SPC s l",
|
|
|
|
action = "SessionLoad",
|
|
|
|
},
|
2022-10-11 07:40:50 +02:00
|
|
|
{
|
|
|
|
icon = " ",
|
2022-10-18 10:02:19 +02:00
|
|
|
desc = pad("Open Projects"),
|
2022-10-11 07:40:50 +02:00
|
|
|
action = "Telescope project",
|
2022-10-18 10:02:19 +02:00
|
|
|
shortcut = "SPC f p",
|
2022-10-11 07:40:50 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
icon = " ",
|
2022-10-18 10:02:19 +02:00
|
|
|
desc = pad("File Browser"),
|
2022-10-11 07:40:50 +02:00
|
|
|
action = "Telescope file_browser",
|
2022-10-18 10:02:19 +02:00
|
|
|
shortcut = "SPC f b",
|
2022-10-11 07:40:50 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
icon = " ",
|
2022-10-18 10:02:19 +02:00
|
|
|
desc = pad("Open Settings"),
|
2022-10-11 07:40:50 +02:00
|
|
|
action = function()
|
2022-10-18 10:02:19 +02:00
|
|
|
local confpath = vim.fn.resolve(vim.fn.stdpath("config"))
|
|
|
|
require("telescope.builtin").find_files({ cwd = confpath })
|
2022-10-11 07:40:50 +02:00
|
|
|
end,
|
2022-10-18 10:02:19 +02:00
|
|
|
shortcut = "SPC f s",
|
2022-10-11 07:40:50 +02:00
|
|
|
},
|
2022-07-30 07:17:12 +02:00
|
|
|
}
|
2022-10-11 07:40:50 +02:00
|
|
|
|
|
|
|
db.custom_footer = function()
|
|
|
|
local v = vim.version()
|
|
|
|
local vStr = string.format("%d.%d.%d", v.major, v.minor, v.patch)
|
|
|
|
return {
|
2022-10-17 17:13:31 +02:00
|
|
|
"masochism " .. vStr,
|
2022-10-11 07:40:50 +02:00
|
|
|
}
|
|
|
|
end
|
2022-10-21 16:55:18 +02:00
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd(
|
|
|
|
"VimLeavePre",
|
|
|
|
{ pattern = "*", command = "SessionSave" }
|
|
|
|
)
|