Fix random title image selection
This commit is contained in:
parent
6a2054b203
commit
98b5e08f7a
@ -32,8 +32,17 @@ local function get_random_image()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- local i = math.random(#images)
|
local i = 3
|
||||||
local i = clamp(math.random(1, 40), 1, #images)
|
|
||||||
|
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]
|
return images[i]
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -44,7 +53,7 @@ end
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"goolord/alpha-nvim",
|
"goolord/alpha-nvim",
|
||||||
lazy=false,
|
lazy = false,
|
||||||
config = function()
|
config = function()
|
||||||
local dashboard = require("alpha.themes.dashboard")
|
local dashboard = require("alpha.themes.dashboard")
|
||||||
dashboard.section.header.val = get_random_image()
|
dashboard.section.header.val = get_random_image()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user