Fix random title image selection

This commit is contained in:
Andreas Tsouchlos 2024-04-04 15:41:39 +02:00
parent 6a2054b203
commit 98b5e08f7a

View File

@ -32,8 +32,17 @@ local function get_random_image()
}
}
-- local i = math.random(#images)
local i = clamp(math.random(1, 40), 1, #images)
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
@ -44,7 +53,7 @@ end
return {
{
"goolord/alpha-nvim",
lazy=false,
lazy = false,
config = function()
local dashboard = require("alpha.themes.dashboard")
dashboard.section.header.val = get_random_image()