-
Notifications
You must be signed in to change notification settings - Fork 116
/
Copy pathalpha-nvim.lua
116 lines (100 loc) · 6.39 KB
/
alpha-nvim.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
-----------------------------------------------------------
-- Dashboard configuration file
-----------------------------------------------------------
-- Plugin: alpha-nvim
-- url: https://github.com/goolord/alpha-nvim
-- For configuration examples see: https://github.com/goolord/alpha-nvim/discussions/16
local status_ok, alpha = pcall(require, 'alpha')
if not status_ok then
return
end
-- Use `dashboard-nvim` theme, other themes: `vim-startify` and `theta`
-- see: https://github.com/goolord/alpha-nvim?tab=readme-ov-file#quick-start
local dashboard = require('alpha.themes.dashboard')
-- Set the different banners to the variables `bx` (b0, b1, ..)
-- to add a new banner create a new variable `bx` to the list :)
-- by default there are six different banners (from b0 to b5).
local b0 = {
" ",
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ",
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ",
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ",
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ",
" ",
}
local b1 = {
" ",
" ███ ██ ███████ ██████ ██ ██ ██ ███ ███ ",
" ████ ██ ██ ██ ██ ██ ██ ██ ████ ████ ",
" ██ ██ ██ █████ ██ ██ ██ ██ ██ ██ ████ ██ ",
" ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ",
" ██ ████ ███████ ██████ ████ ██ ██ ██ ",
" "
}
local b2 = {
" ",
" ░ ░░░ ░░ ░░░ ░░░ ░░░░ ░░ ░░ ░░░░ ░ ",
" ▒ ▒▒ ▒▒ ▒▒▒▒▒▒▒▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒ ▒ ",
" ▓ ▓ ▓ ▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓ ▓▓ ▓▓▓▓▓▓ ▓▓▓▓▓ ▓ ",
" █ ██ ██ ████████ ████ ████ ███████ █████ █ █ █ ",
" █ ███ ██ ███ ██████ █████ ██ ████ █ ",
" "
}
local b3 = {
" ",
" ███▄ █ ▓█████ ▒█████ ██▒ █▓ ██▓ ███▄ ▄███▓ ",
" ██ ▀█ █ ▓█ ▀ ▒██▒ ██▒▓██░ █▒▓██▒▓██▒▀█▀ ██▒ ",
" ▓██ ▀█ ██▒▒███ ▒██░ ██▒ ▓██ █▒░▒██▒▓██ ▓██░ ",
" ▓██▒ ▐▌██▒▒▓█ ▄ ▒██ ██░ ▒██ █░░░██░▒██ ▒██ ",
" ▒██░ ▓██░░▒████▒░ ████▓▒░ ▒▀█░ ░██░▒██▒ ░██▒ ",
" ░ ▒░ ▒ ▒ ░░ ▒░ ░░ ▒░▒░▒░ ░ ▐░ ░▓ ░ ▒░ ░ ░ ",
" ░ ░░ ░ ▒░ ░ ░ ░ ░ ▒ ▒░ ░ ░░ ▒ ░░ ░ ░ ",
" ░ ░ ░ ░ ░ ░ ░ ▒ ░░ ▒ ░░ ░ ",
" ░ ░ ░ ░ ░ ░ ░ ░ ",
" ░ ",
" "
}
local b4 = {
" ",
" ## ## ######## ####### ## ## #### ## ## ",
" ### ## ## ## ## ## ## ## ### ### ",
" #### ## ## ## ## ## ## ## #### #### ",
" ## ## ## ###### ## ## ## ## ## ## ### ## ",
" ## #### ## ## ## ## ## ## ## ## ",
" ## ### ## ## ## ## ## ## ## ## ",
" ## ## ######## ####### ### #### ## ## ",
" "
}
local b5 = {
" ",
" '##::: ##:'########::'#######::'##::::'##:'####:'##::::'##: ",
" ###:: ##: ##.....::'##.... ##: ##:::: ##:. ##:: ###::'###: ",
" ####: ##: ##::::::: ##:::: ##: ##:::: ##:: ##:: ####'####: ",
" ## ## ##: ######::: ##:::: ##: ##:::: ##:: ##:: ## ### ##: ",
" ##. ####: ##...:::: ##:::: ##:. ##:: ##::: ##:: ##. #: ##: ",
" ##:. ###: ##::::::: ##:::: ##::. ## ##:::: ##:: ##:.:: ##: ",
" ##::. ##: ########:. #######::::. ###::::'####: ##:::: ##: ",
" ..::::..::........:::.......::::::...:::::....::..:::::..:: ",
" "
}
-- Assigns the value of the preferred `bx` banner to the `section.header.val` table
dashboard.section.header.val = b2
-- Menu (Shortcuts)
dashboard.section.buttons.val = {
dashboard.button('e', ' New file', ':ene <BAR> startinsert<CR>'),
dashboard.button('f', ' Find file', ':NvimTreeOpen<CR>'),
dashboard.button('s', ' Settings', ':e $MYVIMRC<CR>'),
dashboard.button('u', ' Update plugins', ':Lazy update<CR>'),
dashboard.button('q', ' Quit', ':qa<CR>'),
}
-- Footer
local function footer()
local version = vim.version()
local print_version = "v" .. version.major .. '.' .. version.minor .. '.' .. version.patch
local datetime = os.date('%Y/%m/%d %H:%M')
return print_version .. ' - ' .. datetime
end
dashboard.section.footer.val = footer()
alpha.setup(dashboard.config)