------------------- -- 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 = 3 math.randomseed(os.time()) if math.fmod(math.random(100), 5) == 0 then if math.random(0, 1) == 0 then i = 1 else i = 2 end end 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 } }