Add dotfiles
This commit is contained in:
64
.config/nvim/lua/plugins/alpha.lua
Normal file
64
.config/nvim/lua/plugins/alpha.lua
Normal file
@@ -0,0 +1,64 @@
|
||||
-------------------
|
||||
-- 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",
|
||||
event = "VimEnter",
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user