mirror of https://github.com/Hilbis/Hilbish
feat: add motd (closes #185)
parent
a106f4aea0
commit
6eea5bce47
|
@ -62,6 +62,9 @@ having and using multiple runners.
|
|||
- Lua modules located in `hilbish.userDir.data .. '/hilbish/start'` (like `~/.local/share/hilbish/start/foo/init.lua`)
|
||||
will be ran on startup
|
||||
- `hilbish.init` hook, thrown after Hilbish has initialized Lua side
|
||||
- Message of the day on startup (`hilbish.motd`), mainly intended as quick
|
||||
small news pieces for releases. It is printed by default. To disable it,
|
||||
set `hilbish.opts.motd` to false.
|
||||
|
||||
### Changed
|
||||
- **Breaking Change:** Upgraded to Lua 5.4.
|
||||
|
|
|
@ -23,7 +23,8 @@ local defaultOpts = {
|
|||
autocd = false,
|
||||
greeting = string.format([[Welcome to {magenta}Hilbish{reset}, {cyan}%s{reset}.
|
||||
The nice lil shell for {blue}Lua{reset} fanatics!
|
||||
]], hilbish.user)
|
||||
]], hilbish.user),
|
||||
motd = true
|
||||
}
|
||||
|
||||
for optsName, default in pairs(defaultOpts) do
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
local bait = require 'bait'
|
||||
local lunacolors = require 'lunacolors'
|
||||
|
||||
hilbish.motd = [[
|
||||
Hilbish 2.0 is a {red}major{reset} update! If your config doesn't work
|
||||
anymore, that will definitely be why! A MOTD, very message, much day.
|
||||
]]
|
||||
|
||||
bait.catch('hilbish.init', function()
|
||||
if hilbish.opts.motd then
|
||||
print(lunacolors.format(hilbish.motd))
|
||||
end
|
||||
end)
|
Loading…
Reference in New Issue