Skip to content

Commit

Permalink
add fortune tips
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-xyz committed Nov 11, 2024
1 parent 313d45e commit b06720b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"everforest-nvim": { "branch": "main", "commit": "7c57941d5ef5a150f307b9295c00a59e95d78587" },
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
"formatter.nvim": { "branch": "master", "commit": "eb89a1f3e079f1b9680bc7293b75fffccb5e1598" },
"fortune.nvim": { "branch": "master", "commit": "29a99fbf887a2d48693f1eaa1893f84cde60af54" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"fugit2.nvim": { "branch": "main", "commit": "e5011ee344962eb9c15a3cb42e289d8081e29ac9" },
"git-conflict.nvim": { "branch": "main", "commit": "4bbfdd92d547d2862a75b4e80afaf30e73f7bbb4" },
Expand Down
17 changes: 16 additions & 1 deletion nvim/lua/plugins/startscreen.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
return {
{
"nvimdev/dashboard-nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
dependencies = {
"nvim-tree/nvim-web-devicons",
{ "rubiin/fortune.nvim", opts = { content_type = "tips" } },
},
config = function()
require("dashboard").setup({
theme = "doom",
Expand Down Expand Up @@ -62,6 +65,18 @@ return {
key = "u",
},
},
footer = function()
local stats = require("lazy").stats()
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
local footer = {
"Startuptime: " .. ms .. "ms",
"Plugins: " .. stats.loaded .. " loaded / " .. stats.count .. " installed ",
}
local fortune = require("fortune").get_fortune()
footer = vim.list_extend(footer, fortune)

return footer
end,
},
})
vim.api.nvim_set_hl(0, "DashboardHeader", { fg = "#A3BE8C", ctermfg = 2 })
Expand Down

0 comments on commit b06720b

Please sign in to comment.