summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbh <qn+git@excalibur.computer>2026-04-09 16:42:04 +0800
committerbh <qn+git@excalibur.computer>2026-04-09 16:42:04 +0800
commit04d976831ccd9d6a3b8727138a7d8fb6d7a33450 (patch)
treec4cc68bf1d475d6419599c47182d4ce661bde3d0
parent6c81e38e15455fb3074d9d46c94ec2c951b5a382 (diff)
Change dashboard logo
-rw-r--r--lua/config/dashboard.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/lua/config/dashboard.lua b/lua/config/dashboard.lua
index 3d7b9b3..60c6fa1 100644
--- a/lua/config/dashboard.lua
+++ b/lua/config/dashboard.lua
@@ -3,11 +3,10 @@ local db = require("dashboard")
-- Safe fortune function
local function quote()
- local handle = io.popen("fortune -s") -- run fortune
- local result = handle:read("*a") -- read all output
+ local handle = io.popen([[while :; do f=$(fortune); [ $(printf '%s\n' "$f" | wc -l) -eq 1 ] && { printf '%s\n' "$f"; break; }; done]])
+ local result = handle:read('*a')
handle:close()
- -- Remove all newlines and carriage returns
- result = result:gsub("\r",""):gsub("\n"," ")
+ result = result:gsub('\r', ''):gsub('\n', ' ')
return result
end
@@ -18,17 +17,18 @@ db.setup {
enable = false -- or true if you want date/time header
},
header = {
- " ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗",
- " ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║",
- " ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║",
- " ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██╔╝██╔╝██║",
- " ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║",
- " ╚═╝ ╚═══╝╚══════╝╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝",
+ "│ ╲ │ │",
+ "│ ╲ │ │",
+ "│ │╲ ╲ │ │",
+ "│ │ ╲ ╲│ │",
+ "│ │ ╲ │",
+ "│ │ ╲ │",
" ",
+ "Neovim " .. vim.version().major .. '.' .. vim.version().minor .. '.' .. vim.version().patch,
"  " .. os.date("%A, %B %d, %Y"), -- your custom date/day line
"",
"[TIP: To exit Vim, use a Sledgehammer!]",
- "" -- optional empty line to separate from center shortcuts
+ ""
},
shortcut = {
{