------------------- -- 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 startinsert '), dashboard.button('r', ' Recent files', ':Telescope oldfiles '), dashboard.button('f', '󰥨 Find file', ':Telescope find_files '), dashboard.button('g', '󰱼 Find text', ':Telescope live_grep '), dashboard.button('p', ' Open project', ':Telescope session-lens search_session'), dashboard.button('l', '󰒲 Lazy', ':Lazy'), dashboard.button('q', ' Quit', ':qa') } require("alpha").setup(dashboard.opts) end } }