dotfiles/dot_config/nvim/lua/config/dashboard.lua

90 lines
4.9 KiB
Lua
Raw Normal View History

2022-07-30 07:17:12 +02:00
local db = require("dashboard")
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-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-07-30 07:17:12 +02:00
db.custom_center = {
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("Find File"),
2022-10-11 07:40:50 +02:00
action = "Telescope find_files find_command=rg,--hidden,--files",
2022-10-18 10:02:19 +02:00
shortcut = "SPC f f",
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("Find word"),
2022-10-11 07:40:50 +02:00
action = "Telescope live_grep",
2022-10-18 10:02:19 +02:00
shortcut = "SPC f g",
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)
local plugCount = #vim.tbl_keys(packer_plugins)
return {
2022-10-17 17:13:31 +02:00
"masochism " .. vStr,
2022-10-11 07:40:50 +02:00
plugCount .. " regrets",
}
end