Skip to content

Commit

Permalink
add nvim dashboard, mappings and wakatime
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxWolf-01 committed Nov 9, 2024
1 parent f5a6580 commit c6997b4
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nvim/lua/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ map("n", "<C-s>", ":w<CR>", { noremap = true, silent = true })
map("i", "<C-s>", "<Esc>:w<CR>a", { noremap = true, silent = true })
-- preserve paste register when pasting over selection
map("x", "<leader>p", "\"_dP", { noremap = true, silent = true })
-- show dashboard
map("n", "<leader>d", ":Dashboard<CR>", { silent = true })

-- ====================================================================
-- lsp
Expand Down
204 changes: 204 additions & 0 deletions nvim/lua/plugins/dashboard.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
return {
'nvimdev/dashboard-nvim',
event = 'VimEnter',
config = function()
local dashboard = require('dashboard')
local headers = {
{
"",
" β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—",
" β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘",
" β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘",
" β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘",
" β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘",
" β•šβ•β• β•šβ•β•β•β•β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β• β•šβ•β•β•šβ•β• β•šβ•β•",
"",
},
{
"",
" β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”",
" β”‚ $ nvim init.lua β”‚",
" β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚",
" β”‚ β”‚ require('plugins') β”‚ β”‚",
" β”‚ β”‚ require('config') β”‚ β”‚",
" β”‚ β”‚ require('theme') β”‚ β”‚",
" β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚",
" β”‚ [+] Ready to code β”‚",
" β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜",
"",
},
{
"",
" C7 77/7~7(~ ",
" @@@@@/ S7@@~@ @K ",
" ^@@K@@BK~ N E O V I M 7@@@BSS(S7CC7 ",
" @S@@~(S@@@R @@@/777((77S7@7 ",
" ^S@@@(7@@@@/ S@@B@77(~@7@KKS/ ",
" 7@@B(~(7S@@B@7 K@@@B~7((~(77@@@@7 ",
" 7@@S7((77@@@@@~ S7 7(@S@SB@7@@@@@S@@777((~7@@S@@7 ",
" 7~(@@@7((~(7@@@@77@B@@R@BS@@@K@@@C@S77(~(@@(77@B@@K( ",
" S@@@7(~@(@B@K@ ~SS^// 7CS@S/K@B(~((7S@@@@@/ ",
" 7@@@77(@@@@K~ /@7RS7@@@7/R@777@@@SBCC/ ",
" 7S77@@@@7@@7 /@C 7@~~~BSS@K@@@@B@B@@@@@@~ ",
" SB@B@@7@@7~( S@7 @@( @@@@@SS@@S@7 ",
" KK@@CS7 ^~SB KKS/C(C@@SS@@@( ",
" @@@@/ ~@ @ @@@BS/ ^ 7K77@B@7 ",
" // S@77@@@B@@@ @ @@@B@ @@ S@@7 S~ 7 ",
" / 7@@7@@@@@@@@@ @ @@@@@@@KB 7@@@S 7K7~ ",
" ~S7@@C @@@@@@@SB @ @@@SCSSCB (KB@@@S ~SCSCSCRSS7 ",
" 7@S@@@C 7@@@@K@@S @S 7SS@S @@@@@@R 7K@@SKB/(S/",
" 7@7@B@@7 ^S@7^@@ S @ ~ S@@B@@@~ /S7 /@77@7 ",
" K7K@@C@@@B@S~C 7@7 7@@@B@@@B@S77@S( 7@R7/SCS@/",
" 7S~@S7/B@B@@@@BK 7@/ ~/7 (@B@@B@@@@@7~ SBSB7 S/ ",
" @S@@S 7K@K @C7@@@@@K 7S777777S@S ~@7 ^ CB@@B^ 7@C",
" @ CC@ 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"β €β£΄β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ Ÿβ’Ώβ£Ώβ£·β‘€β € ",
"β£Έβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ Ÿβ β €β£΄β’Ώβ£Ώβ£§β € ",
"⣿⣿⣿⣿⣿⑿⠛⣩⠍⠀⠀⠀⠐⠉⒠⣿⣿⑇ ",
"β£Ώβ‘Ώβ ›β ‹β ‰β €β €β €β €β €β €β €β €β’ β£Ώβ£Ώβ£Ώβ£Ώ ",
"Ⓓ⣿⣀⠄⠀⠀⠀⠀⠀⠀⠀⠀⒠⣿⣿⣿⣿⑏ ",
"β €β »β‘β €β €β €β €β €β €β €β €β €β’Ώβ£Ώβ£Ώβ£Ώβ Ÿβ € ",
"β €β €β €β €β €β €β €β €β €β €β €β €β €β’»β Ÿβ β €β € ",
"β €β € N E O V I M ",
"",
},
{
"",
" ⣴⣢⣀⑀⠦⣀⣀⣀⠆ β£ˆβ£­β£Ώβ£Άβ£Ώβ£¦β£Όβ£† ",
" ⠉⠻Ⓙ⣿⠿⣿⣿⣢⣦⠀⠄①Ⓘ⣿⣿⑿⠋⠉⠉⠻⣿⣿⑛⣦ ",
" ⠈Ⓙ⣿⣟⠦ β£Ύβ£Ώβ£Ώβ£· ⠻⠿Ⓙ⣿⣧⣄ ",
" β£Έβ£Ώβ£Ώβ’§ β’»β »β£Ώβ£Ώβ£·β£„β£€β „β ’β£€β‘€β ˆβ ™β Ώβ „ ",
" ⒠⣿⣿⣿⠈ β£»β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£›β£³β£€β£€β£€ ",
" ⒠⣧⣢β£₯β‘€β’„ ⣸⣿⣿⠘ β’€β£΄β£Ώβ£Ώβ‘Ώβ ›β£Ώβ£Ώβ£§β ˆβ’Ώβ Ώβ Ÿβ ›β »β Ώβ „ ",
" ⣰⣿⣿⠛⠻⣿⣿⑦Ⓓ⣿⣷ ⒊⣿⣿⑏ Ⓒ⣿⣿⑇ ⒀⣠⣄⣾⠄ ",
" β£ β£Ώβ Ώβ › β’€β£Ώβ£Ώβ£·β ˜β’Ώβ£Ώβ£¦β‘€ ⒸⒿ⣿⣿⣄ ⣸⣿⣿⑇β£ͺβ£Ώβ‘Ώβ Ώβ£Ώβ£·β‘„ ",
" β ™β ƒ ⣼⣿⑟ β ˆβ »β£Ώβ£Ώβ£¦β£Œβ‘‡β »β£Ώβ£Ώβ£·β£Ώβ£Ώβ£Ώ ⣿⣿⑇ ⠛⠻Ⓑ⣄ ",
" Ⓕ⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⑟ ⠫Ⓙ⣿⑆ ",
" β »β£Ώβ£Ώβ£Ώβ£Ώβ£Άβ£Άβ£Ύβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ‘Ÿβ’€β£€β£€β£Ύβ‘Ώβ ƒ ",
"",
" N E O V I M ",
"",
},
{
"",
" ,",
" ,-. _,---._ __ / \\",
" / ) .-' `./ / \\",
" ( ( ,' `/ /|",
" \\ `-\" \\'\\ / |",
" `. , \\ \\ / |",
" /`. ,'-`----Y |",
" ( ; | '",
" | ,-. ,-' | /",
" | | ( | hjw | /",
" ) | \\ `.___________|/",
" `--' `--'",
"",
" N E O V I M ",
"",
},
{
"",
" (((( ",
" (((( ",
" )))) ",
" _ .---. ",
" ( |`---'| ",
" \\| | ",
" : .___, : ",
" `-----' ",
" N E O V I M ",
"",
},
}

math.randomseed(os.time())
local random_header = headers[math.random(#headers)]
dashboard.setup {
theme = 'hyper',
config = {
header = random_header,
shortcut = {
{ desc = ' Find File', group = 'DashboardFiles', key = 'f', action = 'Telescope find_files' },
{ desc = ' Recent Files', group = 'DashboardFiles', key = 'r', action = 'Telescope oldfiles' },
{ desc = ' Find Word', group = 'DashboardFiles', key = 'w', action = 'Telescope live_grep' },
{ desc = ' New File', group = 'DashboardFiles', key = 'n', action = 'enew' },
{ desc = ' Settings', group = 'DashboardFiles', key = 's', action = 'e $MYVIMRC' },
{ desc = ' Update Plugins', group = 'DashboardFiles', key = 'u', action = 'Lazy update' },
},
packages = {
enable = true -- Shows plugin count
},
project = {
enable = true,
limit = 8,
icon = '',
label = 'Recent Projects',
action = 'Telescope find_files cwd='
},
mru = {
enable = true,
limit = 10,
icon = '',
label = 'Recent Files',
},
footer = {
"",
os.date("%H:%M") .. " " .. ({ "πŸŒ‘", "πŸŒ’", "πŸŒ“", "πŸŒ”", "πŸŒ•", "πŸŒ–", "πŸŒ—", "🌘" })[tonumber(os.date("%d")) % 8 + 1] .. " " .. os.date("%d %b, %a"),
"", "󰍛 " .. io.popen("whoami"):read("*l") .. "@" .. io.popen("hostname"):read("*l")
.. " σ°Œͺ " .. io.popen('uptime -p'):read("*l"),
}
},
hide = {
statusline = true, -- Set to true to hide statusline in dashboard
tabline = true, -- Set to true to hide tabline in dashboard
winbar = true -- Set to true to hide winbar in dashboard
},
disable_move = false, -- Set to true to disable cursor movement in dashboard
shortcut_type = 'letter', -- 'letter' for a-z shortcuts, 'number' for numeric shortcuts
change_to_vcs_root = true -- Change to project root when opening files from MRU
}
end,
dependencies = {
{ 'nvim-tree/nvim-web-devicons' },
{ 'nvim-telescope/telescope.nvim' }
}
}
1 change: 1 addition & 0 deletions nvim/lua/plugins/wakatime.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
return { 'wakatime/vim-wakatime', lazy = false }

0 comments on commit c6997b4

Please sign in to comment.