65 lines
3.9 KiB
Lua
65 lines
3.9 KiB
Lua
-------------------
|
|
-- Helper functions
|
|
-------------------
|
|
local function clamp(x, min, max) return math.max(math.min(x, max), min) end
|
|
|
|
local function get_random_image()
|
|
images = {
|
|
{
|
|
[[██╗ █████╗ ██████╗██╗ ██╗███████╗]],
|
|
[[██║ ██╔══██╗██╔════╝██║ ██║██╔════╝]],
|
|
[[██║ ███████║██║ ███████║███████╗]],
|
|
[[██║ ██╔══██║██║ ██╔══██║╚════██║]],
|
|
[[███████╗██║ ██║╚██████╗██║ ██║███████║]],
|
|
[[╚══════╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝]]
|
|
},
|
|
{
|
|
[[ ,,,╓▄▄▓▓▓▓▄ ,▄▓∩]],
|
|
[[ ,╓▄▄▄▄▓▓▓▓▓▓▓▓▀▓▓▓▓▓▓▓▓▓▀▀▀▓@@æ▄╓,▄▄ ,▄▓▓▓▓ ]],
|
|
[[ ,▄▄▓▓█████▀╫╫Ñ▒Ñ▒▒▒▒░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░▒▀▀▀▓@#▓▓▀▓▓▓Ñ ]],
|
|
[[ -2▓╫▒▒▒▒▒╫▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▓▓▓ ]],
|
|
[[ ª╨╩Ñ▒▒▒▒▒╫▄▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒░▒░░░░░░░═╨` `╫╫▓▓▓▓ ]],
|
|
[[ `ªº╩▒▒▒▒░░░░...░░▒▒▒▄▒▒▒ºª`` `▀▓▓▓ ]],
|
|
[[ ╙▓µ ]]
|
|
},
|
|
{
|
|
[[███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗]],
|
|
[[████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║]],
|
|
[[██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║]],
|
|
[[██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║]],
|
|
[[██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║]],
|
|
[[╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝]]
|
|
}
|
|
}
|
|
|
|
-- local i = math.random(#images)
|
|
local i = clamp(math.random(1, 40), 1, #images)
|
|
return images[i]
|
|
end
|
|
|
|
-----------------
|
|
-- Configurtation
|
|
-----------------
|
|
|
|
return {
|
|
{
|
|
"goolord/alpha-nvim",
|
|
lazy=false,
|
|
config = function()
|
|
local dashboard = require("alpha.themes.dashboard")
|
|
dashboard.section.header.val = get_random_image()
|
|
dashboard.section.buttons.val = {
|
|
dashboard.button('n', ' New file', ':ene <BAR> startinsert <CR>'),
|
|
dashboard.button('r', ' Recent files', ':Telescope oldfiles <CR>'),
|
|
dashboard.button('f', ' Find file', ':Telescope find_files <CR>'),
|
|
dashboard.button('g', ' Find text', ':Telescope live_grep <CR>'),
|
|
dashboard.button('p', ' Open project', ':Telescope session-lens search_session<CR>'),
|
|
dashboard.button('l', ' Lazy', ':Lazy<CR>'),
|
|
dashboard.button('q', ' Quit', ':qa<CR>')
|
|
}
|
|
|
|
require("alpha").setup(dashboard.opts)
|
|
end
|
|
}
|
|
}
|